﻿@font-face {
    font-family: "estedad";
    font-style: normal;
    font-weight: 400;
    src: url("/fonts/estedad/estedad-fd-regular.woff2") format("woff2"), url("/fonts/estedad/estedad-fd-regular.ttf") format("truetype");
    font-display: fallback;
}

@font-face {
    font-family: "estedad";
    font-style: normal;
    font-weight: 500;
    src: url("/fonts/estedad/estedad-fd-medium.woff2") format("woff2"), url("/fonts/estedad/estedad-fd-medium.ttf") format("truetype");
    font-display: fallback;
}

@font-face {
    font-family: "estedad";
    font-style: normal;
    font-weight: 600;
    src: url("/fonts/estedad/estedad-fd-semi-bold.woff2") format("woff2"), url("/fonts/estedad/estedad-fd-semi-bold.ttf") format("truetype");
    font-display: fallback;
}

@font-face {
    font-family: "estedad";
    font-style: normal;
    font-weight: 700;
    src: url("/fonts/estedad/estedad-fd-bold.woff2") format("woff2"), url("/fonts/estedad/estedad-fd-bold.ttf") format("truetype");
    font-display: fallback;
}

body {
    font-family: "estedad",Tahoma, Arial, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
}

.hero {
    background: linear-gradient(135deg, #0f172a, #1e40af);
    color: white;
    border-radius: 0 0 32px 32px;
    padding: 48px 0;
}

.glass-card {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border-radius: 24px;
}

.section-card {
    background: white;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.prize-card {
    border-radius: 18px;
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
    border: 1px solid #fed7aa;
    color: #1f2937;
}

.time-alert {
    border-radius: 16px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.closed-alert {
    border-radius: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.match-card {
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    transition: 0.25s;
    overflow: hidden;
    position: relative;
}

    .match-card:hover {
        border-color: #2563eb;
        box-shadow: 0 14px 32px rgba(37, 99, 235, 0.14);
        transform: translateY(-2px);
    }

.match-header {
    background: #f1f5f9;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 18px;
}

.stage-pill {
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 800;
}

.match-time {
    font-size: 13px;
    color: #64748b;
}

.team-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px 12px;
    min-height: 128px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.flag {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
    background: #e5e7eb;
}

.team-name {
    font-size: 16px;
    font-weight: 800;
    margin-top: 10px;
    color: #111827;
}

.vs-badge {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #0f172a;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22);
}

.prediction-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

    .prediction-grid.two-options {
        grid-template-columns: repeat(2, 1fr);
    }

.prediction-option input {
    display: none;
}

.prediction-option label {
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    padding: 14px 10px;
    width: 100%;
    min-height: 82px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    user-select: none;
}

    .prediction-option label:hover {
        border-color: #2563eb;
        background: #eff6ff;
    }

.prediction-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 18px;
    background: #f1f5f9;
}

.prediction-title {
    font-weight: 800;
    font-size: 14px;
}

.prediction-subtitle {
    font-size: 12px;
    color: #64748b;
    margin-top: 3px;
}

.prediction-option input:checked + label {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border-color: #1d4ed8;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}

    .prediction-option input:checked + label .prediction-icon {
        background: rgba(255,255,255,0.18);
    }

    .prediction-option input:checked + label .prediction-subtitle {
        color: rgba(255,255,255,0.8);
    }

.my-score-card {
    border-radius: 20px;
    border: 1px solid #dbeafe;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
    height: 100%;
}

.my-score-number {
    font-size: 34px;
    font-weight: 900;
    color: #1d4ed8;
    line-height: 1;
}

.my-score-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: #2563eb;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.leaderboard-rank {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1e40af;
    color: white;
    font-weight: bold;
}

.login-status-box {
    border-radius: 18px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
}

.login-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #facc15;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.login-required-box {
    border-radius: 18px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.view-switcher {
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    padding: 16px;
}

.view-btn.active {
    background: #2563eb;
    color: white;
}

.group-title-card {
    border-radius: 18px;
    background: linear-gradient(135deg, #1e40af, #0f172a);
    color: white;
    padding: 16px 20px;
    margin-top: 12px;
}

.compact-match-card .team-box {
    min-height: 96px;
    padding: 12px 8px;
}

.compact-match-card .flag {
    width: 44px;
    height: 44px;
}

.compact-match-card .team-name {
    font-size: 14px;
}

.compact-match-card .vs-badge {
    width: 42px;
    height: 42px;
    font-size: 12px;
}

.compact-match-card .prediction-option label {
    min-height: 70px;
    padding: 10px 8px;
}

.compact-match-card .prediction-icon {
    width: 28px;
    height: 28px;
    font-size: 15px;
    margin-bottom: 5px;
}

.compact-match-card .prediction-title {
    font-size: 12px;
}

.compact-match-card .prediction-subtitle {
    display: none;
}

.match-result-box {
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    padding: 12px 14px;
}

.match-score {
    font-size: 22px;
    font-weight: 900;
    color: #0f172a;
}

.prediction-status-badge {
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.prediction-correct {
    background: #dcfce7;
    color: #166534;
}

.prediction-wrong {
    background: #fee2e2;
    color: #991b1b;
}

.prediction-pending {
    background: #fef9c3;
    color: #854d0e;
}

.prediction-not-predicted {
    background: #f1f5f9;
    color: #475569;
}

.my-prediction-box {
    border-radius: 16px;
    border: 1px dashed #cbd5e1;
    background: #ffffff;
    padding: 12px 14px;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
}

/* ورود نرم کارت‌ها */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.match-card,
.section-card,
.my-score-card {
    animation: fadeUp 0.45s ease both;
}

    /* زنده‌تر شدن کارت بازی */
    .match-card::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 35%);
        opacity: 0;
        transition: 0.25s;
        pointer-events: none;
    }

    .match-card:hover::before {
        opacity: 1;
    }

/* ضربان ملایم برای وضعیت فعال */
@keyframes softPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.35);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(22, 163, 74, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
    }
}

.time-alert {
    position: relative;
    animation: softPulse 2.2s infinite;
}

/* گزینه انتخابی زنده‌تر */
.prediction-option label {
    position: relative;
    overflow: hidden;
}

    .prediction-option label::after {
        content: "";
        position: absolute;
        width: 80px;
        height: 80px;
        background: rgba(255,255,255,0.22);
        border-radius: 50%;
        top: -30px;
        left: -30px;
        opacity: 0;
        transition: 0.25s;
    }

.prediction-option input:checked + label::after {
    opacity: 1;
}

.prediction-option input:checked + label {
    transform: translateY(-2px) scale(1.02);
}

    /* نمایش انتخاب کاربر */
    .prediction-option input:checked + label .prediction-icon {
        animation: selectedPop 0.28s ease;
    }

@keyframes selectedPop {
    0% {
        transform: scale(0.7) rotate(-8deg);
    }

    70% {
        transform: scale(1.15) rotate(4deg);
    }

    100% {
        transform: scale(1) rotate(0);
    }
}

/* متن محاوره‌ای بالای بازی‌ها */
.friendly-note {
    border-radius: 18px;
    background: linear-gradient(135deg, #eef2ff, #ffffff);
    border: 1px solid #dbeafe;
    padding: 16px;
}

.friendly-note-icon {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: #2563eb;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

/* زمان باقی‌مانده */
.deadline-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 800;
}

/* وضعیت نتیجه */
.live-result-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 800;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: dotPulse 1.3s infinite;
}

@keyframes dotPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

/* Toast خودمان */
.custom-toast {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 9999;
    min-width: 280px;
    max-width: 380px;
    border-radius: 18px;
    padding: 16px 18px;
    color: white;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s;
}

    .custom-toast.show {
        opacity: 1;
        transform: translateY(0);
    }

    .custom-toast.success {
        background: linear-gradient(135deg, #16a34a, #15803d);
    }

    .custom-toast.error {
        background: linear-gradient(135deg, #dc2626, #991b1b);
    }

    .custom-toast.warning {
        background: linear-gradient(135deg, #f59e0b, #b45309);
    }

    .custom-toast.info {
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
    }

.toast-title {
    font-weight: 900;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 13px;
    opacity: 0.9;
}

/* دکمه‌ها نرم‌تر */
.btn {
    border-radius: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: none;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
    }

/* ظاهر ورودی‌ها */
.form-control {
    border-radius: 14px;
    border-color: #dbe3ef;
}

    .form-control:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    }

.auth-loading-box {
    border-radius: 18px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
}

.auth-spinner {
    width: 34px;
    height: 34px;
    border: 4px solid rgba(255,255,255,0.25);
    border-top-color: #facc15;
    border-radius: 50%;
    animation: authSpin 0.8s linear infinite;
}

@keyframes authSpin {
    to {
        transform: rotate(360deg);
    }
}

.login-status-box.loading {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
}

.admin-result-card {
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #ffffff;
    padding: 18px;
    transition: all 0.25s ease;
}

    .admin-result-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    }

.admin-result-team {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

    .admin-result-team img {
        width: 34px;
        height: 24px;
        object-fit: cover;
        border-radius: 6px;
        border: 1px solid #e5e7eb;
    }

.score-input {
    width: 78px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid #d1d5db;
    text-align: center;
    font-size: 20px;
    font-weight: 800;
}

    .score-input:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    }

.result-status-finished {
    background: #dcfce7;
    color: #166534;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
}

.result-status-pending {
    background: #fef3c7;
    color: #92400e;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
}

.admin-result-vs {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #f1f5f9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #475569;
}

.submit-attention {
    animation: submitPulse 0.55s ease-in-out 3;
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.18);
}

@keyframes submitPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
    }

    100% {
        transform: scale(1);
    }
}

.submit-help-box {
    border-radius: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 12px 14px;
    font-size: 14px;
}

/* موبایل */
@media (max-width: 768px) {
    .custom-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .prediction-grid,
    .prediction-grid.two-options {
        grid-template-columns: 1fr;
    }

    .team-box {
        min-height: 110px;
    }

    .flag {
        width: 48px;
        height: 48px;
    }

    .vs-badge {
        width: 46px;
        height: 46px;
        font-size: 13px;
    }

    .hero {
        padding: 32px 0;
    }
}

/* Same visual style as the previous remote FlagCDN flags 
.flag,
.admin-result-team img {
    width: 40px;
    height: auto;
    max-height: 28px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
}*/

/* If you want all flags to have one exact box size, use this instead: */
.flag,
.admin-result-team img {
    width: 42px;
    height: 28px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.history-match-card {
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #ffffff;
    padding: 18px;
    height: 100%;
    transition: all 0.25s ease;
}

    .history-match-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    }

.history-team {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

    .history-team img {
        width: 34px;
        height: auto;
        max-height: 24px;
        object-fit: contain;
        border-radius: 6px;
        border: 1px solid #e5e7eb;
        background: #fff;
    }

.history-score {
    font-size: 22px;
    font-weight: 900;
    color: #111827;
}

.history-info-box {
    border-radius: 16px;
    background: #f8fafc;
    padding: 12px;
}

.history-point {
    min-width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #eff6ff;
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
}