:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c2a;
    --border: #1e1e2e;
    --text-primary: #e8e8f0;
    --text-secondary: #8888a0;
    --accent: #00e5ff;
    --accent2: #7c4dff;
    --success: #00e676;
    --warning: #ffab00;
    --danger: #ff1744;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

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

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

a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; }
code { font-family: 'JetBrains Mono', monospace; }

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10,10,15,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; color: var(--text-primary); }
.logo-icon { color: var(--accent); font-size: 24px; }
.logo-text { letter-spacing: -0.5px; }
.logo-accent { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); background: var(--bg-card); }
.login-btn {
    background: var(--accent);
    color: #000 !important;
    font-weight: 600;
}
.login-btn:hover { background: #00b8d4; }

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 80px 24px;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(0,229,255,0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 50% 100%, rgba(124,77,255,0.05) 0%, transparent 60%);
}
.hero-content { text-align: center; position: relative; z-index: 1; max-width: 700px; }
.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    background: rgba(0,229,255,0.1);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 24px;
    border: 1px solid rgba(0,229,255,0.2);
}
.hero-title { font-size: clamp(40px, 8vw, 80px); font-weight: 800; line-height: 1.1; margin-bottom: 16px; }
.gradient-text { background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: 18px; color: var(--text-secondary); margin-bottom: 32px; }
.hero-ip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 40px;
}
.hero-ip code { font-size: 18px; color: var(--accent); }
.copy-btn {
    background: none; border: none; color: var(--text-secondary); cursor: pointer;
    font-size: 18px; padding: 4px; transition: color 0.2s;
}
.copy-btn:hover { color: var(--accent); }
.hero-stats { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-stats .stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 32px;
    min-width: 160px;
    text-align: center;
}
.hero-stats .stat-icon { font-size: 28px; color: var(--accent); margin-bottom: 8px; }
.hero-stats .stat-value { font-size: 32px; font-weight: 700; }
.hero-stats .stat-label { font-size: 13px; color: var(--text-secondary); }

/* ===== SECTIONS ===== */
.section-container { max-width: 1200px; margin: 0 auto; padding: 80px 24px; }
.section-title { font-size: 36px; font-weight: 700; text-align: center; margin-bottom: 12px; }
.section-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 40px; font-size: 16px; }

.features, .gamemodes { background: var(--bg-secondary); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon { font-size: 36px; color: var(--accent); margin-bottom: 16px; }
.feature-card h3 { margin-bottom: 8px; }

.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 3px solid var(--game-color, var(--accent));
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    transition: all 0.3s;
}
.game-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.game-icon { font-size: 28px; color: var(--game-color, var(--accent)); margin-bottom: 12px; }
.game-card h3 { font-size: 16px; margin-bottom: 4px; }
.game-card p { font-size: 13px; color: var(--text-secondary); }

.cta-section { text-align: center; padding: 60px 0; }
.cta-section h2 { font-size: 36px; margin-bottom: 12px; }
.cta-section p { color: var(--text-secondary); margin-bottom: 24px; font-size: 18px; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary:hover { background: #00b8d4; transform: translateY(-1px); }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 6px; background: var(--bg-card-hover); color: var(--text-primary); border: 1px solid var(--border); cursor: pointer; transition: all 0.2s; }
.btn-sm:hover { border-color: var(--accent); }
.btn-danger { border-color: var(--danger) !important; color: var(--danger) !important; }
.btn-block { width: 100%; justify-content: center; }
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-secondary:hover { border-color: var(--accent); background: var(--bg-card-hover); }

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 24px;
    background: var(--bg-secondary);
}
.footer-content { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-secondary); font-size: 14px; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { width: 100%; text-align: center; color: var(--text-secondary); font-size: 13px; }

/* ===== SHOP ===== */
.shop-section { padding-top: 80px; min-height: 100vh; }
.shop-layout { display: flex; gap: 32px; margin-top: 32px; }
.shop-sidebar { width: 240px; flex-shrink: 0; }
.shop-sidebar h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); margin-bottom: 16px; }
.category-list { display: flex; flex-direction: column; gap: 4px; }
.category-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s;
}
.category-item:hover, .category-item.active { background: var(--bg-card); color: var(--text-primary); }
.category-item i { width: 20px; text-align: center; color: var(--accent); }
.shop-content { flex: 1; min-width: 0; }
.category-header { margin-bottom: 24px; }
.category-header h2 { font-size: 28px; }
.category-header p { color: var(--text-secondary); }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 3px solid var(--product-color, var(--accent));
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.3s;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.product-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(0,229,255,0.1);
    color: var(--accent);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
}
.product-card h3 { font-size: 18px; margin-bottom: 8px; }
.product-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.product-price { font-size: 22px; font-weight: 700; color: var(--accent); }
.btn-buy {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 20px;
    background: var(--accent); color: #000;
    border: none; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 14px;
    cursor: pointer; transition: all 0.2s;
}
.btn-buy:hover { background: #00b8d4; }
.btn-buy-coin { background: var(--warning); color: #000; }
.btn-buy-coin:hover { background: #e6a000; }

/* ===== COIN DISPLAY ===== */
.coin-price { display: inline-flex; align-items: center; gap: 6px; color: var(--warning); }
.coin-price i { font-size: 16px; }
.usd-price { color: var(--accent); }
.sidebar-coin-info { margin-top: 32px; }
.sidebar-coin-info h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); margin-bottom: 12px; }
.coin-lookup-form { display: flex; gap: 6px; }
.coin-lookup-form input { flex: 1; padding: 8px 12px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 6px; color: var(--text-primary); font-size: 13px; outline: none; }
.coin-lookup-form input:focus { border-color: var(--warning); }
.coin-lookup-form button { padding: 8px 12px; background: var(--warning); color: #000; border: none; border-radius: 6px; cursor: pointer; }
.coin-lookup-form button:hover { background: #e6a000; }
.coin-balance-display { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 14px; background: rgba(255,171,0,0.1); border: 1px solid rgba(255,171,0,0.3); border-radius: 8px; font-size: 16px; font-weight: 600; color: var(--warning); }
.coin-balance-display.coin-notfound { background: rgba(255,23,68,0.1); border-color: rgba(255,23,68,0.3); color: var(--danger); }
.coin-balance-display .coin-icon { font-size: 18px; }
.sidebar-staff-coins { margin-top: 24px; }
.sidebar-staff-coins h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); margin-bottom: 12px; }
.coin-leaderboard { list-style: none; padding: 0; }
.coin-leaderboard li { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.coin-leaderboard li:last-child { border-bottom: none; }
.cl-name { color: var(--text-primary); }
.cl-coins { color: var(--warning); font-weight: 600; }
.coin-amount { color: var(--warning); font-weight: 600; }
.modal-price-info { margin-bottom: 16px; padding: 10px 14px; border-radius: 8px; font-size: 14px; }
.modal-price-info.coin-info { background: rgba(255,171,0,0.1); border: 1px solid rgba(255,171,0,0.3); color: var(--warning); }
.modal-price-info.usd-info { background: rgba(0,229,255,0.1); border: 1px solid rgba(0,229,255,0.3); color: var(--accent); }

/* ===== SERVER BADGES ===== */
.server-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    margin-left: 6px;
}
.server-badge.server-hub { background: rgba(0,229,255,0.15); color: #00e5ff; }
.server-badge.server-factions { background: rgba(255,107,107,0.15); color: #ff6b6b; }
.server-badge.server-survival { background: rgba(0,184,148,0.15); color: #00b894; }
.server-badge.server-creative { background: rgba(253,121,168,0.15); color: #fd79a8; }
.server-badge.server-kitpvp { background: rgba(214,48,49,0.15); color: #d63031; }
.server-badge.server-mine { background: rgba(108,92,231,0.15); color: #6c5ce7; }
.server-badge.server-skywars { background: rgba(255,234,167,0.15); color: #ffeaa7; }
.server-badge.server-luckyblock { background: rgba(253,203,110,0.15); color: #fdcb6e; }

/* ===== ADMIN: SERVER TAGS ===== */
.server-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.server-tag.server-hub { background: rgba(0,229,255,0.15); color: #00e5ff; }
.server-tag.server-factions { background: rgba(255,107,107,0.15); color: #ff6b6b; }
.server-tag.server-survival { background: rgba(0,184,148,0.15); color: #00b894; }
.server-tag.server-creative { background: rgba(253,121,168,0.15); color: #fd79a8; }
.server-tag.server-kitpvp { background: rgba(214,48,49,0.15); color: #d63031; }
.server-tag.server-all { background: rgba(255,171,0,0.15); color: var(--warning); }
.server-tag.server-mine { background: rgba(108,92,231,0.15); color: #6c5ce7; }
.server-tag.server-skywars { background: rgba(255,234,167,0.15); color: #ffeaa7; }
.server-tag.server-luckyblock { background: rgba(253,203,110,0.15); color: #fdcb6e; }
.server-tag { background: rgba(136,136,160,0.15); color: var(--text-secondary); }

/* ===== FILTER BAR ===== */
.filter-bar { display: flex; gap: 8px; }
.filter-bar .inline-form { margin: 0; }
.filter-bar select { padding: 6px 10px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 6px; color: var(--text-primary); font-size: 13px; outline: none; }
.filter-bar select:focus { border-color: var(--accent); }

/* ===== LOGIN ===== */
.login-section { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 80px 24px; }
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}
.login-header { text-align: center; margin-bottom: 32px; }
.login-header .logo-icon { font-size: 40px; }
.login-header h2 { margin: 12px 0 4px; }
.login-header p { color: var(--text-secondary); font-size: 14px; }
.login-form .form-group { margin-bottom: 20px; }
.login-form label { display: block; margin-bottom: 8px; font-size: 13px; color: var(--text-secondary); }
.form-group input, .form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border 0.2s;
}
.form-group input:focus { border-color: var(--accent); }

/* ===== ADMIN ===== */
.admin-body { background: var(--bg-primary); }
.admin-wrapper { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: 240px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
}
.sidebar-header { padding: 20px; border-bottom: 1px solid var(--border); }
.sidebar-logo { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; color: var(--text-primary); }
.sidebar-nav { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav .nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s;
}
.sidebar-nav .nav-item:hover { background: var(--bg-card); color: var(--text-primary); }
.sidebar-nav .nav-item.active { background: rgba(0,229,255,0.1); color: var(--accent); }
.sidebar-nav .nav-item i { width: 20px; text-align: center; }
.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); }
.logout-item { color: var(--danger) !important; }

.admin-main { margin-left: 240px; flex: 1; min-width: 0; }
.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}
.admin-topbar h1 { font-size: 22px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.topbar-user { color: var(--text-secondary); }
.topbar-role {
    padding: 3px 10px;
    background: rgba(0,229,255,0.1);
    color: var(--accent);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.admin-content { padding: 32px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stats-grid .stat-card { position: relative; overflow: hidden; }
.stat-icon-bg { position: absolute; right: 16px; bottom: -8px; font-size: 64px; opacity: 0.06; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 24px;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}
.card-header h2 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 24px; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; padding: 12px 16px; color: var(--text-secondary); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-card-hover); }
.inactive td { opacity: 0.5; }

.badge-on { color: var(--success); }
.badge-off { color: var(--danger); }
.actions { display: flex; gap: 8px; }
.actions form { display: inline; }

/* ===== SERVER STATUS ===== */
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.server-card {
    display: flex; align-items: center; gap: 12px;
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.server-indicator { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.server-indicator.online { background: var(--success); box-shadow: 0 0 8px rgba(0,230,118,0.4); }
.server-indicator.offline { background: var(--danger); }
.server-info { flex: 1; min-width: 0; }
.server-info strong { display: block; font-size: 14px; }
.server-info small { color: var(--text-secondary); font-size: 12px; }
.server-players { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }

/* ===== CONSOLE ===== */
.console-controls { margin-bottom: 16px; }
.console-controls .form-select { width: 240px; display: inline-block; }
.console-card .card-body { padding: 0; }
.console-output {
    background: #0a0a0f;
    padding: 16px 20px;
    height: 400px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.7;
    border-bottom: 1px solid var(--border);
}
.console-line { padding: 0; white-space: pre-wrap; word-break: break-all; }
.console-line.muted { color: var(--text-secondary); }
.cmd-prompt { color: var(--accent); font-weight: 500; }
.cmd-output { color: var(--text-primary); }
.cmd-error { color: var(--danger); }
.cmd-loading { color: var(--text-secondary); }
.console-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-secondary);
}
.console-prompt { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--accent); white-space: nowrap; }
.console-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    outline: none;
}
.btn-send { padding: 8px 16px; }

.quick-commands { margin-top: 16px; }
.quick-commands h3 { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; }
.quick-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-btns button {
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.quick-btns button:hover { border-color: var(--accent); color: var(--accent); }

/* ===== FILE MANAGER ===== */
.file-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.file-controls .form-select { width: 200px; }
.file-path-display { font-size: 13px; color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; }
.file-layout { display: flex; gap: 24px; }
.file-browser { flex: 1; min-width: 0; }
.file-editor { flex: 1; min-width: 0; }
.file-list { padding: 8px 0; }
.file-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 16px;
    font-size: 14px;
    transition: background 0.2s;
}
.file-item:hover { background: var(--bg-card-hover); }
.file-item.dir { color: var(--accent); }
.file-item.file { color: var(--text-primary); }
.file-item i { width: 16px; text-align: center; color: var(--text-secondary); }
.file-item.dir i { color: var(--accent); }
.file-name { flex: 1; }
.file-size { font-size: 12px; color: var(--text-secondary); }
.file-edit-link { color: var(--accent); font-size: 14px; opacity: 0.5; transition: opacity 0.2s; }
.file-item:hover .file-edit-link { opacity: 1; }
.file-textarea {
    width: 100%;
    height: 500px;
    background: #0a0a0f;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    padding: 16px;
    resize: vertical;
    outline: none;
    line-height: 1.5;
    tab-size: 2;
}
.file-edit-form .btn-primary { margin-top: 12px; }

/* ===== SHOP ADMIN ===== */
.shop-admin-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
.add-form { margin-top: 16px; }
.add-form summary { cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 500; padding: 8px 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.inline-form input, .inline-form select {
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}
.inline-form input:focus { border-color: var(--accent); }

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 420px;
    width: 90%;
    position: relative;
}
.modal-close { position: absolute; top: 16px; right: 20px; font-size: 24px; cursor: pointer; color: var(--text-secondary); }
.modal h2 { margin-bottom: 20px; font-size: 20px; }

/* ===== ALERTS ===== */
.alert {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success { background: rgba(0,230,118,0.1); border: 1px solid rgba(0,230,118,0.3); color: var(--success); }
.alert-error { background: rgba(255,23,68,0.1); border: 1px solid rgba(255,23,68,0.3); color: var(--danger); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.empty-state i { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }
.text-muted { color: var(--text-secondary); font-size: 14px; }
.error-section { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.error-section h1 { font-size: 120px; font-weight: 800; color: var(--accent); line-height: 1; }
.error-section p { font-size: 20px; color: var(--text-secondary); margin: 16px 0 32px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .admin-sidebar { width: 200px; }
    .admin-main { margin-left: 200px; }
    .shop-layout { flex-direction: column; }
    .shop-sidebar { width: 100%; }
    .category-list { flex-direction: row; flex-wrap: wrap; }
    .shop-admin-grid { grid-template-columns: 1fr; }
    .file-layout { flex-direction: column; }
}
@media (max-width: 640px) {
    .admin-sidebar { width: 60px; }
    .admin-sidebar .nav-item span, .admin-sidebar .sidebar-logo span { display: none; }
    .admin-main { margin-left: 60px; }
    .admin-content, .admin-topbar { padding: 16px; }
    .nav-links .nav-link { padding: 8px 10px; font-size: 13px; }
}

/* ============================================================
   CASINO — Stake-style dark theme
   ============================================================ */

/* ---- LANDING ---- */
.casino-section { padding-top: 80px; min-height: 100vh; }
.casino-balance-bar { display: flex; align-items: center; gap: 20px; justify-content: center; margin-bottom: 40px; flex-wrap: wrap; }
.coin-lookup { display: flex; gap: 8px; }
.coin-lookup input { padding: 10px 16px; background: #1a1a2e; border: 1px solid #2a2a4a; border-radius: 8px; color: #e0e0ff; font-size: 14px; outline: none; width: 200px; }
.coin-lookup input:focus { border-color: #f0b90b; }
.coin-lookup button { padding: 10px 16px; background: #f0b90b; color: #000; border: none; border-radius: 8px; cursor: pointer; font-size: 16px; }
.coin-lookup button:hover { background: #d4a008; }
.balance-display { display: flex; align-items: center; gap: 10px; padding: 10px 20px; background: rgba(240,185,11,0.1); border: 1px solid rgba(240,185,11,0.3); border-radius: 8px; font-size: 18px; font-weight: 600; color: #f0b90b; }

.casino-games { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 900px; margin: 0 auto; }
.casino-card {
    display: block;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 1px solid #2a2a4a;
    border-radius: 16px;
    padding: 36px 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    text-decoration: none;
    color: #e0e0ff;
    position: relative;
    overflow: hidden;
}
.casino-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s;
}
.casino-card:hover { transform: translateY(-8px) scale(1.02); }
.casino-card:hover::before { opacity: 1; }
.slots-card:hover { border-color: #f0b90b; box-shadow: 0 8px 40px rgba(240,185,11,0.15); }
.roulette-card:hover { border-color: #e74c3c; box-shadow: 0 8px 40px rgba(231,76,60,0.15); }
.blackjack-card:hover { border-color: #2ecc71; box-shadow: 0 8px 40px rgba(46,204,113,0.15); }
.casino-card-icon { font-size: 64px; margin-bottom: 16px; position: relative; z-index: 1; }
.casino-card h3 { font-size: 22px; margin-bottom: 8px; position: relative; z-index: 1; }
.casino-card p { color: #8888aa; margin-bottom: 16px; font-size: 14px; position: relative; z-index: 1; }
.casino-card-badge { display: inline-block; padding: 4px 12px; background: rgba(240,185,11,0.1); color: #f0b90b; border-radius: 6px; font-size: 12px; font-weight: 600; position: relative; z-index: 1; }

/* ---- GAME HEADER ---- */
.casino-game-section {
    padding-top: 80px;
    min-height: 100vh;
    background: linear-gradient(180deg, #0a0a1a 0%, #111128 100%);
}
.game-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
    padding: 16px 24px;
    background: rgba(26,26,46,0.8);
    border: 1px solid #2a2a4a;
    border-radius: 12px;
}
.game-header h1 { font-size: 24px; }
.back-link { color: #8888aa; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.back-link:hover { color: #f0b90b; }
.game-balance { font-size: 16px; font-weight: 600; padding: 8px 16px; background: rgba(240,185,11,0.1); border-radius: 8px; color: #f0b90b; display: flex; align-items: center; gap: 6px; }

/* ---- CHIP BUTTONS ---- */
.chip-btn {
    padding: 8px 16px;
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    color: #e0e0ff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.chip-btn:hover { border-color: #f0b90b; color: #f0b90b; }
.chip-btn.active {
    background: #f0b90b;
    color: #000;
    border-color: #f0b90b;
    box-shadow: 0 0 20px rgba(240,185,11,0.3);
}

/* ---- SPIN BUTTONS ---- */
.btn-spin-lg {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 40px; background: linear-gradient(135deg, #f0b90b, #f39c12);
    color: #000; border: none; border-radius: 10px; font-size: 18px; font-weight: 700;
    cursor: pointer; transition: all 0.3s;
    letter-spacing: 1px;
}
.btn-spin-lg:hover { transform: translateY(-2px); box-shadow: 0 6px 30px rgba(240,185,11,0.4); }
.btn-spin-lg:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ghost {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    color: #8888aa;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-ghost:hover { border-color: #f0b90b; color: #f0b90b; }
.btn-ghost.active { background: rgba(240,185,11,0.1); color: #f0b90b; border-color: #f0b90b; }

/* ============================================================
   SLOTS — 5-reel
   ============================================================ */
.slots-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.slots-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(26,26,46,0.8);
    border: 1px solid #2a2a4a;
    border-radius: 12px;
}
.bet-selector { display: flex; gap: 6px; flex-wrap: wrap; }
.slots-actions { display: flex; align-items: center; gap: 12px; }
.bet-display { font-size: 14px; color: #8888aa; }
.bet-display strong { color: #f0b90b; }

.slots-machine {
    background: linear-gradient(180deg, #1a1a2e, #16213e);
    border: 2px solid #2a2a4a;
    border-radius: 16px;
    padding: 24px;
    position: relative;
    box-shadow: inset 0 0 60px rgba(0,0,0,0.5), 0 8px 40px rgba(0,0,0,0.3);
}
.slots-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.slot-row {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.slot-cell {
    width: 100px; height: 90px;
    display: flex; align-items: center; justify-content: center;
    font-size: 40px;
    background: #0a0a1a;
    border: 2px solid #2a2a4a;
    border-radius: 10px;
    transition: all 0.15s;
}
.slot-cell.spinning {
    animation: slotFlicker 0.08s linear infinite;
    border-color: #f0b90b;
}
@keyframes slotFlicker {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.97); }
    100% { opacity: 1; transform: scale(1); }
}

.payline-overlay {
    position: absolute; inset: 0;
    pointer-events: none;
}
.payline-highlight {
    position: absolute;
    left: 24px; right: 24px;
    height: 3px;
    border: 2px dashed;
    opacity: 0.8;
    animation: pulseLine 1.5s ease-in-out infinite;
}
.payline-highlight[data-line="top"] { top: 72px; }
.payline-highlight[data-line="middle"] { top: 170px; }
.payline-highlight[data-line="bottom"] { top: 268px; }
.payline-highlight[data-line="v"] {
    top: 72px; height: 196px;
    border: 2px dashed;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.05) 50%, transparent 60%);
}
.payline-highlight[data-line="vinv"] {
    top: 72px; height: 196px;
    border: 2px dashed;
    background: linear-gradient(225deg, transparent 40%, rgba(255,255,255,0.05) 50%, transparent 60%);
}
@keyframes pulseLine { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

.slots-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(26,26,46,0.8);
    border: 1px solid #2a2a4a;
    border-radius: 12px;
}
.win-display {
    font-size: 16px;
    font-weight: 600;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.win-display.win { color: #2ecc71; }
.win-display.lose { color: #e74c3c; }
.win-amount { font-size: 28px; font-weight: 800; }
.win-detail { font-size: 13px; color: #8888aa; }

.slots-paytable {
    display: grid;
    gap: 2px;
    padding: 16px;
    background: rgba(26,26,46,0.6);
    border: 1px solid #2a2a4a;
    border-radius: 12px;
    font-size: 13px;
}
.paytable-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 6px 12px;
    color: #8888aa;
}
.paytable-row.header { color: #6666aa; font-weight: 600; font-size: 11px; text-transform: uppercase; }
.paytable-row:nth-child(even) { background: rgba(255,255,255,0.02); border-radius: 4px; }

/* ============================================================
   ROULETTE
   ============================================================ */
.roulette-layout { display: flex; flex-direction: column; gap: 20px; }
.roulette-main { display: flex; gap: 24px; flex-wrap: wrap; }

.wheel-section { flex: 1; min-width: 320px; }
.wheel-outer {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}
.wheel-bg {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: #1a1a2e;
    border: 3px solid #f0b90b;
    box-shadow: 0 0 60px rgba(240,185,11,0.15), inset 0 0 60px rgba(0,0,0,0.5);
}
.wheel-numbers {
    position: absolute;
    width: 100%; height: 100%;
}
.wn {
    position: absolute;
    width: 32px; height: 24px;
    left: calc(50% - 16px);
    top: calc(50% - 12px);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700;
    color: #fff;
    transform-origin: center 140px;
}
.wn.red { color: #e74c3c; }
.wn.black { color: #fff; }
.wn.green { color: #2ecc71; }

.wheel-center {
    position: absolute;
    width: 80px; height: 80px;
    left: calc(50% - 40px);
    top: calc(50% - 40px);
    background: #0a0a1a;
    border-radius: 50%;
    border: 2px solid #f0b90b;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ball-track {
    position: absolute;
    width: 70px; height: 70px;
    border-radius: 50%;
    border: 1px dashed rgba(240,185,11,0.3);
}
.ball {
    width: 10px; height: 10px;
    background: radial-gradient(circle, #fff, #f0b90b);
    border-radius: 50%;
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
}
@keyframes ballOrbit {
    0% { transform: translateX(-50%) rotate(0deg) translateY(-35px) rotate(0deg); }
    100% { transform: translateX(-50%) rotate(720deg) translateY(-35px) rotate(-720deg); }
}
@keyframes wheelSpinFast {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(180deg); }
}
.wheel-result {
    position: absolute;
    font-size: 24px;
    font-weight: 800;
    z-index: 2;
}
.wheel-result.red { color: #e74c3c; }
.wheel-result.black { color: #fff; }
.wheel-result.green { color: #2ecc71; }

.history-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(26,26,46,0.8);
    border: 1px solid #2a2a4a;
    border-radius: 10px;
}
.history-label { font-size: 12px; color: #6666aa; font-weight: 600; text-transform: uppercase; }
.history-balls { display: flex; gap: 4px; overflow-x: auto; flex: 1; }
.hist-ball {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700;
    flex-shrink: 0;
}
.hist-ball.red { background: #e74c3c; color: #fff; }
.hist-ball.black { background: #2c3e50; color: #fff; }
.hist-ball.green { background: #2ecc71; color: #000; }

.betting-section { flex: 2; min-width: 380px; }
.bet-amounts { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.clear-btn { border-color: #e74c3c !important; color: #e74c3c !important; }
.undo-btn { border-color: #f39c12 !important; color: #f39c12 !important; }

.roulette-table {
    background: #0a0a1a;
    border: 1px solid #2a2a4a;
    border-radius: 12px;
    padding: 8px;
    overflow-x: auto;
}
.table-zero {
    background: #2ecc71;
    color: #000;
    font-weight: 800;
    font-size: 18px;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: all 0.2s;
}
.table-zero:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(46,204,113,0.4); }
.table-numbers { display: flex; gap: 4px; }
.table-col { display: flex; flex-direction: column; gap: 2px; }
.table-cell {
    width: 48px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
}
.table-cell.red { background: #2c1015; color: #e74c3c; }
.table-cell.black { background: #0a0a1a; color: #fff; border-color: #1a1a2e; }
.table-cell:hover { transform: scale(1.08); border-color: #f0b90b; box-shadow: 0 0 12px rgba(240,185,11,0.3); }
.table-col-bet {
    width: 48px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600;
    background: #1a1a2e;
    color: #8888aa;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 2px;
}
.table-col-bet:hover { background: #f0b90b; color: #000; }
.table-outside { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.outside-row { display: flex; gap: 4px; }
.outside-cell {
    flex: 1;
    padding: 10px;
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.outside-cell:hover { border-color: #f0b90b; background: rgba(240,185,11,0.1); }
.outside-cell.red-bg { background: #2c1015; color: #e74c3c; }
.outside-cell.black-bg { background: #0a0a1a; color: #fff; border-color: #2a2a4a; }
.outside-cell.low, .outside-cell.high { color: #e0e0ff; }
.outside-cell.odd { color: #3498db; }

.bets-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(26,26,46,0.8);
    border: 1px solid #2a2a4a;
    border-radius: 10px;
}
.bets-summary strong { color: #f0b90b; }

.roulette-result {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
}

/* ============================================================
   BLACKJACK
   ============================================================ */
.bj-container { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.bj-table {
    background: radial-gradient(ellipse at 50% 80%, #1a5a2a, #0d2818);
    border-radius: 20px;
    padding: 32px;
    border: 3px solid #2a7a3a;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.3), 0 8px 40px rgba(0,0,0,0.4);
    min-height: 320px;
}
.bj-area { margin-bottom: 8px; }
.hand-label { font-size: 13px; color: rgba(255,255,255,0.5); font-weight: 600; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 2px; }
.hand-cards { display: flex; gap: 2px; flex-wrap: wrap; min-height: 90px; }
.hand-total { font-size: 22px; font-weight: 700; color: #fff; margin-top: 6px; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }

.bj-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 16px 0; }

.card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px; height: 90px;
    background: linear-gradient(145deg, #fff, #f0f0f0);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.8);
    position: relative;
    opacity: 0;
    transform: translateY(-20px);
}
.card.card-in {
    animation: cardSlideIn 0.3s ease-out forwards;
}
@keyframes cardSlideIn {
    0% { opacity: 0; transform: translateY(-20px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.card.red { color: #e74c3c; }
.card .card-rank { font-size: 20px; font-weight: 800; line-height: 1; }
.card .card-suit { font-size: 16px; line-height: 1; }
.card-back {
    background: linear-gradient(135deg, #1a1a3e, #2a2a5a);
    color: #f0b90b;
    border: 2px solid #f0b90b;
}
.card-back .card-rank, .card-back .card-suit { display: none; }
.card-back span { font-size: 24px; display: block; }

.bj-result {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    padding: 12px;
    border-radius: 10px;
    margin-top: 12px;
    min-height: 48px;
}
.bj-result.win { background: rgba(46,204,113,0.15); color: #2ecc71; }
.bj-result.lose { background: rgba(231,76,60,0.15); color: #e74c3c; }
.bj-win-amount { font-size: 24px; margin-left: 8px; }

.bj-controls {
    background: rgba(26,26,46,0.9);
    border: 1px solid #2a2a4a;
    border-radius: 12px;
    padding: 20px;
}
.bj-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.bj-bet-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.bj-bet-display strong { color: #f0b90b; }
.bj-actions { display: flex; gap: 8px; margin-top: 12px; }
.btn-action {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-action.hit { background: #3498db; color: #fff; }
.btn-action.hit:hover { background: #2980b9; }
.btn-action.stand { background: #e74c3c; color: #fff; }
.btn-action.stand:hover { background: #c0392b; }
.btn-action.dbl { background: #f0b90b; color: #000; }
.btn-action.dbl:hover { background: #d4a008; }
.btn-action:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- CONFETTI ---- */
.confetti-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
    display: none;
}

/* ============================================================
   RESPONSIVE CASINO
   ============================================================ */
@media (max-width: 768px) {
    .roulette-main { flex-direction: column; }
    .betting-section { min-width: 0; }
    .slot-cell { width: 64px; height: 72px; font-size: 28px; }
    .wheel-bg { width: 220px; height: 220px; }
    .wn { transform-origin: center 110px !important; }
    .table-cell { width: 36px; height: 34px; font-size: 11px; }
    .table-zero { width: 36px; height: 36px; font-size: 14px; }
    .card { width: 48px; height: 70px; }
    .card .card-rank { font-size: 16px; }
    .card .card-suit { font-size: 13px; }
}
