@font-face {
    font-family: 'Vazir';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* Added */
}

/* Default to light theme */
:root {
    --bg-primary: #f3f4f6; /* gray-100 */
    --bg-secondary: #ffffff; /* white */
    --bg-tertiary: #e5e7eb; /* gray-200 */
    --bg-muted: #f9fafb; /* gray-50 */
    --bg-overlay: rgba(15, 23, 42, 0.7); /* slate-900 with opacity for light hero countdown */
    --text-primary: #1f2937; /* gray-800 */
    --text-secondary: #4b5563; /* gray-600 */
    --text-muted: #6b7280; /* gray-500 */
    --text-accent: #ef4444; /* red-500 */
    --border-primary: #d1d5db; /* gray-300 */
    --border-secondary: #e5e7eb; /* gray-200 */
    --hero-blend-mode: multiply;
    --header-bg: #f9fafb; /* Light gray for header */
    --header-text: #1f2937;
    --modal-bg: #ffffff;
    --modal-text-primary: #1f2937;
    --modal-text-secondary: #6b7280;
    --input-bg: #f3f4f6;
    --input-border: #d1d5db;
    --input-text: #1f2937;
    --button-primary-bg: #ef4444; /* red-500 */
    --button-primary-hover-bg: #dc2626; /* red-600 */
    --button-text-color: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1); /* Added for general shadow */
}

html.dark {
    --bg-primary: #0f172a; /* slate-900 */
    --bg-secondary: #1e293b; /* slate-800 */
    --bg-tertiary: #334155; /* slate-700 */
    --bg-muted: #111827; /* gray-900 */
    --bg-overlay: rgba(15, 23, 42, 0.85); /* slate-900 with more opacity for dark hero countdown */
    --text-primary: #e2e8f0; /* slate-200 */
    --text-secondary: #9ca3af; /* gray-400 */
    --text-muted: #6b7280; /* gray-500 */ /* Note: This gray might be too dark on dark backgrounds, consider a lighter gray like gray-400 or gray-300 from Tailwind for dark mode muted text */
    --text-accent: #f87171; /* red-400 */
    --border-primary: #4b5563; /* gray-600 */
    --border-secondary: #374151; /* gray-700 */
    --hero-blend-mode: screen; /* Or consider 'lighten' or removing blend for dark */
    --header-bg: #111827; /* Dark gray for header */
    --header-text: #e2e8f0;
    --modal-bg: #1e293b; /* slate-800 */
    --modal-text-primary: #e2e8f0;
    --modal-text-secondary: #9ca3af;
    --input-bg: #334155; /* slate-700 */
    --input-border: #4b5563; /* gray-600 */
    --input-text: #e2e8f0;
    --button-primary-bg: #f87171; /* red-400 */
    --button-primary-hover-bg: #ef4444; /* red-500 */
    --button-text-color: #111827; /* Dark text for light red button */
    --shadow-color: rgba(0,0,0, 0.4); /* Darker shadow for dark mode */
}

body {
    font-family: 'Vazir', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    scroll-behavior: smooth;
    transition: background-color 0.3s, color 0.3s;
}

.hero-pattern {
    background-image: url('https://images.unsplash.com/photo-1542751371-adc38448a05e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80');
    background-size: cover;
    background-position: center;
    background-blend-mode: var(--hero-blend-mode);
}
html.dark .hero-pattern {
     background-color: rgba(0,0,0,0.6); /* Darker overlay for dark mode */
}

.countdown-box {
    background: var(--bg-overlay);
    backdrop-filter: blur(10px); /* Increased blur */
    border: 1px solid var(--border-secondary); /* Use variable */
    box-shadow: 0 4px 15px var(--shadow-color); /* Use variable */
}
/* Ensure text inside countdown is consistently visible */
.countdown-box .text-white { color: #fff !important; } /* Important to override Tailwind if needed */
.countdown-box .text-gray-300 { color: #d1d5db !important; } /* Light mode label color */
html.dark .countdown-box .text-gray-400 { color: #9ca3af !important; } /* Dark mode label color */


.tournament-card {
    background-color: var(--bg-secondary);
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    box-shadow: 0 5px 15px var(--shadow-color); /* Use variable */
}
.tournament-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px color-mix(in srgb, var(--text-accent) 40%, transparent); /* Use variable */
}

.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--text-accent);
    transition: width 0.3s;
}
.nav-link:hover::after { width: 100%; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-tertiary); }
::-webkit-scrollbar-thumb { background: var(--text-accent); border-radius: 4px; }

.team-list-item { /* Base for team list items if needed */
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.team-list-item:hover {
    background-color: color-mix(in srgb, var(--text-accent) 10%, transparent);
    transform: translateX(-5px); /* Or scale(1.02) or other subtle effect */
}
/* html.dark .team-list-item:hover {
    background-color: rgba(248, 113, 113, 0.15); // Already handled by color-mix and variables
} */

/* FAQ Accordion (Main one if it exists, and the one in about section) */
.faq-item { /* Ensure this class is used in HTML if targeted by JS for a main FAQ */
    background-color: var(--bg-secondary); /* Or var(--bg-muted) for slight difference */
    border-radius: 0.5rem; /* rounded-lg */
    overflow: hidden;
    box-shadow: 0 2px 4px var(--shadow-color);
}
.faq-question {
    /* Tailwind classes are mostly used, but ensure text color here */
    color: var(--text-primary);
    background-color: transparent; /* ensure no override from other styles if any */
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    padding: 1.25rem; /* p-5 */
}
.faq-question:hover {
    background-color: var(--bg-muted);
}
.faq-question .fa-chevron-down {
    transition: transform 0.3s ease-in-out;
    color: var(--text-accent);
}
.faq-question.open .fa-chevron-down {
    transform: rotate(180deg);
}

.faq-answer { /* This is the one targeted by JS */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding-top 0.4s ease-out, padding-bottom 0.4s ease-out, opacity 0.3s ease-out;
    padding-right: 1.25rem; /* px-5 */
    padding-left: 1.25rem; /* px-5 */
    padding-top: 0;
    padding-bottom: 0;
    color: var(--text-secondary);
    opacity: 0;
    border-top: 1px solid var(--border-secondary);
}
.faq-answer.open {
    max-height: 500px; /* Adjust as needed */
    padding-top: 0.5rem; /* pt-2 */
    padding-bottom: 1.25rem; /* pb-5 */
    opacity: 1;
}


.modal { transition: opacity 0.3s ease, visibility 0.3s ease; }
.modal.hidden { opacity: 0; visibility: hidden; }
.modal.flex { opacity: 1; visibility: visible; }

.input-error { border-color: var(--text-accent) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--text-accent) 30%, transparent) !important; }


/* General element styling using CSS variables */
.header-sticky { background-color: var(--header-bg); color: var(--header-text); box-shadow: 0 2px 10px var(--shadow-color); }
.section-bg-primary { background-color: var(--bg-primary); }
.section-bg-secondary { background-color: var(--bg-secondary); }
.section-bg-tertiary { background-color: var(--bg-tertiary); }
/* Text color utilities (could be redundant if using Tailwind extensively) */
/* .text-primary { color: var(--text-primary); } */
/* .text-secondary { color: var(--text-secondary); } */
/* .text-muted { color: var(--text-muted); } */
/* .text-accent { color: var(--text-accent); } */
.border-primary { border-color: var(--border-primary); }
.border-secondary { border-color: var(--border-secondary); }

.modal-content-area { background-color: var(--modal-bg); color: var(--modal-text-primary); box-shadow: 0 10px 30px var(--shadow-color); }
.modal-text-secondary { color: var(--modal-text-secondary); }

.form-input {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border); /* Use a variable for border */
    color: var(--input-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus {
    border-color: var(--text-accent); /* Use accent color for focus */
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-accent) 25%, transparent); /* Adjusted focus ring */
    outline: none;
}
.form-input::placeholder { color: var(--text-muted); opacity: 0.7; }

.btn-primary {
    background-color: var(--button-primary-bg);
    color: var(--button-text-color);
    transition: background-color 0.2s ease, transform 0.1s ease;
}
.btn-primary:hover {
    background-color: var(--button-primary-hover-bg);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0px); }


.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--text-accent);
    color: var(--text-accent);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}
.btn-secondary:hover {
    background-color: var(--text-accent);
    color: var(--button-text-color); /* Ensure text color changes for contrast */
    transform: translateY(-1px);
}
html.dark .btn-secondary:hover { /* Ensure contrast on dark theme */
    color: var(--button-text-color);
}
.btn-secondary:active { transform: translateY(0px); }


/* Theme toggle button icons */
#theme-toggle-btn .fa-sun { display: none; }
html.dark #theme-toggle-btn .fa-moon { display: none; }
html.dark #theme-toggle-btn .fa-sun { display: inline-block; }

/* Gradient override for newsletter - already present in user's code, ensure it uses variables if possible or is okay as is */
.bg-gradient-to-r.from-red-800\/80.to-orange-800\/80 { /* Tailwind classes might be escaped like this if generated */
   /* background-image: linear-gradient(to right, rgba(153, 27, 27, 0.8), rgba(194, 65, 12, 0.8)); */
   /* Better to use variables or let Tailwind handle if possible */
}
html.dark .bg-gradient-to-r.from-red-800\/80.to-orange-800\/80 {
   /* background-image: linear-gradient(to right, rgba(153, 27, 27, 0.9), rgba(194, 65, 12, 0.9)); */
}

/* Body background and text color fix: remove from inline style on <body> and let these rules apply */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Vazir', sans-serif;
    scroll-behavior: smooth;
    transition: background-color 0.3s, color 0.3s;
}
/* Remove class="bg-slate-100 text-slate-800" from body tag in HTML */