/* ============================================
   MyCasino - 美化版 CSS
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --gold: #e5a93c;
    --gold-light: #f0c860;
    --gold-dark: #c99333;
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #666680;
    --border-color: #2a2a3a;
    --success: #00d26a;
    --danger: #ff4757;
    --gradient-gold: linear-gradient(135deg, #e5a93c 0%, #f0c860 50%, #d4942c 100%);
    --gradient-hero: linear-gradient(135deg, #0a0a1a 0%, #1a0a30 30%, #0d0d2b 60%, #0a0a1a 100%);
    --gradient-card: linear-gradient(145deg, #1a1a2e 0%, #16161f 100%);
    --shadow-gold: 0 0 30px rgba(229, 169, 60, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(124, 58, 237, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(229, 169, 60, 0.04) 0%, transparent 50%);
    pointer-events: none; z-index: 0;
}

/* --- Floating Particles --- */
.bg-particles {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0; overflow: hidden;
}
.particle {
    position: absolute; width: 4px; height: 4px;
    background: var(--gold); border-radius: 50%; opacity: 0;
    animation: floatParticle 8s infinite;
}
.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 7s; }
.particle:nth-child(2) { left: 25%; animation-delay: 1s; animation-duration: 9s; }
.particle:nth-child(3) { left: 40%; animation-delay: 2s; animation-duration: 6s; }
.particle:nth-child(4) { left: 55%; animation-delay: 3s; animation-duration: 8s; }
.particle:nth-child(5) { left: 70%; animation-delay: 1.5s; animation-duration: 10s; }
.particle:nth-child(6) { left: 85%; animation-delay: 0.5s; animation-duration: 7.5s; }
.particle:nth-child(7) { left: 15%; animation-delay: 2.5s; animation-duration: 9.5s; }
.particle:nth-child(8) { left: 60%; animation-delay: 4s; animation-duration: 6.5s; }

@keyframes floatParticle {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ============================================
   HEADER
   ============================================ */
header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    padding: 0 30px; height: 70px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(229, 169, 60, 0.2);
    transition: all 0.3s ease;
}
header.scrolled {
    background: rgba(10, 10, 15, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 26px; font-weight: 800; color: var(--gold);
    cursor: pointer; display: flex; align-items: center; gap: 10px;
    letter-spacing: -0.5px; transition: transform 0.3s ease;
}
.logo:hover { transform: scale(1.03); }

.logo-icon {
    font-size: 32px; animation: logoBounce 3s ease-in-out infinite;
}
@keyframes logoBounce {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(10deg) scale(1.1); }
}

.nav-buttons { display: flex; align-items: center; gap: 12px; }

.user-status { display: flex; align-items: center; gap: 10px; }

.balance-tag {
    background: rgba(229, 169, 60, 0.1);
    border: 1px solid rgba(229, 169, 60, 0.3);
    padding: 6px 14px; border-radius: var(--radius-xs);
    font-size: 13px; font-weight: 600; color: var(--gold);
}

.lang-select {
    padding: 8px 14px; background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary); border: 1px solid var(--border-color);
    border-radius: var(--radius-xs); font-size: 13px; cursor: pointer;
    transition: all 0.3s ease; outline: none; font-family: inherit;
}
.lang-select:hover, .lang-select:focus {
    border-color: var(--gold); background: rgba(229, 169, 60, 0.05);
}
.lang-select option { background: var(--bg-secondary); color: var(--text-primary); }

.nav-buttons button {
    padding: 10px 24px; cursor: pointer; font-weight: 600;
    border-radius: var(--radius-xs); font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit; letter-spacing: 0.3px;
}

.login-btn {
    background: transparent; color: var(--gold); border: 1.5px solid var(--gold);
}
.login-btn:hover {
    background: rgba(229, 169, 60, 0.1); border-color: var(--gold-light);
    transform: translateY(-2px); box-shadow: 0 4px 15px rgba(229, 169, 60, 0.2);
}

.register-btn {
    background: var(--gradient-gold); color: #000; border: none; font-weight: 700;
}
.register-btn:hover {
    transform: translateY(-2px); box-shadow: 0 6px 25px rgba(229, 169, 60, 0.4);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative; text-align: center;
    padding: 100px 20px 80px;
    background: var(--gradient-hero); overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at center, rgba(229, 169, 60, 0.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero-content { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; }

.hero h1 {
    font-size: 52px; font-weight: 900; margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, var(--gold-light) 50%, var(--gold) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; line-height: 1.2;
    animation: heroTitle 1s ease-out;
}
@keyframes heroTitle {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero p {
    font-size: 18px; color: var(--text-secondary);
    animation: heroTitle 1s ease-out 0.2s both;
}

/* Floating chips */
.hero-chip {
    position: absolute; font-size: 40px; opacity: 0.15;
    animation: chipFloat 6s ease-in-out infinite;
}
.hero-chip:nth-child(1) { top: 20%; left: 8%; animation-delay: 0s; }
.hero-chip:nth-child(2) { top: 60%; left: 5%; animation-delay: 1s; }
.hero-chip:nth-child(3) { top: 30%; right: 8%; animation-delay: 2s; }
.hero-chip:nth-child(4) { top: 70%; right: 5%; animation-delay: 0.5s; }
@keyframes chipFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* ============================================
   FEATURES BAR
   ============================================ */
.features-bar {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
    max-width: 1000px; margin: -40px auto 0; padding: 0 20px;
    position: relative; z-index: 3;
}
.feature-item {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 24px 20px; text-align: center;
    transition: all 0.3s ease;
}
.feature-item:hover {
    border-color: var(--gold); transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
}
.feature-icon { font-size: 32px; margin-bottom: 10px; }
.feature-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.feature-desc { font-size: 12px; color: var(--text-muted); }

/* ============================================
   GAME LOBBY
   ============================================ */
.game-lobby {
    max-width: 1100px; margin: 0 auto; padding: 80px 20px 60px;
    position: relative; z-index: 1;
}

.lobby-header { text-align: center; margin-bottom: 50px; }
.lobby-header h2 {
    font-size: 32px; font-weight: 800; margin-bottom: 10px; color: var(--text-primary);
}
.lobby-header h2 span {
    background: var(--gradient-gold); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.lobby-header p { color: var(--text-secondary); font-size: 16px; }

/* Tabs */
.game-tabs {
    display: flex; justify-content: center; gap: 8px;
    margin-bottom: 40px; flex-wrap: wrap;
}
.game-tab {
    padding: 10px 22px; border-radius: 50px;
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-color);
    color: var(--text-secondary); font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease; font-family: inherit;
}
.game-tab:hover { border-color: var(--gold); color: var(--gold); }
.game-tab.active {
    background: var(--gradient-gold); color: #000;
    border-color: transparent; font-weight: 700;
}

/* Game Grid */
.game-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.game-card {
    background: var(--gradient-card); border-radius: var(--radius);
    overflow: hidden; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer; border: 1px solid var(--border-color);
    position: relative;
}
.game-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--gradient-gold); opacity: 0; transition: opacity 0.3s ease;
}
.game-card:hover {
    transform: translateY(-8px); border-color: rgba(229, 169, 60, 0.3);
    box-shadow: var(--shadow-card), var(--shadow-gold);
}
.game-card:hover::before { opacity: 1; }
.game-card:hover .card-img-placeholder { transform: scale(1.05); }

.card-img-placeholder {
    height: 160px; display: flex; align-items: center;
    justify-content: center; flex-direction: column; gap: 8px;
    transition: transform 0.4s ease; position: relative; overflow: hidden;
}
.card-img-placeholder .game-emoji {
    font-size: 52px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}
.game-card:hover .game-emoji { transform: scale(1.15) rotate(-3deg); }
.card-img-placeholder .game-label {
    color: var(--text-muted); font-size: 13px; font-weight: 600;
    letter-spacing: 2px; text-transform: uppercase;
}
.card-img-placeholder.evo { background: linear-gradient(135deg, #1a0a30 0%, #3a1a6e 50%, #2a0a4e 100%); }
.card-img-placeholder.wm { background: linear-gradient(135deg, #0a1a30 0%, #1a4a7e 50%, #0a2a5e 100%); }
.card-img-placeholder.slot { background: linear-gradient(135deg, #2a1a0a 0%, #6a3a1a 50%, #4a2a0a 100%); }
.card-img-placeholder.fishing { background: linear-gradient(135deg, #0a2a2a 0%, #1a6a5a 50%, #0a4a3a 100%); }

.game-card h3 {
    padding: 16px; margin: 0; font-size: 15px; font-weight: 700;
    color: var(--text-primary); text-align: center;
    border-top: 1px solid var(--border-color); background: rgba(0,0,0,0.2);
}

.card-badge {
    position: absolute; top: 12px; right: 12px; padding: 4px 12px;
    border-radius: 50px; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px; z-index: 2;
}
.badge-hot { background: linear-gradient(135deg, #ff4757, #ff6b81); color: #fff; }
.badge-new { background: linear-gradient(135deg, var(--success), #2ed573); color: #000; }
.badge-popular { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: #000; }

/* ============================================
   MODALS
   ============================================ */
.modal {
    display: none; position: fixed; z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
    background: var(--bg-card); margin: 8vh auto; padding: 36px 30px;
    border: 1px solid rgba(229, 169, 60, 0.2); border-radius: var(--radius);
    width: 90%; max-width: 420px; text-align: center;
    position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.5), var(--shadow-gold);
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.close-btn {
    color: var(--text-muted); font-size: 28px; font-weight: 300;
    cursor: pointer; position: absolute; right: 18px; top: 18px;
    width: 36px; height: 36px; display: flex; align-items: center;
    justify-content: center; border-radius: 50%; transition: all 0.3s ease;
}
.close-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.1); }

.modal-content h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.modal-content h2 span {
    background: var(--gradient-gold); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.modal-subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }

.modal-content input, .modal-content select {
    width: 100%; padding: 14px 16px; margin: 8px 0;
    border: 1.5px solid var(--border-color); background: rgba(0,0,0,0.3);
    color: var(--text-primary); border-radius: var(--radius-sm);
    box-sizing: border-box; font-size: 15px; font-family: inherit;
    transition: all 0.3s ease; outline: none;
}
.modal-content input:focus, .modal-content select:focus {
    border-color: var(--gold); box-shadow: 0 0 0 3px rgba(229, 169, 60, 0.1);
}
.modal-content input::placeholder { color: var(--text-muted); }

.submit-btn {
    width: 100%; padding: 14px; background: var(--gradient-gold);
    color: #000; border: none; border-radius: var(--radius-sm);
    font-weight: 700; cursor: pointer; margin-top: 16px;
    font-size: 16px; font-family: inherit; transition: all 0.3s ease;
    letter-spacing: 0.5px;
}
.submit-btn:hover {
    transform: translateY(-2px); box-shadow: 0 6px 25px rgba(229, 169, 60, 0.4);
}

/* Deposit Step 2 */
.deposit-step2 {
    display: none; text-align: left; background: rgba(0,0,0,0.3);
    padding: 20px; border-radius: var(--radius-sm);
    border: 1px solid rgba(229, 169, 60, 0.3); margin-top: 16px;
}
.deposit-amount {
    color: var(--gold); margin: 12px 0; text-align: center;
    font-family: 'Inter', monospace; font-size: 28px; font-weight: 800;
}
.deposit-info p { font-size: 14px; line-height: 1.8; color: var(--text-secondary); margin: 4px 0; }
.deposit-info b { color: var(--text-primary); }
.deposit-warning {
    background: rgba(255,71,87,0.1); padding: 12px; border-radius: var(--radius-xs);
    margin-top: 14px; border: 1px solid rgba(255,71,87,0.2);
}
.deposit-warning p { font-size: 12px; color: var(--danger); margin: 0; }

/* ============================================
   GAME LOADER
   ============================================ */
.game-loader-overlay {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px); z-index: 2000;
    justify-content: center; align-items: center; flex-direction: column;
}
.loader-content { text-align: center; }
.casino-spinner {
    width: 60px; height: 60px; border: 3px solid var(--border-color);
    border-top: 3px solid var(--gold); border-radius: 50%;
    animation: spin 0.8s linear infinite; margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-content p {
    color: var(--text-secondary); font-size: 14px;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--bg-secondary); text-align: center; padding: 40px 20px;
    font-size: 13px; color: var(--text-muted); border-top: 1px solid var(--border-color);
    position: relative; z-index: 1;
}
footer p { margin: 6px 0; }
footer .footer-brand { color: var(--gold); font-weight: 600; }

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    header { padding: 0 16px; height: 60px; }
    .logo { font-size: 20px; }
    .logo-icon { font-size: 24px; }
    .hide-mobile { display: none; }
    .nav-buttons { gap: 8px; }
    .nav-buttons button { padding: 8px 14px; font-size: 13px; }
    .lang-select { padding: 6px 10px; font-size: 12px; }

    .hero { padding: 70px 16px 60px; }
    .hero h1 { font-size: 30px; }
    .hero p { font-size: 14px; }

    .features-bar { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: -30px; }
    .feature-item { padding: 16px 12px; }
    .feature-icon { font-size: 24px; }
    .feature-title { font-size: 12px; }
    .feature-desc { font-size: 11px; }

    .game-lobby { padding: 50px 12px 40px; }
    .lobby-header { margin-bottom: 30px; }
    .lobby-header h2 { font-size: 24px; }

    .game-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .game-card h3 { padding: 12px 8px; font-size: 13px; }
    .card-img-placeholder { height: 120px; }
    .card-img-placeholder .game-emoji { font-size: 40px; }

    .game-tabs { gap: 6px; margin-bottom: 24px; }
    .game-tab { padding: 8px 14px; font-size: 12px; }

    .modal-content { margin: 5vh auto; padding: 28px 20px; }
    .modal-content h2 { font-size: 20px; }
}

@media (max-width: 400px) {
    .hero h1 { font-size: 24px; }
    .game-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .card-img-placeholder { height: 100px; }
    .card-img-placeholder .game-emoji { font-size: 32px; }
    .card-badge { display: none !important; }
}
