:root {
    --bg-dark: #071307;
    --sidebar-bg: #0b1f0b;
    --card-green: #113611;
    --card-green-light: #1c521c;
    --gold: #d4a843;
    --gold-light: #f6d173;
    --gold-dark: #a37c22;
    --text-white: #ffffff;
    --text-gray: #aab6aa;
    --font-main: 'Lexend', sans-serif;
    --sidebar-width: 290px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography & Utilities */
.gold-text { color: var(--gold); }
.white-text { color: var(--text-white); }

/* Layout App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Mobile Header (Hidden on Desktop) */
.mobile-header {
    display: none; /* See responsive.css for mobile display */
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid rgba(212, 168, 67, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-auth {
    display: flex;
    gap: 8px;
}

.mobile-auth .btn-sm {
    padding: 8px 12px;
    font-size: 0.8rem;
    border-radius: 15px;
    text-transform: uppercase;
}

.menu-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--gold);
    border-radius: 3px;
    transition: all 0.3s;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid rgba(212, 168, 67, 0.2);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh; /* Thu gọn vừa màn hình */
    z-index: 200;
    box-shadow: 2px 0 15px rgba(212, 168, 67, 0.05);
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    color: var(--text-white);
    cursor: pointer;
    z-index: 10;
}

/* Sidebar Logo */
.sidebar-header {
    padding: 15px 15px 5px;
    flex-shrink: 0;
}

.sidebar-logo {
    text-align: center;
    padding: 0;
}

.sidebar-logo-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.main-nav {
    padding: 15px 0;
    flex-grow: 1; /* allow spreading out */
    overflow-y: auto; /* Cho phép cuộn menu */
    overflow-x: hidden;
}

/* Tùy chỉnh thanh cuộn cho menu */
.main-nav::-webkit-scrollbar {
    width: 4px;
}
.main-nav::-webkit-scrollbar-thumb {
    background-color: var(--card-green-light);
    border-radius: 4px;
}

.menu-list {
    list-style: none;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.menu-item a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--text-white);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    background: linear-gradient(180deg, #112a11 0%, #051405 100%);
    border: 1.5px solid rgba(212, 168, 67, 0.35);
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: inset 0px 2px 2px rgba(255,255,255,0.08), 0px 6px 15px rgba(0,0,0,0.5);
}

.menu-item a:hover, .menu-item a.active {
    background: linear-gradient(180deg, #1a451a 0%, #0e2b0e 100%);
    border-color: #fceb98;
    box-shadow: inset 0px 2px 4px rgba(255,255,255,0.2), 0px 0px 25px rgba(212, 168, 67, 0.4);
    transform: scale(1.03);
}

.menu-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 20px;
    width: 36px;
    height: 36px;
}

.menu-text {
    flex-grow: 1;
}

/* Sidebar Footer & Auth Buttons */
.sidebar-footer {
    margin-top: auto;
    padding: 15px;
    padding-bottom: 20px;
    flex-shrink: 0; /* Giữ cố định kích thước footer */
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    text-align: center;
    padding: 14px;
    border-radius: 20px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.btn-login {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
}

.btn-login:hover {
    background: rgba(212, 168, 67, 0.1);
    box-shadow: 0 0 10px rgba(212, 168, 67, 0.3);
}

.btn-register {
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-dark) 100%);
    border: none;
    color: var(--bg-dark);
    box-shadow: 0px 4px 10px rgba(212, 168, 67, 0.3);
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0px 6px 15px rgba(212, 168, 67, 0.5);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
}

/* Desktop Header inside Main */
.desktop-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    margin-top: 25px;
    margin-bottom: 25px;
}

.logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Image Logo styles */
.main-logo-img {
    width: 100%;
    max-width: 550px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    margin-bottom: 12px !important;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.6)); /* Thêm bóng đổ để ảnh nổi khối */
    z-index: 10;
}

/* Header Decorations (Tiền cảnh trái phải) */
.header-decor {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 180px; /* Độ lớn của vật thể tiền cảnh */
    height: auto;
    z-index: 20; /* Nổi lên trên cùng */
    pointer-events: none; /* Không che mất các thao tác click */
    animation: rotateDropShadow 3s linear infinite; /* Thêm vòng xoáy phát sáng */
}

.decor-left {
    right: 50%;
    margin-right: 270px; /* Tăng từ 220px lên 270px để đẩy dạt sang trái nhiều hơn */
}

.decor-right {
    left: 50%;
    margin-left: 270px; /* Chỉnh đối xứng cho bên phải */
}

/* Ribbon Slogan */
.slogan-badge {
    position: relative;
    background: linear-gradient(180deg, #0e4f21 0%, #032109 100%);
    border-radius: 50px; /* Elegant pill shape */
    padding: 6px 40px;
    margin-top: -15px; /* Overlaps SVG base slightly */
    display: inline-block;
    z-index: 15;
    box-shadow: 0 5px 15px rgba(0,0,0,0.6), inset 0 0 0 2px #ffcb3d, inset 0 0 8px rgba(255, 203, 61, 0.4);
}

/* Text bên trong ribbon */
.slogan-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffe894; /* Solid pale gold text */
    text-shadow: 0 2px 3px rgba(0,0,0,0.9);
    letter-spacing: 0.5px;
}

/* Promo Grid */
.promo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 24px;
    align-items: end; /* Neo ở đáy để các dòng luôn bằng nhau */
    flex-grow: 1;
    margin-top: 60px; /* Chừa dòng thò lên trên */
}

/* Two-layer Promo Card */
.promo-card-two-layer {
    display: block;
    width: 100%;
    position: relative;
    text-decoration: none;
    cursor: pointer;
}

.promo-bg {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.5));
    transition: transform 0.4s ease, filter 0.4s ease;
    position: relative;
    z-index: 1;
}

.promo-char {
    position: absolute;
    bottom: -2%; /* Cho phép chân nhân vật lấn nhẹ xuống sát mép */
    right: 0;
    height: 135%; /* Nhân vật cao vượt khung nền */
    width: auto;
    max-width: 55%; /* Không làm che khuất chữ trên hình bên trái */
    object-fit: contain;
    animation: rotateDropShadow 3s linear infinite;
    transition: transform 0.4s ease;
    z-index: 5;
    pointer-events: none; /* Không cản bấm chuột */
}

/* Nhân vật bên trái (item lẻ: đá gà, casino, nạp lại) */
.promo-char-left {
    right: auto;
    left: -10px;
}

/* Nhân vật nhỏ hơn (casino, nạp lại) */
.promo-char-sm {
    height: 100%;
    bottom: 3%;
}

.promo-card-two-layer:hover .promo-bg {
    transform: translateY(-4px) scale(1.02);
    /* Giữ nguyên cái glow vàng cho background để ngầu */
    filter: drop-shadow(0 15px 25px rgba(212, 168, 67, 0.3));
}

.promo-card-two-layer:hover .promo-char {
    transform: translateY(-10px) scale(1.06);
    /* Khi hover thì cường độ sáng mạnh hơn xíu */
    animation: rotateDropShadowHover 2s linear infinite;
}



/* Footer Ticker */
.main-footer {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    height: 48px;
    background: linear-gradient(180deg, var(--card-green-light) 0%, var(--card-green) 100%);
    border-top: 2px solid var(--gold);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.5), inset 0 2px 10px rgba(212, 168, 67, 0.2);
    display: flex;
    align-items: center; /* Center children vertically */
    justify-content: space-between;
    z-index: 50;
}

.ticker-wrap {
    flex-grow: 1; /* Takes all available space between the stars */
    height: 100%;
    display: flex;
    align-items: center;
    overflow: hidden; /* Hide text here so it never overlaps stars */
    position: relative;
}

.ticker-heading, .ticker-tail {
    padding: 0 20px;
    color: var(--gold);
    font-size: 1.5rem;
    z-index: 2;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 0 10px rgba(212, 168, 67, 0.8);
    height: 100%;
}

.ticker {
    display: flex;
    align-items: center;
    animation: tickerAnim 15s linear infinite;
    white-space: nowrap;
}

.ticker__item {
    padding: 0 30px;
    color: var(--gold);
    font-size: 1.15rem;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

@keyframes tickerAnim {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* Spacer for main content so it doesn't overlap footer */
.main-content {
    padding-bottom: 60px; 
}

/* Specific shift for the rooster (Đá Gà) */
img.promo-char.char-shift-left { 
    left: -70px !important; 
}

/* Hiệu ứng drop-shadow ánh vàng chạy quanh viền nhân vật */
@keyframes rotateDropShadow {
    0%   { filter: drop-shadow(  0px -15px 20px rgba(212, 168, 67, 0.6)); }
    25%  { filter: drop-shadow( 15px   0px 20px rgba(212, 168, 67, 0.6)); }
    50%  { filter: drop-shadow(  0px  15px 20px rgba(212, 168, 67, 0.6)); }
    75%  { filter: drop-shadow(-15px   0px 20px rgba(212, 168, 67, 0.6)); }
    100% { filter: drop-shadow(  0px -15px 20px rgba(212, 168, 67, 0.6)); }
}

@keyframes rotateDropShadowHover {
    0%   { filter: drop-shadow(  0px -20px 30px rgba(212, 168, 67, 0.9)); }
    25%  { filter: drop-shadow( 20px   0px 30px rgba(212, 168, 67, 0.9)); }
    50%  { filter: drop-shadow(  0px  20px 30px rgba(212, 168, 67, 0.9)); }
    75%  { filter: drop-shadow(-20px   0px 30px rgba(212, 168, 67, 0.9)); }
    100% { filter: drop-shadow(  0px -20px 30px rgba(212, 168, 67, 0.9)); }
}

/* Messenger Popup */
.messenger-popup {
    position: fixed;
    bottom: 70px; /* Above the ticker */
    right: 25px;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 107%, #00B2FF 0%, #006AFF 50%, #006AFF 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 106, 255, 0.4);
    transition: all 0.3s ease;
    animation: messengerPulse 2s infinite;
}

.messenger-popup:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 106, 255, 0.6);
}

@keyframes messengerPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 106, 255, 0.6);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(0, 106, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 106, 255, 0);
    }
}
