:root {
    --primary: #3dbaee;
    --primary-dark: #2196c9;
    --primary-light: #7dd3f5;
    --secondary: #7a86f5;
    --secondary-light: #9aa3ff;
    --bg-light: #f5f9f6;
    --bg-card: #ffffff;
    --text-dark: #1c2a22;
    --text-muted: #6b7a72;
    --border-color: rgba(28, 42, 34, 0.08);
    --gradient-primary: linear-gradient(135deg, #3dbaee 0%, #6bc5f0 50%, #7a86f5 100%);
    --shadow-soft: 0 4px 20px rgba(61, 186, 238, 0.10);
    --shadow-glow: 0 12px 36px rgba(61, 186, 238, 0.20);
    --border-radius: 16px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        "Vazirmatn",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

body[dir="ltr"] {
    font-family:
        "Segoe UI",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
}

/* Animated Background */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(61, 186, 238, 0.10) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(122, 134, 245, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(125, 211, 245, 0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(28, 42, 34, 0.06);
    z-index: 1000;
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.logo-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 10px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.95rem;
}

nav a:hover,
nav a.active {
    color: var(--primary-dark);
    background: rgba(61, 186, 238, 0.12);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 5px;
    background: rgba(28, 42, 34, 0.05);
    padding: 5px;
    border-radius: 10px;
    margin-inline-end: 15px;
}

.lang-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.lang-btn.active {
    background: var(--gradient-primary);
    color: white;
}

.lang-btn:hover:not(.active) {
    color: var(--text-dark);
}

/* Hero Section */
.hero {
    padding: 10rem 0 0 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(61, 186, 238, 0.14) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(122, 134, 245, 0.12);
    border: 1px solid rgba(122, 134, 245, 0.3);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 25px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 10px;
}

/* Sections */
section {
    padding-bottom: 4rem;
}

.section-header {
    text-align: center;
    margin: 50px 0;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 28px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.tab-btn:hover {
    border-color: rgba(61, 186, 238, 0.4);
    color: var(--text-dark);
}

.tab-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.cards-grid-wide {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
    gap: 25px;
}

/* Match Card */
.match-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.match-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.match-card:hover {
    transform: translateY(-5px);
    border-color: rgba(61, 186, 238, 0.3);
    box-shadow: var(--shadow-glow);
}

.match-card:hover::before {
    opacity: 1;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.match-group {
    background: rgba(61, 186, 238, 0.12);
    padding: 5px 12px;
    border-radius: 20px;
    color: var(--primary-dark);
    font-weight: 600;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.match-team {
    flex: 1;
    text-align: center;
}

.team-flag {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 8px rgba(28, 42, 34, 0.15);
}

.team-name {
    font-weight: 600;
    font-size: 1rem;
    display: block;
}

.match-vs {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-muted);
    padding: 0 15px;
}

.match-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.score {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.match-info {
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.match-stadium {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Today highlight */
.match-card.today {
    border-color: rgba(122, 134, 245, 0.4);
    background: linear-gradient(135deg, rgba(122, 134, 245, 0.08), rgba(122, 134, 245, 0.02));
}

.match-card.today::before {
    background: linear-gradient(90deg, #7a86f5, #9aa3ff);
    opacity: 1;
}

.today-badge {
    background: linear-gradient(135deg, #7a86f5, #9aa3ff);
    color: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-inline-start: 8px;
}

/* Live indicator */
.match-card.live {
    border-color: rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.07), rgba(239, 68, 68, 0.02));
    animation: livePulse 2s ease-in-out infinite;
}

.match-card.live::before {
    background: linear-gradient(90deg, #ef4444, #f43f5e);
    opacity: 1;
}

@keyframes livePulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.25);
    }

    50% {
        box-shadow: 0 0 15px 5px rgba(239, 68, 68, 0.12);
    }
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #ef4444, #f43f5e);
    color: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    animation: liveBadgePulse 1.5s ease-in-out infinite;
}

.live-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: liveDot 1s ease-in-out infinite;
}

@keyframes liveBadgePulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

@keyframes liveDot {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.7);
    }
}

/* Upcoming Matches Section */
.upcoming-section {
    padding: 60px 0 0;
}

.upcoming-section .section-header {
    margin-bottom: 40px;
}

.upcoming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 0;
}

.upcoming-card {
    background: var(--bg-card);
    border: 1px solid rgba(61, 186, 238, 0.20);
    border-radius: var(--border-radius);
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.upcoming-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 1;
}

.upcoming-card:hover {
    transform: translateY(-5px);
    border-color: rgba(61, 186, 238, 0.4);
    box-shadow: var(--shadow-glow);
}

.upcoming-label {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.upcoming-countdown {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    background: rgba(122, 134, 245, 0.12);
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.upcoming-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 20px 0 16px;
}

.upcoming-team {
    flex: 1;
    text-align: center;
}

.upcoming-team img {
    width: 56px;
    height: 38px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    margin: 0 auto 8px;
    box-shadow: 0 2px 8px rgba(28, 42, 34, 0.15);
}

.upcoming-team span {
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
}

.upcoming-vs {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-muted);
    padding: 0 8px;
    flex-shrink: 0;
}

.upcoming-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.upcoming-meta .upcoming-date {
    font-weight: 600;
    color: var(--secondary);
}

/* Group Table */
.group-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.group-card:hover {
    border-color: rgba(61, 186, 238, 0.3);
    box-shadow: var(--shadow-glow);
}

.group-header {
    background: var(--gradient-primary);
    padding: 20px 25px;
    font-weight: 700;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
}

.group-header .group-icon {
    font-size: 1.5rem;
}

.group-table {
    width: 100%;
    border-collapse: collapse;
}

.group-table thead {
    background: rgba(61, 186, 238, 0.07);
}

.group-table th {
    padding: 14px 12px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(61, 186, 238, 0.25);
}

.group-table th:first-child {
    text-align: right;
    padding-right: 20px;
}

[dir="ltr"] .group-table th:first-child {
    text-align: left;
    padding-left: 20px;
    padding-right: 12px;
}

.group-table td {
    padding: 16px 12px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.group-table tr:last-child td {
    border-bottom: none;
}

.group-table tbody tr {
    transition: var(--transition);
}

.group-table tbody tr:hover {
    background: rgba(61, 186, 238, 0.07);
}

/* Qualify positions styling */
.group-table tbody tr:nth-child(1),
.group-table tbody tr:nth-child(2) {
    background: rgba(122, 134, 245, 0.06);
}

.group-table tbody tr:nth-child(1):hover,
.group-table tbody tr:nth-child(2):hover {
    background: rgba(122, 134, 245, 0.12);
}

.group-table .rank {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
}

.group-table .rank-1,
.group-table .rank-2 {
    background: rgba(122, 134, 245, 0.18);
    color: var(--secondary);
}

.group-table .rank-3,
.group-table .rank-4 {
    background: rgba(28, 42, 34, 0.05);
    color: var(--text-muted);
}

.group-table .team-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: right;
}

[dir="ltr"] .group-table .team-cell {
    text-align: left;
}

.group-table .team-cell img {
    width: 32px;
    height: 22px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(28, 42, 34, 0.15);
}

.group-table .team-cell .team-name-text {
    font-weight: 500;
}

.group-table .pts-cell {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.group-table .stat-positive {
    color: #16a34a;
}

.group-table .stat-negative {
    color: #ef4444;
}

.group-table .stat-zero {
    color: var(--text-muted);
}

/* Stadium Card */
.stadium-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.stadium-card:hover {
    transform: translateY(-5px);
    border-color: rgba(61, 186, 238, 0.3);
    box-shadow: var(--shadow-glow);
}

.stadium-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.stadium-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stadium-city {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.stadium-capacity {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(122, 134, 245, 0.12);
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--secondary);
    font-weight: 600;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(28, 42, 34, 0.08);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        display: none;
    }

    header {
        padding: 10px 0;
    }

    .header-content {
        gap: 10px;
    }

    .logo {
        font-size: 1.1rem;
        gap: 8px;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    .lang-switcher {
        margin-inline-end: 0;
        padding: 3px;
    }

    .lang-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .hero {
        padding-top: 6rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 14px;
    }

    #utc3-countries {
        font-size: 0.8rem;
        gap: 0.35rem;
    }

    .section-header {
        margin: 30px 0;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .section-header p {
        font-size: 0.9rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cards-grid-wide {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .upcoming-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .match-teams {
        gap: 10px;
    }

    .group-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .group-table th,
    .group-table td {
        padding: 10px 6px;
        font-size: 0.8rem;
    }

    .group-table .team-cell img {
        width: 24px;
        height: 16px;
    }

    .group-header {
        padding: 14px 16px;
        font-size: 1.05rem;
    }

    .tabs {
        gap: 6px;
        margin-bottom: 24px;
    }

    .tab-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .match-card,
    .upcoming-card,
    .stadium-card {
        padding: 18px 14px;
    }

    .team-flag {
        width: 48px;
        height: 32px;
    }

    .team-name {
        font-size: 0.85rem;
    }

    .match-vs {
        font-size: 1.2rem;
        padding: 0 8px;
    }

    .score {
        font-size: 2rem;
    }

    .stadium-icon {
        font-size: 2.2rem;
    }

    .stadium-name {
        font-size: 1.1rem;
    }

    .container {
        padding: 0 12px;
    }
}

/* No data state */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-data-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

#utc3-countries{
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: center;
}