/* --- 1. BIẾN MÀU SẮC CHỦ ĐẠO --- */
:root {
    --bg-dark: #0d1117;
    --bg-nav: #12181f;
    --card-bg: #1a222c;
    --color-grass: #4ade80;   /* Xanh lá cỏ tươi mới */
    --color-royal: #4169e1;   /* Xanh hoàng gia chuyên nghiệp */
    --color-logout: #ff4d4d;  /* Đỏ cho nút đăng xuất */
    --text-white: #ffffff;
    --text-gray: #9ca3af;
    --border-color: #2d3748;
}

/* --- 2. THIẾT LẬP CƠ BẢN --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- 3. THANH ĐIỀU HƯỚNG (NAVBAR) --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background-color: var(--bg-nav);
    border-bottom: 1px solid #1f2937;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-text {
    color: var(--color-grass);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Style chung cho link và nút menu */
.nav-links > a, 
.dropdown > a,
.user-logged-in {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 15px;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Hover chung cho navbar */
.nav-links > a:hover, 
.dropdown > a:hover {
    color: var(--text-white);
    background-color: rgba(74, 222, 128, 0.1);
}

/* Trạng thái đang kích hoạt (Active) */
.nav-links > a.active, 
.dropdown > a.active {
    background-color: var(--color-royal);
    color: var(--text-white);
}

/* --- 4. DROPDOWN "GAME" --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--card-bg);
    min-width: 180px;
    box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.6);
    z-index: 10;
    border-radius: 10px;
    top: 100%;
    left: 0;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.dropdown-content a {
    color: var(--text-gray);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dropdown-content a:hover {
    background-color: #242f3d;
    color: var(--color-grass);
    padding-left: 22px;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Icon mũi tên */
.dropdown-btn::after, .arrow-down {
    content: ' ▼';
    font-size: 9px;
    margin-left: 8px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-btn::after,
.user-menu:hover .arrow-down {
    transform: rotate(180deg);
}

/* --- 5. MENU NGƯỜI DÙNG & ĐĂNG XUẤT (USER MENU) --- */
.user-menu {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.user-logged-in {
    color: var(--color-grass) !important; /* Luôn nổi bật màu xanh cỏ */
}

.user-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--card-bg);
    min-width: 140px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    z-index: 100;
    margin-top: 8px; /* Khoảng hở thẩm mỹ */
    overflow: hidden;
}

/* CẦU NỐI TÀNG HÌNH: Sửa lỗi menu biến mất khi di chuột qua khoảng hở */
.user-dropdown-content::before {
    content: "";
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

.user-dropdown-content a.logout-item {
    color: var(--color-logout);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    text-align: center;
    font-weight: 700;
    transition: 0.2s ease;
}

.user-dropdown-content a.logout-item:hover {
    background-color: rgba(255, 77, 77, 0.1);
    color: #ff3333;
}

.user-menu:hover .user-dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

/* --- 6. KHU VỰC HERO SECTION --- */
.hero-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    text-align: center;
    padding: 60px 20px;
}

.hero-title {
    color: var(--color-grass);
    font-size: clamp(40px, 10vw, 85px);
    font-weight: 900;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.2);
}

.hero-subtitle {
    color: var(--text-gray);
    font-size: 19px;
    margin-bottom: 50px;
    max-width: 700px;
}

/* --- 8. HIỆU ỨNG ANIMATION --- */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* --- BUTTONS --- */
.hero-actions {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    z-index: 100;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    font-size: 15px;
}

.btn-discord {
    background: #5865F2;
    color: white;
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.4);
}

.btn-donate {
    background: #4ade80;
    color: #0d1117;
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
}

.btn-action img { width: 20px; height: 20px; }

.btn-action:hover {
    transform: translateY(-3px) scale(1.05);
    filter: brightness(1.1);
}

/* --- DONATE MODAL --- */
.modal-overlay {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    justify-content: center; align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #161b22;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #30363d;
    text-align: center;
    width: 90%; max-width: 400px;
    position: relative;
    color: white;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.qr-container {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin: 20px 0;
    display: inline-block;
}

.qr-image { width: 200px; height: 200px; display: block; }

.modal-close {
    position: absolute; top: 15px; right: 15px;
    background: none; border: none; color: #8b949e;
    font-size: 20px; cursor: pointer;
}

.wallet-address {
    font-size: 14px;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    padding: 10px;
    border-radius: 8px;
}

