:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --text-color: #2b2d42;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --header-bg: linear-gradient(135deg, #4361ee, #3f37c9, #4895ef);
    --footer-bg: #2b2d42;
    --border-color: rgba(0, 0, 0, 0.08);
    --success-color: #4cc9f0;
    --warning-color: #f72585;
}

[data-theme="dark"] {
    --primary-color: #4895ef;
    --secondary-color: #4361ee;
    --accent-color: #4cc9f0;
    --text-color: #f8f9fa;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --header-bg: linear-gradient(135deg, #121212, #2b2d42, #121212);
    --footer-bg: #121212;
    --border-color: rgba(255, 255, 255, 0.08);
}

/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    background-image: url("../image/bg_home_optimized.webp");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    overflow-x: hidden;
    a {
        text-decoration: none;
        color: var(--primary-color);
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--card-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* User Count */
.user-count {
    position: fixed;
    top: 100px;
    /* Ngay dưới header (height của header là 70px) */
    right: 15px;
    z-index: 999;
    /* Dưới header (z-index: 1000) nhưng trên nội dung */
    background: var(--bg-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-count i {
    font-size: 0.9rem;
    color: #4361ee;
}

/* Header */
header {
    display: flex;
    padding: 0 5%;
    width: 100%;
    background: var(--header-bg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    align-items: center;
    justify-content: space-between;
    height: 80px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img {
    height: 45px;
    width: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: rotate(15deg);
}

.logo span {
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.logo span div {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.9;
}

nav ul {
    display: flex;
    list-style-type: none;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: all 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

nav a:hover {
    color: white;
}

nav a:hover::after {
    width: 100%;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container input {
    font-size: 0.95rem;
    padding: 8px 15px 8px 35px;
    border-radius: 25px;
    border: none;
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    width: 180px;
    transition: all 0.3s ease;
}

.search-container input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-container input:focus {
    width: 220px;
    background: rgba(255, 255, 255, 0.3);
}

.search-container i {
    position: absolute;
    left: 12px;
    color: white;
    font-size: 0.95rem;
}

.icon-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-icon {
    color: white;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.menu-icon span {
    font-size: 0.9rem;
    color: white;
    font-weight: 500;
}

/* ===== DROPDOWN STYLE IMPROVEMENT ===== */
.dropdown-content {
    display: none;
    position: absolute;
    background: var(--bg-color);
    padding: 10px 0;
    border-radius: 12px;
    right: 0;
    top: 40px;
    min-width: 240px;
    z-index: 100;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(var(--primary-color), 0.1);
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-content.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    display: flex;
    align-items: center;
    color: var(--text-color);
    padding: 12px 24px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Hiệu ứng hover đẹp */
.dropdown-content a:hover {
    background: rgba(var(--primary-color), 0.05);
    color: var(--primary-color);
    padding-left: 28px;
}

/* Hiệu ứng gạch chân động */
.dropdown-content a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 24px;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.dropdown-content a:hover::after {
    width: calc(100% - 48px);
}

/* Hiệu ứng icon */
.dropdown-content a::before {
    content: '→';
    position: absolute;
    left: 10px;
    opacity: 0;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.dropdown-content a:hover::before {
    opacity: 1;
    left: 15px;
}

/* Hiệu ứng mở menu */
@keyframes fadeInDropdown {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-content.show {
    animation: fadeInDropdown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#sign__up {
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#sign__up:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

#theme-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.5s ease;
}

#theme-toggle:hover {
    transform: rotate(30deg) scale(1.1);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 100px 5% 60px;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero span {
    background: linear-gradient(90deg, #f72585, #b5179e, #7209b7, #4361ee, #4cc9f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 50px 0 0;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 25px 30px;
    border-radius: 15px;
    min-width: 160px;
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-item i {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: white;
}

.stat-item span {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
    background: none;
    -webkit-text-fill-color: white;
}

.stat-item p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.5px;
}

/* Main Content */
.main-content {
    padding: 80px 5%;
    background-color: var(--bg-color);
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Events Section */
.events {
    padding: 4rem 2rem;
    background-color: var(--bg-color);
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    bottom: -10px;
    left: 25%;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Thay đổi thành 2 cột */
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.event-card {
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    /* Thêm flex để có layout linh hoạt */
    flex-direction: column;
    height: 100%;
    /* Đảm bảo chiều cao đồng đều */
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.event-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.event-info {
    padding: 1.5rem;
    flex-grow: 1;
    /* Đảm bảo nội dung chiếm hết không gian */
    display: flex;
    flex-direction: column;
}

.event-info h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #7f8c8d;
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.event-info p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    /* Đẩy các nút xuống dưới */
}

.event-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.btn-detail {
    padding: 0.6rem 1.2rem;
    background: #3498db;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-detail:hover {
    background: #2980b9;
}

.btn-register {
    padding: 0.6rem 1.2rem;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-register:hover {
    background: #27ae60;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .events {
        padding: 3rem 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .event-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .event-actions {
        flex-direction: column;
    }

    .btn-detail,
    .btn-register {
        width: 100%;
        text-align: center;
    }
}
/* Clubs Section */
.clubs-section {
    padding: 80px 5%;
    background: rgba(var(--primary-color), 0.05);
}

.clubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.club-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.club-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.club-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 3px solid var(--primary-color);
    transition: transform 0.5s ease;
}

.club-card:hover img {
    transform: rotate(10deg) scale(1.1);
}

.club-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.club-card p {
    color: var(--text-color);
    font-size: 0.95rem;
    margin-bottom: 25px;
    opacity: 0.8;
    line-height: 1.6;
}
.coming-soon {
    position: relative;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.coming-soon:hover {
    opacity: 1;
    transform: translateY(-5px);
}

.coming-soon-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.coming-soon h3 {
    color: #6c5ce7;
    font-size: 24px;
    letter-spacing: 2px;
}

.coming-soon .btn-visit.disabled {
    background: #b2bec3;
    cursor: not-allowed;
}

.countdown {
    margin-top: 10px;
    font-size: 13px;
    color: #636e72;
    font-style: italic;
}
/* Footer */
footer {
    background: var(--footer-bg);
    color: white;
    padding: 80px 5% 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    margin-bottom: 30px;
    span {
        background: linear-gradient(90deg, #f72585, #b5179e, #7209b7, #4361ee, #4cc9f0);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        text-fill-color: transparent;
        font-size: 20px;
    }
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-links a i {
    font-size: 0.8rem;
}

.social-links {
    display: block !important;
    margin-top: 20px;
    
}

.social-links a {
    display: flex;
    align-items: center;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 10px 10px;
    gap : 10px
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.visitor-counter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 15px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== */
/* MOBILE MENU SETTINGS */
/* ==================== */
/* Hide mobile menu by default */
.mobile-menu-toggle,
.mobile-menu,
.mobile-menu-overlay {
    display: none;
}

/* ===================== */
/* IMPROVED MOBILE MENU STYLING */
/* ===================== */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    text-align: left;
    /* Added left alignment */
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #4a5568;
    transition: color 0.2s ease;
}

.mobile-menu-close:hover {
    color: #e53e3e;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu ul li {
    margin-bottom: 0;
    /* Removed spacing between items */
}

.mobile-menu ul li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    /* Adjusted padding */
    color: #2d3748;
    text-decoration: none;
    border-bottom: 1px solid #edf2f7;
    transition: all 0.3s ease;
}

.mobile-menu ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: #4299e1;
}

.mobile-menu ul li a:hover {
    background-color: #ebf8ff;
    color: #3182ce;
}

.mobile-menu ul li a.active {
    background-color: #bee3f8;
    font-weight: 600;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.mobile-menu-overlay.active {
    display: block;
}
/* ============== */
/* MEDIA QUERIES */
/* ============== */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3rem;
        line-height: 1.2;
    }

    .stats-container {
        gap: 20x;
    }

    .stat-item {
        min-width: 140px;
        padding: 20px 25px;
    }

    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .logo img {
        height: 40px;
        width: 40px;
    }

    .logo span {
        font-size: 1.1rem;
    }

    nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin-left: 10px;
        cursor: pointer;
    }

    .mobile-menu.active,
    .mobile-menu-overlay.active {
        display: block;
    }

    .header-controls {
        gap: 15px;
    }

    .search-container {
        display: none;
    }

    .icon-container {
        gap: 10px;
    }

    .hero {
        padding: 80px 20px 50px;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }

    .hero p {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }

    .stat-item {
        padding: 15px 20px;
        min-width: calc(33% - 15px);
        box-sizing: border-box;
    }

    .stat-item i {
        font-size: 2rem;
    }

    .stat-item span {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 25px;
        text-align: left;
        /* Added left alignment */
    }

    .events-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .clubs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .logo span {
        font-size: 1rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .club-card h3 {
        font-size: 1.2rem;
        text-align: left;
        /* Added left alignment */
    }

    .btn-visit,
    .btn-detail,
    .btn-register {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    header {
        padding: 0 12px;
    }

    .logo span div {
        display: none;
    }

    .hero {
        padding: 70px 15px 40px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .stats-container {
        gap: 10px;
    }

    .stat-item {
        min-width: calc(50% - 10px);
        padding: 15px;
    }

    .section-title {
        font-size: 1.8rem;
        text-align: left;
        /* Added left alignment */
    }

    .events-grid,
    .clubs-grid {
        grid-template-columns: 1fr;
    }

    .event-card {
        flex-direction: column;
    }

    .event-card img {
        width: 100%;
        height: auto;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
    }

    .footer-section {
        width: 100%;
    }

    .footer-section h3 {
        text-align: left;
        /* Added left alignment */
    }

    .social-links {
        justify-content: center;
    }

    .user-count {
        font-size: 0.8rem;
        padding: 5px 10px;
        right: 15px;
        top: 100px;
        position: fixed;
        z-index: 999;
    }
}