/* General Styles & Reset */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Playfair+Display:wght@400;700&display=swap');

:root {
    --primary-color: #a0522d; /* Sienna - Nâu đất */
    --secondary-color: #ffcc00; /* Vàng kim */
    --accent-color: #e74c3c; /* Đỏ đô */
    --text-light: #f5f5dc; /* Be nhạt */
    --text-dark: #333;
    --bg-dark: #1a1a1a;
    --border-dark: #444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif; /* Chuyển sang font Roboto */
    line-height: 1.6;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

body.homepage-bg {
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Fixed Particles --- */
.fixed-particles {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}
.fixed-particles::before,
.fixed-particles::after {
    content: '';
    position: absolute;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: moveParticles 15s infinite ease-in-out alternate;
}
.fixed-particles::before { width: 15px; height: 15px; top: 10%; left: 5%; animation-duration: 20s; }
.fixed-particles::after { width: 10px; height: 10px; top: 70%; right: 15%; animation-duration: 18s; }
@keyframes moveParticles {
    0% { transform: translate(0, 0); opacity: 0.5; }
    100% { transform: translate(100px, -100px); opacity: 0.8; }
}

/* --- Header --- */
.main-header {
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.header-container { display: flex; justify-content: space-between; align-items: center; }
.site-logo img { height: 80px; object-fit: contain; }
.main-nav ul { list-style: none; display: flex; margin: 0; padding: 0; }
.main-nav li { margin: 0 15px; }
.main-nav a {
    color: var(--text-light); font-size: 1.1rem; font-weight: bold;
    text-transform: uppercase; padding: 5px 0; position: relative;
}
.main-nav a::after {
    content: ''; position: absolute;
    left: 0; bottom: 0; width: 0; height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}
.main-nav a:hover::after { width: 100%; }
.user-actions { display: flex; align-items: center; gap: 10px; }
.header-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid var(--secondary-color);
    object-fit: cover;
}
.welcome-text {color: var(--text-light);font-weight: bold;}
.btn-action {
    background-color: var(--primary-color); color: white; padding: 8px 18px;
    border-radius: 5px; text-transform: uppercase; font-size: 0.9rem; font-weight: bold;
    border: 1px solid var(--primary-color); transition: all 0.3s ease;
    position: relative; overflow: hidden; z-index: 1;
}
.btn-action:hover {
    background-color: var(--secondary-color); border-color: var(--secondary-color);
    color: var(--text-dark); transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.btn-action.logout { background-color: var(--accent-color); border-color: var(--accent-color); }
.btn-action.logout:hover { background-color: #c0392b; border-color: #c0392b; }

/* --- Hero Section (Banner & Login/User Panel) --- */
.hero-section {
    position: relative; width: 100%; min-height: 90vh;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hero-banner-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; }
.hero-banner-image {
    width: 100%; height: 100%; object-fit: cover; object-position: center;
    filter: brightness(0.7); transform: scale(1.05);
    animation: zoomOut 20s ease-out infinite alternate;
}
@keyframes zoomOut { from { transform: scale(1.05); } to { transform: scale(1); } }
.hero-content-overlay {
    position: relative; z-index: 10;
    display: flex; flex-wrap: wrap; justify-content: space-around;
    align-items: center; gap: 40px; width: 100%; padding: 50px 0;
}
.hero-text-area {
    text-align: center; color: white; text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
    max-width: 600px; animation: fadeIn 2s ease-out;
}
.hero-text-area h1 {
    font-family: 'Playfair Display', serif; font-size: 4.8rem;
    color: var(--secondary-color); margin-bottom: 20px;
    text-transform: uppercase; letter-spacing: 5px;
    animation: slideInUp 1.5s ease-out;
}
.hero-text-area p {
    font-size: 1.6rem; margin-bottom: 40px;
    animation: fadeIn 1.8s ease-out 0.5s forwards; opacity: 0;
}
.btn-download, .btn-small {
    display: inline-block; background-color: var(--accent-color); color: white;
    padding: 15px 40px; border-radius: 50px; text-transform: uppercase;
    font-weight: bold; font-size: 1.2rem; transition: all 0.3s ease;
    border: 2px solid var(--accent-color); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}
.btn-download:hover, .btn-small:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}
.pulse-animation { animation: pulse 2s infinite; }
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    100% { transform: scale(1); box-shadow: 0 0 0 20px rgba(231, 76, 60, 0); }
}

/* --- Login Form & Welcome Panel on Homepage --- */
.login-form-panel, .welcome-back-panel {
    background: url('../images/login_panel_bg.png') no-repeat center center / 100% 100%, rgba(0, 0, 0, 0.85);
    padding: 25px; border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    max-width: 380px; width: 100%;
    border: 2px solid var(--primary-color);
    text-align: center;
    animation: fadeInScale 1s ease-out;
    display: flex; flex-direction: column; gap: 15px;
}
@keyframes fadeInScale { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.login-form-panel h3 { margin-bottom: 10px; }
.welcome-user-info { display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--border-dark); padding-bottom: 15px; }
.welcome-avatar { width: 70px; height: 70px; border-radius: 50%; border: 3px solid var(--secondary-color); object-fit: cover; }
.welcome-user-text h4 { font-size: 1.5rem; color: var(--secondary-color); margin: 0; text-align: left; }
.welcome-user-text p { margin: 0; font-size: 1rem; color: #ccc; text-align: left;}
.player-stats {display: flex;grid-template-columns: repeat(3, 1fr);gap: 10px;justify-items: stretch;flex-direction: column;}
.stat-item { text-align: center; background: rgba(0,0,0,0.3); padding: 10px; border-radius: 5px; }
.stat-item span {display: block;font-size: 0.85rem;color: #ccc;}
.stat-item strong { font-size: 1.2rem; color: var(--text-light); }
.welcome-actions { display: flex; gap: 10px; margin-top: 5px; }
.welcome-actions .btn-form { flex: 1; }
.logout-link-small { text-align: center; font-size: 0.9rem; color: #aaa; text-decoration: underline; }
.logout-link-small:hover { color: var(--accent-color); }

/* --- General Form & Message Styles --- */
.login-form-panel h3, .form-box h2 {
    font-family: 'Playfair Display', serif; color: var(--secondary-color);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5); font-size: 1.8rem;
}
.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { display: block; margin-bottom: 6px; font-weight: bold; color: var(--text-light); }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px 15px; background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-dark); border-radius: 5px;
    color: var(--text-light); font-size: 1rem;
    transition: all 0.3s ease-in-out;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.15); transform: scale(1.02);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.4);
}
/* Gộp các style chung vào lớp .btn-form */
.btn-form {
    display: block;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    text-align: center; /* Thêm căn giữa chữ */
    transition: all 0.3s ease;
}

/* Lớp .submit chỉ còn nhiệm vụ định nghĩa màu sắc chính */
.btn-form.submit {
    background-color: var(--accent-color);
}
.btn-form.submit:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

/* Lớp .secondary định nghĩa màu sắc phụ */
.btn-form.secondary {
    background-color: #7f8c8d;
}
.btn-form.secondary:hover {
    background-color: #6a7778;
    transform: translateY(-2px);
}
.btn-form.submit:hover { background-color: #c0392b; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.4); }
.btn-form.submit:disabled { background-color: #555; cursor: not-allowed; transform: translateY(0); box-shadow: none; }
.form-footer { text-align: center; margin-top: 15px; font-size: 0.95rem; color: #bbb; }
.error-message, .success-message {
    padding: 12px 15px; border-radius: 5px; margin-bottom: 20px;
    border: 1px solid; font-weight: bold;
}
.error-message { color: #c0392b; background-color: #fdd; border-color: #c0392b; animation: shake 0.5s; }
.success-message { color: #27ae60; background-color: #e8f5e9; border-color: #27ae60; }
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  30%, 70% { transform: translate3d(-4px, 0, 0); }
}

/* --- General Section Styles --- */
.section-bg {
    background: rgba(0, 0, 0, 0.7); border-radius: 10px;
    padding: 3rem 2rem; margin-top: 3rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-dark);
}
.section-bg h2 {
    font-family: 'Playfair Display', serif; font-size: 2.8rem;
    color: var(--secondary-color); text-align: center;
    margin-bottom: 2.5rem; text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    position: relative; padding-bottom: 15px;
}
.section-title-deco { position: relative; display: inline-block; }
.section-title-deco::before, .section-title-deco::after {
    content: ''; position: absolute; bottom: 0;
    height: 3px; background-color: var(--primary-color); width: 40%;
}
.section-title-deco::before { left: 50%; transform: translateX(-50%) translateX(-25%); }
.section-title-deco::after { left: 50%; transform: translateX(-50%) translateX(25%); }

/* --- Download Section --- */
.download-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 25px; }
.download-button-item {
    background: url('../images/button_bg.png') no-repeat center center / 100% 100%;
    border: 2px solid var(--secondary-color); border-radius: 10px;
    padding: 15px 25px; display: flex; flex-direction: column;
    align-items: center; text-align: center; color: white;
    transition: all 0.3s ease; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    min-width: 150px; position: relative; overflow: hidden;
}
.download-button-item:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5); }
.download-button-item:hover span, .download-button-item:hover small { color: var(--text-dark); }
/* --- Khu vực chứa icon --- */
.download-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

/* --- Style cho thẻ SPAN chứa icon (QUAN TRỌNG) --- */
/* Áp dụng cho các thẻ span nằm bên trong .download-icon */
.download-icon span {
    display: inline-block; /* Cho phép đặt kích thước */
    width: 100%;           /* Lấp đầy chiều rộng của .download-icon */
    height: 100%;          /* Lấp đầy chiều cao của .download-icon */
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* --- Định nghĩa các icon --- */
.icon-android { 
    background-image: url('../images/icon_android.png'); 
}
.icon-ios { 
    background-image: url('../images/icon_ios.png'); 
}
.icon-pc_client { 
    background-image: url('../images/icon_pc_client.png'); 
}

/* --- Style cho chữ (Đã tách riêng) --- */
/* Áp dụng cho các thẻ span là con trực tiếp của .download-button-item */
.download-button-item > span {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.download-button-item small {
    font-size: 0.85rem;
    color: #ccc;
    transition: color 0.3s ease;
}

/* --- News & Events Section --- */
.post-list, .event-slider { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.post-item, .event-item {
    background-color: rgba(var(--bg-dark), 0.8);
    border: 1px solid var(--border-dark); border-radius: 8px;
    overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.post-item:hover, .event-item:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); }
.post-image, .event-item img { width: 100%; height: 200px; object-fit: cover; }
.post-content, .event-item div { padding: 20px; }
.post-content h3, .event-item h3 { margin-top: 0; margin-bottom: 10px; font-size: 1.4rem; color: var(--secondary-color); }
.post-content h3 a { color: var(--secondary-color); }
.post-content p, .event-item p { font-size: 0.95rem; color: #ccc; margin-bottom: 15px; }
.post-date { font-size: 0.8rem; color: #888; }
.post-category-link {
    display: inline-block; background-color: var(--primary-color);
    color: white; padding: 4px 12px; border-radius: 20px;
    font-size: 0.8rem; font-weight: bold; text-transform: uppercase;
    margin-bottom: 10px; transition: background-color 0.3s ease;
}
.post-category-link:hover { background-color: var(--accent-color); color: white; }
.fade-in-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* --- Profile Page --- */
.profile-layout { display: flex; gap: 30px; margin-top: 3rem; align-items: flex-start; }
.profile-sidebar { flex: 0 0 280px; background: rgba(0,0,0,0.7); border-radius: 10px; padding: 20px; border: 1px solid var(--border-dark); }
.user-avatar { text-align: center; border-bottom: 1px solid var(--border-dark); padding-bottom: 20px; margin-bottom: 20px; }
.user-avatar img { width: 100px; height: 100px; border-radius: 50%; border: 3px solid var(--secondary-color); margin: 0 auto 15px; object-fit: cover; }
.user-avatar h3 { color: var(--secondary-color); font-size: 1.5rem; }
.user-avatar p { font-size: 1.1rem; }
.user-avatar p strong { color: var(--accent-color); }
.profile-menu { list-style: none; }
.profile-menu li a { display: block; padding: 12px 15px; color: var(--text-light); border-radius: 5px; margin-bottom: 5px; font-weight: bold; transition: background-color 0.3s; }
.profile-menu li a:hover { background-color: rgba(255,255,255,0.1); }
.profile-menu li.active a { background-color: var(--primary-color); color: white; }
.profile-content { flex-grow: 1; }
.content-box { background: rgba(0,0,0,0.7); border-radius: 10px; padding: 30px; border: 1px solid var(--border-dark); }
.content-box h2 {
    font-family: 'Playfair Display', serif; font-size: 2.2rem;
    color: var(--secondary-color); margin-top: 0; margin-bottom: 25px;
    border-bottom: 1px solid var(--border-dark); padding-bottom: 15px;
}
.profile-sub-form input:disabled { background-color: #333; cursor: not-allowed; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.info-item { background: rgba(255,255,255,0.05); padding: 15px; border-radius: 5px; text-align: center; }
.info-item span { display: block; color: #ccc; margin-bottom: 5px; }
.info-item strong { font-size: 1.5rem; color: var(--secondary-color); }
.avatar-form { margin-bottom: 20px; }
.avatar-upload-container { display: flex; align-items: center; gap: 20px; }
#avatar-preview { width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--primary-color); object-fit: cover; }
.cost-box { background-color: rgba(231, 76, 60, 0.1); border: 1px solid var(--accent-color); border-radius: 5px; padding: 15px; text-align: center; margin: 20px 0; font-size: 1.1rem; }
.cost-box strong { color: var(--accent-color); }

/* --- Shop Page Styles --- */
.player-currency { font-size: 1.2rem; color: var(--secondary-color); }
.player-currency strong { font-size: 1.5rem; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 25px; margin-top: 2rem; }
.shop-item { background: rgba(0,0,0,0.7); border: 1px solid var(--border-dark); border-radius: 8px; text-align: center; padding: 15px; display: flex; flex-direction: column; transition: transform 0.3s, box-shadow 0.3s; }
.shop-item:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.5); }
.shop-item-thumb { width: 100px; height: 100px; margin: 0 auto 15px; background-color: rgba(255,255,255,0.05); border-radius: 8px; padding: 10px; }
.shop-item-thumb img { width: 100%; height: 100%; object-fit: contain; }
.shop-item-info { flex-grow: 1; }
.shop-item-info h3 { font-size: 1.1rem; color: var(--secondary-color); margin-bottom: 5px; }
.shop-item-info p { font-size: 0.85rem; color: #ccc; }
.shop-item-price { font-size: 1.2rem; font-weight: bold; color: var(--accent-color); margin: 15px 0; }
.btn-buy { background: var(--primary-color); color: white; border: none; border-radius: 5px; padding: 10px 15px; cursor: pointer; font-weight: bold; text-transform: uppercase; transition: background-color 0.3s; }
.btn-buy:hover { background-color: var(--accent-color); }

/* --- Lucky Wheel & Prize Styles --- */
.wheel-container {position: relative;width: 600px;height: 600px;margin: 2rem auto;filter: drop-shadow(0 10px 15px rgba(0,0,0,0.4));}
.wheel { position: relative; width: 100%; height: 100%; border-radius: 50%; border: 10px solid #8B4513; background-image: linear-gradient(45deg, #F5DEB3, #FFEBCD); overflow: hidden; transition: transform 5s cubic-bezier(0.25, 1, 0.5, 1); }
.wheel-slice {position: absolute;width: 50%;height: 50%;transform-origin: 100% 100%;transform: rotate(var(--degree)) skewY(45deg);border: 1px solid rgba(0,0,0,0.1);}
.wheel-slice:nth-child(odd) { background-color: rgba(255, 228, 196, 0.7); }
.slice-content {position: absolute;left: -50%;width: 200%;height: 200%;transform: skewY(-50deg) rotate(calc(220deg / 16));text-align: left;padding-top: 170px;display: flex;flex-direction: column;align-items: center;justify-content: center;}
.slice-content img { width: 45px; height: 45px; margin-bottom: 8px; object-fit: contain; }
.slice-content span { display: block; font-size: 0.8rem; color: #5C4033; font-weight: bold; max-width: 80%; }
.wheel-spinner { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90px; height: 90px; background: radial-gradient(circle, #ff5e5e, var(--accent-color)); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 1.5rem; color: white; cursor: pointer; border: 5px solid white; box-shadow: 0 0 20px rgba(255,0,0,0.5); z-index: 10; transition: transform 0.2s; }
.wheel-spinner:hover { transform: translate(-50%, -50%) scale(1.1); }
.wheel-container::after { content: ''; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 20px solid transparent; border-right: 20px solid transparent; border-top: 30px solid var(--accent-color); z-index: 11; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3)); }
.wheel-info { text-align: center; margin-top: 1rem; font-size: 1.2rem; color: var(--text-light); text-shadow: 1px 1px 2px #000; }
.wheel-info strong { color: var(--secondary-color); font-size: 1.4rem; }
.prize-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 2000; justify-content: center; align-items: center; animation: fadeIn 0.5s; }
.prize-modal { background: url('../images/login_panel_bg.png') no-repeat center center / 100% 100%, #1a1a1a; border: 2px solid var(--secondary-color); border-radius: 15px; padding: 40px; text-align: center; position: relative; width: 90%; max-width: 450px; box-shadow: 0 0 30px rgba(255, 204, 0, 0.5); transform: scale(0.7); animation: zoomInBounce 0.6s forwards; }
@keyframes zoomInBounce { 0% { transform: scale(0.7); opacity: 0; } 70% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.prize-modal h2 { font-family: 'Playfair Display', serif; font-size: 2.5rem; color: var(--secondary-color); margin-bottom: 15px; text-shadow: 2px 2px 3px #000; }
.prize-modal p { font-size: 1.2rem; color: var(--text-light); margin-bottom: 25px; }
.prize-item-display { background: rgba(0,0,0,0.3); padding: 20px; border-radius: 10px; margin-bottom: 25px; }
.prize-item-display img { width: 80px; height: 80px; margin: 0 auto 10px; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5)); }
.prize-item-display span { font-size: 1.3rem; font-weight: bold; color: white; }
.prize-modal-close { background: var(--accent-color); color: white; border: none; padding: 12px 30px; border-radius: 25px; font-weight: bold; text-transform: uppercase; cursor: pointer; transition: background-color 0.3s; }
.prize-modal-close:hover { background-color: #c0392b; }
.history-tabs { display: flex; border-bottom: 2px solid var(--border-dark); margin-bottom: 15px; }
.tab-button { background: none; border: none; color: #ccc; padding: 10px 20px; font-size: 1rem; font-weight: bold; cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.3s; }
.tab-button:hover { color: var(--secondary-color); }
.tab-button.active { color: var(--secondary-color); border-bottom-color: var(--secondary-color); }
.milestones-list { display: flex; flex-direction: column; gap: 15px; }
.milestone-item { display: flex; align-items: center; background: rgba(0,0,0,0.2); padding: 15px; border-radius: 8px; border-left: 5px solid #555; }
.milestone-item.claimed { border-left-color: var(--secondary-color); }
.milestone-value { flex: 0 0 150px; font-size: 1.2rem; font-weight: bold; color: var(--secondary-color); }
.milestone-reward { flex-grow: 1; color: #ccc; }
.btn-claim { background: var(--primary-color); color: white; border: none; padding: 10px 15px; border-radius: 5px; cursor: pointer; }
.btn-claim:disabled { background: #555; cursor: not-allowed; }
.progress-bar-container { width: 100%; background-color: #333; border-radius: 20px; height: 30px; position: relative; margin-bottom: 2rem; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); border-radius: 20px; transition: width 1s ease-out; }
.progress-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: white; font-weight: bold; text-shadow: 1px 1px 2px #000; }

/* --- Single Post/Category Page --- */
.single-post-container {background-color: #1f1f1f;padding: 2rem 3rem;border-radius: 8px;margin: 2rem auto;}
.single-post-category { margin-bottom: 15px; font-size: 0.9rem; }
.category-header { text-align: center; padding: 2rem 0; margin-top: 2rem; border-bottom: 2px solid var(--primary-color); margin-bottom: 3rem; }
.category-header h1 { font-family: 'Playfair Display', serif; font-size: 3rem; color: var(--secondary-color); text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }
.no-posts-message { text-align: center; font-size: 1.2rem; color: #ccc; padding: 3rem 0; width: 100%; }

/* --- Footer --- */
footer { text-align: center; padding: 2rem 0; background: rgba(0, 0, 0, 0.8); margin-top: 3rem; border-top: 2px solid var(--primary-color); color: #ccc; box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.3); }

/* --- Animations --- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/*
================================
--- Responsive Adjustments ---
================================
*/

/* --- Hamburger Menu --- */
.hamburger-menu { display: none; width: 30px; height: 25px; background: transparent; border: none; cursor: pointer; position: relative; z-index: 1001; }
.hamburger-menu span { display: block; width: 100%; height: 3px; background-color: var(--text-light); border-radius: 3px; position: absolute; left: 0; transition: all 0.3s ease-in-out; }
.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 11px; }
.hamburger-menu span:nth-child(3) { bottom: 0; }
.hamburger-menu.is-active span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.hamburger-menu.is-active span:nth-child(2) { opacity: 0; }
.hamburger-menu.is-active span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

/* === Tablets & Small Laptops (<= 992px) === */
@media (max-width: 992px) {
    .header-container { position: relative; display: flex; justify-content: space-between; align-items: center; }
    .hamburger-menu { display: block; }
    .main-nav { display: none; }
    .site-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
    .nav-wrapper { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: rgba(0, 0, 0, 0.95); padding: 20px 0; border-top: 1px solid var(--primary-color); }
    .nav-wrapper.is-open { display: block; }
    .nav-wrapper ul { flex-direction: column; width: 100%; text-align: center; }
    .nav-wrapper li { margin: 10px 0; }
    .hero-section { min-height: 100vh; padding: 40px 0; }
    .hero-content-overlay { flex-direction: column; justify-content: center; gap: 40px; }
    .hero-text-area { margin-bottom: 20px; order: 1; }
    .login-form-panel, .welcome-back-panel { order: 2; }
    .hero-text-area h1 { font-size: 3.8rem; }
    .hero-text-area p { font-size: 1.3rem; }
    .profile-layout { flex-direction: column; }
    .profile-sidebar { flex: 0 0 auto; width: 100%; }
    .profile-menu { display: flex; flex-wrap: wrap; justify-content: center; }
}

/* === Mobile Phones (<= 768px) === */
@media (max-width: 768px) {
    .container { width: 95%; }
    .section-bg { padding: 2.5rem 1.5rem; }
    .section-bg h2 { font-size: 2.2rem; }
    .hero-text-area h1 { font-size: 3.2rem; }
    .hero-text-area p { font-size: 1.2rem; }
    .homepage-bg .post-list, .homepage-bg .event-slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 20px; padding-bottom: 20px; }
    .homepage-bg .post-item, .homepage-bg .event-item { flex: 0 0 80%; max-width: 300px; scroll-snap-align: start; }
    .category-page .post-list { display: grid; grid-template-columns: 1fr; }
    .category-header h1 { font-size: 2.5rem; }
    .wheel-container { width: 350px; height: 350px; }
}

/* === Small Mobile Phones (<= 576px) === */
@media (max-width: 576px) {
    .site-logo img { height: 60px; }
    .hero-text-area h1 { font-size: 2.8rem; letter-spacing: 3px; }
    .hero-text-area p { font-size: 1.1rem; }
    .btn-download { width: 90%; max-width: 300px; padding: 12px 20px; font-size: 1rem; }
    .login-form-panel, .welcome-back-panel { max-width: 95%; padding: 30px 20px; }
    .login-form-panel h3, .welcome-back-panel h3 { font-size: 1.6rem; }
    .download-button-item { min-width: unset; width: 45%; padding: 10px 15px; }
    .download-icon { width: 50px; height: 50px; }
    .download-button-item span { font-size: 1rem; }
    .section-bg h2 { font-size: 2rem; }
    .wheel-container { width: 300px; height: 300px; }
    .slice-content img { width: 30px; height: 30px; }
    .slice-content span { font-size: 0.7rem; }
    .wheel-spinner { width: 60px; height: 60px; font-size: 1rem; }
    .wheel-container::after { border-left-width: 15px; border-right-width: 15px; border-top-width: 22px; top: -5px; }
}
/*
================================
--- Top-up Page Styles ---
================================
*/
.topup-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-dark);
}
.topup-tab-button {
    background: none;
    border: none;
    color: #ccc;
    padding: 10px 20px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}
.topup-tab-button:hover {
    color: var(--secondary-color);
}
.topup-tab-button.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.topup-tab-content {
    display: none;
    animation: fadeIn 0.5s;
}
.topup-tab-content.active {
    display: block;
}

.banking-info {
    text-align: center;
}
.banking-info h4 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-top: 15px;
}
.banking-info p {
    font-size: 1.1rem;
    margin-bottom: 10px;
}
.qr-code {
    max-width: 250px;
    margin: 15px auto;
    border: 5px solid white;
    border-radius: 10px;
}
.banking-note {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid var(--accent-color);
}
.banking-note code {
    background: #111;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--secondary-color);
}
/*
============================
--- Select Box Styles ---
============================
*/

.form-control {
    /* --- Bắt buộc để tùy chỉnh mũi tên --- */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* --- Các style chung --- */
    display: block;
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.1);
    
    /* --- Thêm icon mũi tên tùy chỉnh --- */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cccccc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px 12px;
    
    /* --- Viền và Bo góc --- */
    border: 1px solid var(--border-dark);
    border-radius: 5px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Style khi được focus (chọn vào) */
.form-control:focus {
    border-color: var(--secondary-color);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.2);
}

/* Style cho các thẻ <option> bên trong */
.form-control option {
    background-color: #333;
    color: var(--text-light);
}

/* --- Cropper.js Modal Styles --- */
#crop-modal .modal-content {
    color: #333; /* Chữ màu tối để dễ đọc trên nền trắng */
}
.crop-container {
    width: 100%;
    height: 400px;
    margin-top: 15px;
    background-color: #f7f7f7;
}
/* Style này để đảm bảo ảnh trong cropper hiển thị đúng */
.crop-container img {
    max-width: 100%;
    display: block;
}