@import url("Vazirmatn-font-face.css");

:root {
    --primary-color: #0f172a;
    --secondary-color: #f59e0b;
    --accent-color: #ea580c;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.16);
    --shadow-glow-amber: 0 0 40px rgba(245, 158, 11, 0.15);
    --shadow-glow-orange: 0 0 40px rgba(234, 88, 12, 0.12);
    --gradient-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    --gradient-accent-soft: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(234, 88, 12, 0.04) 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-full: 9999px;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #f0f2f5;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(245, 158, 11, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(234, 88, 12, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(15, 23, 42, 0.02) 0%, transparent 50%);
    color: var(--text-dark);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    position: relative;
    overflow-x: hidden;
}

.page-bg-ornament {
    position: fixed;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.page-bg-ornament-2 {
    position: fixed;
    bottom: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234, 88, 12, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.container {
    width: 100%;
    max-width: 920px;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 56px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(226, 232, 240, 0.6);
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    z-index: 10;
}

.container-glow {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 4px;
    background: var(--secondary-color);
    filter: blur(12px);
    opacity: 0.6;
    z-index: 11;
}

header {
    text-align: center;
    margin-bottom: 56px;
    position: relative;
}

.header-badge {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
    transform: rotate(-3deg);
    transition: var(--transition-bounce);
}

.header-badge:hover {
    transform: rotate(0deg) scale(1.05);
}

.header-badge i {
    font-size: 32px;
    color: var(--secondary-color);
}

header h1 {
    font-size: 2.1rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

header > p {
    color: var(--text-light);
    font-size: 1.05rem;
    font-weight: 400;
}

header::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--gradient-accent);
    margin: 24px auto 0;
    border-radius: var(--radius-full);
}

.header-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.btn-guide {
    background: var(--white);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 10px 22px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: 'Vazirmatn', sans-serif;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
}

.btn-guide i {
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.btn-guide:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
    transform: translateY(-2px);
}

.btn-guide-history {
    border-color: rgba(245, 158, 11, 0.3);
    color: #b45309;
}

.btn-guide-history:hover {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.btn-guide-ai {
    border-color: rgba(234, 88, 12, 0.3);
    color: var(--accent-color);
}

.btn-guide-ai:hover {
    background: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.3);
}

.progress-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 56px;
    position: relative;
    z-index: 1;
    padding: 0 10px;
    flex-wrap: nowrap; 
}

.progress-track {
    position: absolute;
    top: 24px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.progress-track-fill {
    position: absolute;
    top: 24px;
    right: 10%;
    height: 2px;
    background: var(--gradient-accent);
    z-index: 0;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
    min-width: 0; 
    cursor: default;
}

.progress-line {
    display: none;
}

.step-circle {
    width: 48px;
    height: 48px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
    transition: var(--transition-bounce);
    margin-bottom: 10px;
    box-shadow: var(--shadow-xs);
    position: relative;
}

.step-circle i {
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.step-label {
    font-size: 0.82rem;
    color: var(--text-light);
    font-weight: 500;
    transition: var(--transition-smooth);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; 
    max-width: 100%;          
}

.progress-step.active .step-circle {
    background: var(--gradient-accent);
    border-color: transparent;
    color: var(--white);
    transform: scale(1.12);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
}

.progress-step.active .step-circle i {
    color: var(--white);
}

.progress-step.active .step-label {
    color: var(--primary-color);
    font-weight: 700;
}

.progress-step.completed .step-circle {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.progress-step.completed .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.form-step {
    display: none;
    animation: stepFadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.form-step.active {
    display: block;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 36px;
}

.step-header-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--gradient-accent-soft);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-header-icon i {
    font-size: 24px;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-header h2 {
    font-size: 1.45rem;
    color: var(--primary-color);
    margin-bottom: 6px;
    font-weight: 800;
}

.step-header p {
    color: var(--text-light);
    font-size: 0.92rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.comparison-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: var(--transition-smooth);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.comparison-card:hover {
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: var(--shadow-md), var(--shadow-glow-amber);
    transform: translateY(-4px);
}

.comparison-card:hover .card-indicator {
    background: var(--gradient-accent);
}

.comparison-card:focus-within {
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-md), 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.comparison-card:focus-within .card-indicator {
    background: var(--gradient-accent);
}

.comparison-card label {
    display: block;
    margin-bottom: 16px;
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.6;
}

.comparison-card .vs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    color: var(--white);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 800;
    margin: 0 6px;
    letter-spacing: 1px;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.comparison-card input[type="text"],
.comparison-card input[type="number"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: var(--transition-smooth);
    color: var(--primary-color);
    background: var(--bg-light);
}

.comparison-card input[type="text"]:focus,
.comparison-card input[type="number"]:focus {
    border-color: var(--secondary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.08);
}

.comparison-card input[type="text"]::placeholder {
    color: #cbd5e1;
    font-weight: 400;
    font-size: 0.9rem;
}

.nav-buttons,
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 44px;
}

button,
.btn-primary,
.btn-secondary,
.btn-back,
.btn-submit,
.btn-next,
.btn-prev {
    padding: 14px 36px;
    border-radius: var(--radius-md);
    border: none;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-next,
.btn-submit,
.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-next::before,
.btn-submit::before,
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.btn-next:hover::before,
.btn-submit:hover::before,
.btn-primary:hover::before {
    left: 100%;
}

.btn-next:hover,
.btn-submit:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.4);
}

.btn-submit {
    background: var(--gradient-accent);
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.3);
}

.btn-submit:hover {
    box-shadow: 0 12px 32px rgba(234, 88, 12, 0.4);
}

.btn-prev,
.btn-back,
.btn-secondary {
    background: var(--white);
    color: var(--text-dark);
    border: 1.5px solid var(--border-color);
}

.btn-prev:hover,
.btn-back:hover,
.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--text-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-prev i,
.btn-next i,
.btn-submit i {
    font-size: 1.15rem;
}

.info-tooltip {
    margin-top: 60px;
    padding: 28px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border-right: 4px solid var(--secondary-color);
}

.info-tooltip h3 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.info-tooltip ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.info-tooltip li {
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-tooltip strong {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.result-final {
    text-align: center;
    margin-bottom: 50px;
}

.winner-card {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

.winner-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 60%);
}

.winner-name {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.winner-score {
    font-size: 4rem;
    font-weight: 900;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.winner-label {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    opacity: 0.7;
    position: relative;
    z-index: 2;
}

.result-section {
    margin-bottom: 50px;
}

.result-section h2 {
    font-size: 1.35rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    border-right: 4px solid var(--secondary-color);
    padding-right: 15px;
    font-weight: 800;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    text-align: right;
    padding: 16px;
    color: var(--text-light);
    font-weight: 700;
    font-size: 0.88rem;
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 20px 16px;
    background: var(--white);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.98rem;
    color: var(--text-dark);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--bg-light);
}

.rank {
    font-weight: 900;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.1rem;
}

.progress-bar {
    background: var(--border-subtle);
    height: 8px;
    border-radius: var(--radius-full);
    overflow: hidden;
    width: 100%;
    min-width: 100px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: var(--radius-full);
    transition: width 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.weights-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
}

.weight-card {
    background: var(--white);
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition-smooth);
}

.weight-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.weight-name {
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.weight-percent {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.consistency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); 
    gap: 15px;
}

.consistency-card {
    background: var(--white);
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: var(--transition-smooth);
}

.consistency-card:hover {
    box-shadow: var(--shadow-sm);
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    margin-top: 5px;
    letter-spacing: 0.3px;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: modalFadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--white);
    margin: 4% auto;
    width: 90%;
    max-width: 720px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    max-height: 88vh;
    animation: modalSlideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    z-index: 1;
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--primary-color);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 i {
    color: var(--secondary-color);
    font-size: 1.3rem;
}

.close-modal {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-radius: var(--radius-sm);
    line-height: 1;
}

.close-modal:hover {
    color: var(--accent-color);
    background: rgba(234, 88, 12, 0.08);
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
    font-size: 0.93rem;
    color: var(--text-dark);
    line-height: 1.9;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.guide-section {
    margin-bottom: 32px;
}

.guide-section h3 {
    color: var(--primary-color);
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-subtle);
}

.guide-section h3 i {
    width: 32px;
    height: 32px;
    background: var(--gradient-accent-soft);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--accent-color);
}

.sub-section {
    margin-top: 16px;
    margin-bottom: 16px;
}

.sub-section h4 {
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 8px;
    padding-right: 12px;
    border-right: 3px solid var(--secondary-color);
}

.guide-section ul {
    list-style: none;
    padding-right: 15px;
}

.guide-section ul li {
    margin-bottom: 8px;
    position: relative;
    padding-right: 16px;
}

.guide-section ul li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gradient-accent);
}

.cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.mini-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 20px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    text-align: center;
    transition: var(--transition-smooth);
}

.mini-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.3);
}

.mini-card-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    background: var(--gradient-accent-soft);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-card-icon i {
    font-size: 1.2rem;
    color: var(--accent-color);
}

.mini-card h5 {
    color: var(--primary-color);
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.mini-card p {
    font-size: 0.82rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

.guide-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 12px;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.guide-table th,
.guide-table td {
    padding: 12px 16px;
    text-align: center;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
}

.guide-table th {
    background: var(--gradient-primary);
    color: var(--white);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.guide-table tbody tr:last-child td {
    border-bottom: none;
}

.guide-table tbody tr:hover td {
    background: var(--bg-light);
}

.guide-table td:first-child {
    font-weight: 800;
    color: var(--accent-color);
    font-size: 1rem;
}

.note {
    background: #fffbeb;
    color: #92400e;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-top: 14px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    font-size: 0.88rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.7;
}

.note i {
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
    color: var(--secondary-color);
}

.note-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: rgba(59, 130, 246, 0.2);
}

.note-info i {
    color: #3b82f6;
}

.modal-footer {
    padding: 18px 32px;
    border-top: 1px solid var(--border-color);
    text-align: left;
    background: var(--bg-light);
}

.btn-close-modal {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 11px 28px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.btn-close-modal:hover {
    background: var(--gradient-accent);
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.3);
    transform: translateY(-1px);
}

.btn-close-modal i {
    font-size: 1.1rem;
}

.auth-gate-wrapper {
    position: relative;
}

.auth-gate-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 50;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.auth-gate-content {
    text-align: center;
    background: var(--white);
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(226, 232, 240, 0.8);
    max-width: 420px;
    animation: modalSlideUp 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.auth-gate-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
}

.auth-gate-content i.fa-lock {
    font-size: 48px;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.auth-gate-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-weight: 800;
}

.auth-gate-content p {
    color: var(--text-light);
    margin-bottom: 32px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    color: var(--white);
    padding: 14px 36px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(234, 88, 12, 0.4);
    color: var(--white);
}

fieldset[disabled] {
    pointer-events: none;
    opacity: 0.8;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .container {
        padding: 28px 18px;
        border-radius: var(--radius-lg);
    }

    header h1 {
        font-size: 1.5rem;
    }

    .header-badge {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }

    .header-badge i {
        font-size: 24px;
    }

    .header-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn-guide {
        width: 100%;
        justify-content: center;
    }

    .step-label {
        font-size: 0.68rem;
        display: none;
    }

    .progress-step.active .step-label {
        display: block;
        position: absolute;
        width: 140px;
        top: 56px;
    }

    .step-circle {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .step-circle i {
        font-size: 1rem;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .nav-buttons,
    .action-buttons {
        flex-direction: column-reverse;
        gap: 10px;
    }

    button,
    .btn-next,
    .btn-prev,
    .btn-submit {
        width: 100%;
        padding: 16px;
    }

    .winner-score {
        font-size: 3rem;
    }

    .winner-name {
        font-size: 1.5rem;
    }

    .detail-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .detail-table table {
        min-width: 600px;
    }

    .modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        max-width: 100%;
    }

    .modal-header {
        padding: 18px 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        padding: 14px 20px;
    }

    .cards-row {
        grid-template-columns: 1fr;
    }

    .step-header-icon {
        width: 48px;
        height: 48px;
    }

    .step-header h2 {
        font-size: 1.2rem;
    }

    .weights-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .progress-step .step-label {
        font-size: 0.62rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 14px;
    }

    .comparison-card {
        padding: 20px 16px;
    }

    .progress-track {
        left: 5%;
        right: 5%;
    }

    .progress-track-fill {
        right: 5%;
    }

    .weights-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .step-circle {
        width: 34px;
        height: 34px;
    }

    .step-circle i {
        font-size: 0.85rem;
    }
}
