/* =====================================================
   WITCHY MATCH PANEL — STYLE (Firebase Hosting Version)
   ===================================================== */

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

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

body {
    background: #0a0e1a;
    color: #e2e8f0;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    overflow: hidden;
}

/* =====================================================
   LOGIN SECTION
   ===================================================== */

#loginSection {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a103d 50%, #0a0e1a 100%);
    position: relative;
    overflow: hidden;
}

#loginSection::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
    animation: pulseGlow 4s ease-in-out infinite alternate;
}

#loginSection::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(167,139,250,0.1) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    border-radius: 50%;
    animation: pulseGlow 5s ease-in-out infinite alternate-reverse;
}

@keyframes pulseGlow {
    from { transform: scale(1); opacity: 0.6; }
    to   { transform: scale(1.2); opacity: 1; }
}

.login-card {
    position: relative;
    z-index: 2;
    width: 420px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow:
        0 0 60px rgba(124, 58, 237, 0.1),
        0 25px 50px rgba(0, 0, 0, 0.4);
    animation: cardAppear 0.6s ease-out;
}

@keyframes cardAppear {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .logo-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
    filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.4));
}

.login-logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-logo p {
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-input-group label {
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.login-input-group input {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(51, 65, 85, 0.8);
    background: rgba(15, 23, 42, 0.6);
    color: white;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
    outline: none;
}

.login-input-group input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
    background: rgba(15, 23, 42, 0.9);
}

.login-input-group input::placeholder {
    color: #475569;
}

.login-btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.login-error {
    display: none;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: 10px;
    padding: 12px 16px;
    color: #f87171;
    font-size: 13px;
    text-align: center;
    animation: shakeError 0.4s ease;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================================
   APP SECTION (Panel)
   ===================================================== */

#appSection {
    display: none;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    animation: panelAppear 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes panelAppear {
    from { opacity: 0; transform: scale(1.02); filter: blur(10px); }
    to   { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* =====================================================
   LAYOUT
   ===================================================== */

.container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* =====================================================
   SIDEBAR
   ===================================================== */

#sidebar {
    height: 100vh;
    width: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #0c0a1d 0%, #130f2d 40%, #1a1145 100%);
    padding: 20px 14px 40px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    border-right: 1px solid rgba(139, 92, 246, 0.1);
}

#sidebar h2 {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    padding: 0 8px;
    letter-spacing: -0.5px;
}

#sidebar.closing {
    width: 100vw;
    border-radius: 0 !important;
}

#sidebar.small {
    width: 250px;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow:
        4px 0 30px rgba(0, 0, 0, 0.4),
        1px 0 0 rgba(139, 92, 246, 0.15);
    overflow-y: auto;
}

#sidebar.small::-webkit-scrollbar { width: 3px; }
#sidebar.small::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.2); border-radius: 3px; }

.sidebar-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 28px;
    padding: 4px 10px 16px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.12);
}

.sidebar-header h2 {
    margin-bottom: 0 !important;
    font-size: 18px;
    background: linear-gradient(135deg, #c4b5fd, #a78bfa, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sidebar-user span {
    font-size: 11px;
    color: rgba(167, 139, 250, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}

.logout-btn {
    background: rgba(239,68,68,0.1) !important;
    border: 1px solid rgba(239,68,68,0.15) !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    color: rgba(248,113,113,0.8) !important;
    cursor: pointer;
    font-size: 10px !important;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: all 0.2s;
    width: auto !important;
    min-width: auto !important;
    flex-shrink: 0;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.25) !important;
    color: #f87171 !important;
    transform: none !important;
    border-color: rgba(239,68,68,0.3) !important;
}

/* MENU */
.menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 20px;
}

/* Top-level buttons (Players etc.) */
#sidebar > .menu > button[data-page],
.menu > button[data-page] {
    width: 100%;
    padding: 11px 14px;
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.08);
    border-radius: 10px;
    color: rgba(203, 213, 225, 0.85);
    cursor: pointer;
    transition: all 0.25s;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

#sidebar button[data-page]:hover {
    background: rgba(139, 92, 246, 0.15);
    color: white;
    transform: translateX(3px);
    border-color: rgba(139, 92, 246, 0.2);
}

#sidebar button[data-page].active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(99, 102, 241, 0.15));
    color: #c4b5fd;
    font-weight: 600;
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow:
        0 0 15px rgba(139, 92, 246, 0.1),
        inset 0 0 20px rgba(139, 92, 246, 0.05);
}

#sidebar button[data-page].active::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: linear-gradient(180deg, #a78bfa, #7c3aed);
    border-radius: 0 3px 3px 0;
}

.menu-icon {
    font-size: 15px;
    width: 20px;
    text-align: center;
}

/* =====================================================
   DROPDOWN MENUS
   ===================================================== */

.menu-dropdown {
    display: flex;
    flex-direction: column;
}

.dropdown-toggle {
    width: 100%;
    padding: 11px 14px;
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.08);
    border-radius: 10px;
    color: rgba(203, 213, 225, 0.85);
    cursor: pointer;
    transition: all 0.25s;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-toggle:hover {
    background: rgba(139, 92, 246, 0.15);
    color: white;
    border-color: rgba(139, 92, 246, 0.2);
}

.menu-dropdown.open > .dropdown-toggle {
    background: rgba(139, 92, 246, 0.12);
    color: #c4b5fd;
    border-color: rgba(139, 92, 246, 0.25);
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.dropdown-arrow {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(167, 139, 250, 0.4);
}

.menu-dropdown.open > .dropdown-toggle .dropdown-arrow {
    transform: rotate(90deg);
    color: #a78bfa;
}

.dropdown-items {
    max-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-left: 16px;
    padding-left: 12px;
    border-left: 2px solid rgba(139, 92, 246, 0.1);
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease,
                padding 0.25s ease;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 8px;
}

.dropdown-items.open {
    max-height: 500px;
    opacity: 1;
    padding-top: 6px;
    padding-bottom: 4px;
    border-left-color: rgba(139, 92, 246, 0.25);
}

.dropdown-items button[data-page] {
    padding: 8px 12px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    color: rgba(148, 163, 184, 0.8) !important;
    font-weight: 400 !important;
}

.dropdown-items button[data-page]:hover {
    background: rgba(139, 92, 246, 0.1) !important;
    color: #c4b5fd !important;
    border-color: rgba(139, 92, 246, 0.12) !important;
    transform: translateX(3px);
}

.dropdown-items button[data-page].active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(99, 102, 241, 0.1)) !important;
    color: #c4b5fd !important;
    font-weight: 600 !important;
    border-color: rgba(139, 92, 246, 0.25) !important;
}

.sub-icon {
    font-size: 12px;
    width: 18px;
    text-align: center;
    opacity: 0.7;
}

/* =====================================================
   CONTENT AREA
   ===================================================== */

#content {
    flex: 1;
    padding: 28px;
    overflow-y: auto;
    height: 100vh;
}

#content::-webkit-scrollbar { width: 6px; }
#content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
}

/* PAGE */
.page {
    display: none;
    animation: fadeSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.page.exiting {
    display: block !important;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   HOME PAGE STYLES
   ===================================================== */

.home-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.welcome-card {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    border-radius: 24px;
    padding: 40px;
    color: white;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
    position: relative;
    overflow: hidden;
}

.welcome-card::after {
    content: '🧙‍♀️';
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 150px;
    opacity: 0.1;
    transform: rotate(-15deg);
}

.welcome-text h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.welcome-text p {
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.info-card {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s;
}

.info-card:hover {
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-4px);
}

.info-card.full-width {
    grid-column: span 2;
}

.info-icon {
    font-size: 28px;
    margin-bottom: 16px;
}

.info-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: white;
}

.info-card p {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
}

.info-list {
    margin-top: 16px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-list li {
    font-size: 13px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-list li::before {
    content: '•';
    color: #7c3aed;
    font-weight: bold;
}

.quick-stats {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.q-stat {
    flex: 1;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.q-stat span {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.q-stat b {
    font-size: 24px;
    color: #a78bfa;
}

/* =====================================================
   PAGE HEADER
   ===================================================== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: white;
}

.header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* =====================================================
   ACTION BUTTONS
   ===================================================== */

.action-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.action-btn:hover { transform: translateY(-1px); }
.action-btn:active { transform: translateY(0); }

.action-btn.primary { background: #7c3aed; color: white; }
.action-btn.primary:hover { background: #6d28d9; box-shadow: 0 4px 12px rgba(124,58,237,0.4); }

.action-btn.secondary { background: #1e293b; color: #94a3b8; border: 1px solid #334155; }
.action-btn.secondary:hover { background: #334155; color: white; }

.action-btn.success { background: #059669; color: white; }
.action-btn.success:hover { background: #047857; box-shadow: 0 4px 12px rgba(5,150,105,0.4); }

.action-btn.danger { background: #dc2626; color: white; }
.action-btn.danger:hover { background: #b91c1c; }

.action-btn.large { padding: 14px 32px; font-size: 15px; }
.action-btn.full-width { width: 100%; justify-content: center; }

/* =====================================================
   PLAYER CARDS
   ===================================================== */

.players-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coin-player-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 4px;
}

.coin-player-list::-webkit-scrollbar { width: 4px; }
.coin-player-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.coin-player-item {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 60px;
}

.coin-player-item:hover {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.2);
}

.coin-player-item.selected {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.1);
}

.coin-player-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.coin-player-info b,
.coin-player-name {
    font-size: 14px;
    color: white;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coin-player-info span,
.coin-player-id {
    font-size: 11px;
    color: #475569;
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coin-player-balance,
.coin-player-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.coin-player-meta code {
    background: rgba(124, 58, 237, 0.1);
    color: #a78bfa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.coin-player-item b {
    color: white;
}

.coin-player-item span {
    color: #475569;
}

.card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #e2e8f0;
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.2s;
}

.card:hover {
    border-color: rgba(124,58,237,0.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.card-info h3 { font-size: 16px; font-weight: 600; color: white; }
.card-info p { font-size: 11px; color: #64748b; margin-top: 2px; }

.card-stats { display: flex; gap: 10px; }

.stat-box {
    background: rgba(124,58,237,0.1);
    border: 1px solid rgba(124,58,237,0.15);
    padding: 8px 14px;
    border-radius: 10px;
    min-width: 75px;
    text-align: center;
}

.stat-box span { font-size: 10px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-box b { display: block; font-size: 15px; color: white; margin-top: 2px; }

.card-actions { display: flex; gap: 8px; }

.card-actions button {
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: all 0.2s;
}

.edit-btn { background: #7c3aed; color: white; }
.edit-btn:hover { background: #6d28d9; }

.delete-btn { background: rgba(220,38,38,0.15); color: #f87171; border: 1px solid rgba(220,38,38,0.2); }
.delete-btn:hover { background: #dc2626; color: white; }

/* =====================================================
   EDIT PLAYER
   ===================================================== */

.edit-container { display: flex; justify-content: center; padding: 20px; }

.edit-card {
    width: 100%;
    max-width: 700px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.08);
}

.edit-card h2 { color: white; margin-bottom: 16px; }
.edit-header { margin-bottom: 20px; }
.edit-header span { display: block; font-size: 18px; font-weight: 600; color: white; }
.edit-header small { color: #64748b; }

.edit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.input-group { display: flex; flex-direction: column; }
.input-group label { font-size: 12px; color: #94a3b8; margin-bottom: 6px; font-weight: 500; }

.input-group input, .input-group select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #0f172a;
    color: white;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.edit-actions { display: flex; justify-content: flex-end; gap: 10px; }

.save-btn {
    background: #7c3aed; border: none; padding: 10px 20px; border-radius: 10px;
    color: white; cursor: pointer; font-weight: 600; font-family: 'Inter', sans-serif; transition: all 0.2s;
}
.save-btn:hover { background: #6d28d9; }

.cancel-btn {
    background: #1e293b; border: 1px solid #334155; padding: 10px 20px; border-radius: 10px;
    color: #94a3b8; cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.2s;
}
.cancel-btn:hover { background: #334155; color: white; }

/* =====================================================
   FRIEND SYSTEM STYLES
   ===================================================== */

.friends-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
}

.friends-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.friend-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.friend-detail-header h3 {
    font-size: 20px;
    color: white;
    margin-bottom: 4px;
}

.friend-detail-header p {
    font-size: 12px;
    color: #64748b;
}

.friend-code-badge {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.friend-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.friend-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.2s;
}

.friend-item:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(124, 58, 237, 0.2);
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
}

.friend-id {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 4px;
}

.friend-time {
    font-size: 10px;
    color: #475569;
}

.friend-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
    min-width: 80px;
}

.friend-stats span {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.friend-remove-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.friend-remove-btn:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.search-box {
    display: flex;
    gap: 8px;
    background: rgba(15, 23, 42, 0.6);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    padding: 8px 12px;
    font-size: 13px;
    width: 200px;
    outline: none;
}

.empty-state-card {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    text-align: center;
    color: #64748b;
    border: 1px dashed rgba(255,255,255,0.1) !important;
}

/* =====================================================
   LEADERBOARD STYLES
   ===================================================== */

.leaderboard-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.leaderboard-stats {
    display: flex;
    gap: 16px;
}

.l-stat {
    flex: 1;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.l-stat span {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.l-stat b {
    font-size: 28px;
    color: #fbbf24;
}

.leaderboard-card {
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    overflow: hidden;
}

.lb-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.lb-table th {
    background: rgba(139, 92, 246, 0.08);
    padding: 16px 20px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lb-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 14px;
    color: #cbd5e1;
}

.lb-table tr:last-child td {
    border-bottom: none;
}

.lb-rank {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    font-weight: 700;
    font-size: 13px;
    color: #94a3b8;
}

/* Rank Highlights */
.rank-gold .lb-rank { background: linear-gradient(135deg, #fbbf24, #d97706); color: white; box-shadow: 0 0 15px rgba(251, 191, 36, 0.3); }
.rank-silver .lb-rank { background: linear-gradient(135deg, #94a3b8, #64748b); color: white; box-shadow: 0 0 15px rgba(148, 163, 184, 0.3); }
.rank-bronze .lb-rank { background: linear-gradient(135deg, #b45309, #78350f); color: white; box-shadow: 0 0 15px rgba(180, 83, 9, 0.3); }

.lb-player {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lb-player b {
    font-size: 15px;
    color: white;
}

.lb-player span {
    font-size: 11px;
    color: #475569;
    font-family: monospace;
}

.lb-stars {
    font-weight: 700;
    color: #fbbf24 !important;
}

.lb-time {
    font-size: 12px !important;
    color: #64748b !important;
}

.lb-delete-btn {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.lb-delete-btn:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

/* =====================================================
   MODAL STYLES
   ===================================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 20px;
    color: white;
    font-weight: 700;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* =====================================================
   REWRITTEN COLLECTION SYSTEM STYLES
   ===================================================== */

.coll-grid-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

.coll-main-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.coll-cat-box {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.coll-cat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.coll-cat-title h3 {
    font-size: 20px;
    color: white;
    margin-bottom: 4px;
}

.coll-cat-title small {
    font-size: 11px;
    color: #475569;
    font-family: monospace;
}

.coll-cat-btns {
    display: flex;
    gap: 10px;
}

.coll-items-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.coll-item-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.coll-item-card:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.ci-icon {
    font-size: 26px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.15);
    border-radius: 14px;
    color: #a78bfa;
}

.ci-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ci-info b {
    font-size: 14px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ci-info span {
    font-size: 11px;
    color: #64748b;
}

.secret-tag {
    font-style: normal;
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    width: fit-content;
}

/* Side area / Player Detail */
.coll-side-area {
    position: sticky;
    top: 20px;
}

.player-collection-card {
    margin-top: 24px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 24px;
    animation: fadeSlide 0.4s ease;
}

.player-collection-card h4 {
    font-size: 18px;
    color: white;
    margin-bottom: 4px;
}

.player-collection-card p {
    font-size: 11px;
    color: #475569;
    font-family: monospace;
    margin-bottom: 20px;
}

.pc-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.pc-stat {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
}

.pc-stat span {
    display: block;
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.pc-stat b {
    font-size: 20px;
    color: #a78bfa;
}

.pc-items-scroll {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.pc-items-scroll::-webkit-scrollbar { width: 4px; }
.pc-items-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.05); border-radius: 4px; }

/* Sidebar players list */
.coll-players-scroll {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 8px;
}

.coll-players-scroll::-webkit-scrollbar { width: 4px; }
.coll-players-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.05); border-radius: 4px; }

.coll-player-node {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.coll-player-node:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.2);
}

.cp-name {
    font-size: 13px;
    color: white;
    font-weight: 700;
}

.cp-id {
    font-size: 10px;
    color: #64748b;
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coll-pc-cat h5 {
    font-size: 11px;
    color: #475569;
    text-transform: uppercase;
    margin: 16px 0 8px 0;
    letter-spacing: 1px;
}

.coll-pc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    margin-bottom: 6px;
    opacity: 0.4;
    transition: all 0.2s;
}

.coll-pc-item.active {
    opacity: 1;
    background: rgba(124, 58, 237, 0.06);
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.coll-pc-item span {
    font-size: 13px;
    color: #cbd5e1;
}

.coll-pc-tags {
    display: flex;
    gap: 4px;
}

.coll-pc-tags b {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
}

.t-un { background: #059669; color: white; }
.t-lo { background: #475569; color: white; }
.t-vi { background: #2563eb; color: white; }

.empty-sub {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: #475569;
    font-size: 13px;
}

/* =====================================================
   REMOTE CONFIG STYLES
   ===================================================== */

.remote-config-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.config-section {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.config-section h3 {
    font-size: 16px;
    color: #94a3b8;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.config-row:last-child {
    border-bottom: none;
}

.config-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.config-info b {
    font-size: 14px;
    color: white;
    font-family: monospace;
}

.config-info span {
    font-size: 11px;
    color: #475569;
}

.config-row input[type="number"],
.config-row input[type="text"] {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    width: 120px;
    text-align: right;
    transition: border-color 0.2s;
}

.config-row input[type="text"] {
    width: 180px;
}

.config-row input:focus {
    outline: none;
    border-color: #7c3aed;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #334155;
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked + .slider {
    background-color: #059669;
}

input:focus + .slider {
    box-shadow: 0 0 1px #059669;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* =====================================================
   LEVEL LIST
   ===================================================== */

.level-stats-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.level-stat {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 12px 20px;
    min-width: 120px;
    text-align: center;
}

.level-stat span { font-size: 11px; color: #64748b; display: block; }
.level-stat b { font-size: 20px; color: #a78bfa; }

.level-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding-right: 4px;
}

.level-list-container::-webkit-scrollbar { width: 4px; }
.level-list-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.level-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.level-card:hover {
    border-color: rgba(124,58,237,0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.level-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.level-card-header h4 { color: white; font-size: 14px; }

.level-card-badge {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.badge-easy { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-medium { background: rgba(251,191,36,0.15); color: #fbbf24; }
.badge-hard { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-extreme { background: rgba(168,85,247,0.15); color: #c084fc; }

.level-card-info {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.level-card-info span {
    font-size: 11px;
    color: #64748b;
    background: rgba(255,255,255,0.04);
    padding: 3px 8px;
    border-radius: 6px;
}

.empty-message {
    color: #475569;
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
    font-size: 14px;
}

/* =====================================================
   LEVEL EDITOR
   ===================================================== */

.editor-layout {
    display: flex;
    gap: 24px;
    height: calc(100vh - 80px);
}

.editor-settings {
    width: 300px;
    flex-shrink: 0;
    overflow-y: auto;
    padding-right: 8px;
}

.editor-settings::-webkit-scrollbar { width: 4px; }
.editor-settings::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.editor-settings h2 { color: white; font-size: 20px; margin-bottom: 16px; }

.setting-group {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
}

.setting-group h3 {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.setting-row label { font-size: 13px; color: #cbd5e1; }

.setting-row input, .setting-row select {
    width: 120px;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0f172a;
    color: white;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.setting-row input:focus, .setting-row select:focus {
    outline: none;
    border-color: #7c3aed;
}

/* Tile Picker */
.tile-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tile-pick-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    color: white;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tile-pick-btn:hover { transform: scale(1.1); }
.tile-pick-btn.selected { border-color: white; box-shadow: 0 0 10px rgba(255,255,255,0.3); }

.editor-grid-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.grid-canvas-wrapper {
    flex: 1;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 400px;
}

#gridCanvas { cursor: crosshair; }

.json-preview {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 16px;
    max-height: 250px;
    overflow-y: auto;
}

.json-preview h3 { font-size: 12px; color: #94a3b8; text-transform: uppercase; margin-bottom: 8px; }
.json-preview pre { font-size: 11px; color: #a78bfa; line-height: 1.5; white-space: pre-wrap; word-break: break-all; }

.editor-bottom-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

/* =====================================================
   BATCH GENERATOR
   ===================================================== */

.batch-container { display: flex; justify-content: center; padding: 40px 20px; }

.batch-card {
    width: 100%;
    max-width: 600px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
}

.batch-card h2 { color: white; font-size: 22px; margin-bottom: 8px; }
.batch-desc { color: #64748b; font-size: 13px; margin-bottom: 24px; }

.batch-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.batch-info {
    background: rgba(124,58,237,0.08);
    border: 1px solid rgba(124,58,237,0.15);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 20px;
    text-align: left;
}

.info-row span { font-size: 13px; color: #a78bfa; font-weight: 600; display: block; margin-bottom: 4px; }
.info-row small { font-size: 11px; color: #64748b; }

/* =====================================================
   PROGRESS BAR
   ===================================================== */

.progress-container {
    margin-top: 16px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #1e293b;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s;
}

.progress-container span { font-size: 12px; color: #94a3b8; }

/* =====================================================
   BATCH RESULT
   ===================================================== */

.batch-result { margin-top: 20px; }

.result-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.result-stat {
    background: rgba(5,150,105,0.1);
    border: 1px solid rgba(5,150,105,0.2);
    border-radius: 12px;
    padding: 12px 20px;
    text-align: center;
    min-width: 100px;
}

.result-stat span { font-size: 11px; color: #64748b; display: block; }
.result-stat b { font-size: 18px; color: #34d399; }

/* =====================================================
   PUBLISH
   ===================================================== */

.publish-container { display: flex; justify-content: center; padding: 30px 20px; }

.publish-card {
    width: 100%;
    max-width: 700px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 32px;
}

.publish-card h2 { color: white; font-size: 22px; margin-bottom: 24px; text-align: center; }
.publish-card h3 { color: #94a3b8; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }

.firebase-status {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.firebase-status.loading p { color: #64748b; }

.status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.status-item {
    background: rgba(124,58,237,0.08);
    border: 1px solid rgba(124,58,237,0.12);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.status-item span { font-size: 11px; color: #64748b; display: block; }
.status-item b { font-size: 18px; color: #a78bfa; }

.publish-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.publish-result {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
}

.publish-result.success { background: rgba(5,150,105,0.1); border: 1px solid rgba(5,150,105,0.2); color: #34d399; }
.publish-result.error { background: rgba(220,38,38,0.1); border: 1px solid rgba(220,38,38,0.2); color: #f87171; }

/* =====================================================
   EMPTY PAGE
   ===================================================== */

.empty-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    color: #475569;
}

.empty-page h2 { font-size: 24px; margin-bottom: 8px; color: #64748b; }

/* =====================================================
   TILE COLORS
   ===================================================== */

.tile-A { background: #ef4444; }
.tile-B { background: #3b82f6; }
.tile-C { background: #22c55e; }
.tile-D { background: #f59e0b; }
.tile-E { background: #a855f7; }
.tile-F { background: #ec4899; }
.tile-G { background: #14b8a6; }
.tile-H { background: #f97316; }
.tile-I { background: #06b6d4; }
.tile-J { background: #84cc16; }
.tile-K { background: #e11d48; }
.tile-L { background: #8b5cf6; }
.tile-Empty { background: #1e293b; }
.tile-Obstacle { background: #475569; border: 2px dashed #94a3b8 !important; }

/* =====================================================
   DROPDOWN MENUS
   ===================================================== */

.menu-dropdown {
    display: flex;
    flex-direction: column;
}

.dropdown-toggle {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-toggle:hover {
    background: rgba(255,255,255,0.18);
}

.dropdown-arrow {
    margin-left: auto;
    font-size: 11px;
    transition: transform 0.2s;
    color: rgba(255,255,255,0.5);
}

.dropdown-items {
    display: none;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
    padding-left: 12px;
    overflow: hidden;
    animation: dropdownOpen 0.25s ease;
}

.dropdown-items.open {
    display: flex;
}

@keyframes dropdownOpen {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dropdown-items button[data-page] {
    padding: 9px 12px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.03) !important;
}

.dropdown-items button[data-page]:hover {
    background: rgba(255,255,255,0.12) !important;
}

.dropdown-items button[data-page].active {
    background: rgba(255,255,255,0.9) !important;
    color: #6d28d9 !important;
    font-weight: 600;
}

.sub-icon {
    font-size: 13px;
}

/* =====================================================
   BLAZE PLAN WARNING
   ===================================================== */

.blaze-warning {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(245,158,11,0.04));
    border: 1px solid rgba(251,191,36,0.2);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.blaze-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.blaze-text b {
    display: block;
    font-size: 14px;
    color: #fbbf24;
    margin-bottom: 4px;
}

.blaze-text p {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
}

/* =====================================================
   UPLOAD ZONE
   ===================================================== */

.upload-section {
    margin-bottom: 20px;
}

.upload-card {
    max-width: 700px;
}

.upload-zone {
    background: linear-gradient(135deg, rgba(124,58,237,0.05), rgba(15,23,42,0.5));
    border: 2px dashed rgba(124,58,237,0.25);
    border-radius: 16px;
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.upload-zone:hover {
    border-color: rgba(124,58,237,0.5);
    background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(15,23,42,0.5));
    transform: translateY(-2px);
}

.upload-zone.drag-over {
    border-color: #7c3aed;
    background: rgba(124,58,237,0.15);
    box-shadow: 0 0 30px rgba(124,58,237,0.2);
    transform: scale(1.01);
}

.upload-zone.locked {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    border-color: rgba(71,85,105,0.3);
}

.upload-icon {
    font-size: 40px;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 10px rgba(124,58,237,0.3));
}

.upload-text {
    font-size: 15px;
    color: #cbd5e1;
    font-weight: 500;
    margin-bottom: 6px;
}

.upload-hint {
    font-size: 12px;
    color: #64748b;
}

.upload-progress {
    margin-top: 12px;
}

/* =====================================================
   ASSET INFO BAR
   ===================================================== */

.asset-info-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.asset-info-item {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 12px 16px;
    flex: 1;
    min-width: 200px;
}

.asset-info-item span {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.asset-info-item code {
    font-size: 11px;
    color: #a78bfa;
    font-family: 'Consolas', 'Monaco', monospace;
    background: rgba(124,58,237,0.08);
    padding: 3px 6px;
    border-radius: 4px;
    word-break: break-all;
}

/* =====================================================
   ASSET GRID (Images)
   ===================================================== */

.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    max-height: calc(100vh - 380px);
    overflow-y: auto;
    padding-right: 4px;
}

.asset-grid::-webkit-scrollbar { width: 4px; }
.asset-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.asset-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.2s;
}

.asset-card:hover {
    border-color: rgba(124,58,237,0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.asset-preview {
    width: 100%;
    height: 140px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
}

.asset-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.asset-details {
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.asset-name {
    font-size: 12px;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
    font-weight: 500;
}

.asset-size {
    font-size: 11px;
    color: #64748b;
}

.asset-actions {
    padding: 0 12px 12px;
    display: flex;
    gap: 6px;
}

.asset-actions .action-btn {
    padding: 6px 10px;
    font-size: 11px;
    flex: 1;
    justify-content: center;
}

/* =====================================================
   AUDIO ASSET LIST
   ===================================================== */

.audio-asset-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 380px);
    overflow-y: auto;
    padding-right: 4px;
}

.audio-asset-list::-webkit-scrollbar { width: 4px; }
.audio-asset-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.audio-asset-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.audio-asset-card:hover {
    border-color: rgba(124,58,237,0.3);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.audio-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 180px;
}

.audio-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.audio-details {
    display: flex;
    flex-direction: column;
}

.audio-name {
    font-size: 13px;
    font-weight: 500;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.audio-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.audio-controls {
    flex: 1;
}

.audio-controls audio {
    width: 100%;
    height: 32px;
    border-radius: 8px;
}

.audio-controls audio::-webkit-media-controls-panel {
    background: #1e293b;
}

.audio-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.audio-actions .action-btn {
    padding: 6px 12px;
    font-size: 11px;
}

/* =====================================================
   TOAST NOTIFICATION
   ===================================================== */

.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 8px 25px rgba(5,150,105,0.3);
    z-index: 1000;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 1.7s forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(20px); }
}

/* Toast variants */
.toast-success {
    background: linear-gradient(135deg, #059669, #047857) !important;
    box-shadow: 0 8px 25px rgba(5,150,105,0.3) !important;
}

.toast-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    box-shadow: 0 8px 25px rgba(220,38,38,0.3) !important;
}

/* =====================================================
   ECONOMY — STATS BAR
   ===================================================== */

.economy-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.economy-stat {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.25s;
}

.economy-stat:hover {
    border-color: rgba(124,58,237,0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.economy-stat-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124,58,237,0.12);
    border-radius: 12px;
    flex-shrink: 0;
}

.economy-stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.economy-stat-info span {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.economy-stat-info b {
    font-size: 20px;
    color: #a78bfa;
    font-weight: 700;
}

/* =====================================================
   ECONOMY — LAYOUT
   ===================================================== */

.economy-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1100px) {
    .economy-layout {
        grid-template-columns: 1fr;
    }
}

.economy-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.economy-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 24px;
    transition: all 0.2s;
}

.economy-card:hover {
    border-color: rgba(124,58,237,0.15);
}

.economy-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 16px;
}

.economy-desc {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* =====================================================
   ECONOMY — SEARCH
   ===================================================== */

.economy-search {
    margin-bottom: 14px;
}

.economy-search input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #334155;
    background: #0f172a;
    color: white;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    outline: none;
}

.economy-search input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.economy-search input::placeholder {
    color: #475569;
}

/* =====================================================
   ECONOMY — PLAYER LIST
   ===================================================== */

.coin-player-list {
    max-height: 340px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.coin-player-list::-webkit-scrollbar { width: 4px; }
.coin-player-list::-webkit-scrollbar-thumb {
    background: rgba(139,92,246,0.2);
    border-radius: 4px;
}

.coin-player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: all 0.2s;
    gap: 12px;
    min-width: 0;
}

.coin-player-item:hover {
    background: rgba(124,58,237,0.08);
    border-color: rgba(124,58,237,0.15);
}

.coin-player-item.selected {
    background: rgba(124,58,237,0.15);
    border-color: rgba(124,58,237,0.35);
    box-shadow: 0 0 12px rgba(124,58,237,0.1);
}

.coin-player-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.coin-player-info b {
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.coin-player-info span {
    font-size: 11px;
    color: #64748b;
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.coin-player-meta {
    flex-shrink: 0;
    text-align: right;
}

.coin-player-meta code {
    background: rgba(124, 58, 237, 0.15);
    color: #a78bfa;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.coin-player-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.coin-player-id {
    font-size: 10px;
    color: #475569;
    font-family: monospace;
}

.coin-player-balance {
    display: flex;
    align-items: center;
    gap: 6px;
}

.coin-icon-small {
    font-size: 14px;
}

.coin-player-balance b {
    font-size: 14px;
    color: #fbbf24;
    font-weight: 700;
}

/* =====================================================
   ECONOMY — COIN DETAIL CARD
   ===================================================== */

.coin-detail-card {
    animation: fadeSlide 0.3s ease;
}

.coin-detail-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.coin-detail-name {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.coin-detail-id {
    font-size: 11px;
    color: #475569;
    font-family: monospace;
}

.coin-detail-balance {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 18px 20px;
    background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.15);
    border-radius: 14px;
    margin-bottom: 18px;
}

.coin-detail-balance span:first-child {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coin-detail-balance b {
    font-size: 32px;
    font-weight: 800;
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251,191,36,0.3);
}

.coin-unit {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 500;
}

/* =====================================================
   ECONOMY — COIN ACTIONS
   ===================================================== */

.coin-action-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coin-action-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.coin-action-row input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #0f172a;
    color: white;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s;
    min-width: 0;
}

.coin-action-row input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.coin-action-row .action-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* =====================================================
   ECONOMY — BULK DISTRIBUTION
   ===================================================== */

.bulk-settings {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.bulk-preview {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(124,58,237,0.06);
    border: 1px solid rgba(124,58,237,0.12);
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #94a3b8;
}

.bulk-preview b {
    color: #a78bfa;
    font-weight: 700;
}

/* =====================================================
   ECONOMY — INFO CARD
   ===================================================== */

.economy-info-card h3 {
    margin-bottom: 12px;
}

.economy-info-section {
    margin-bottom: 16px;
}

.economy-info-section:last-child {
    margin-bottom: 0;
}

.economy-info-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.economy-info-table {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
}

.economy-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(15,23,42,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}

.economy-info-row:last-child {
    border-bottom: none;
}

.economy-info-row:hover {
    background: rgba(124,58,237,0.06);
}

.economy-info-row.header-row {
    background: rgba(124,58,237,0.1);
}

.economy-info-row.header-row span,
.economy-info-row.header-row b {
    color: #a78bfa !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.economy-info-row span {
    font-size: 13px;
    color: #cbd5e1;
}

.economy-info-row b {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    text-align: right;
}

.economy-path {
    display: block;
    padding: 10px 16px;
    background: rgba(15,23,42,0.8);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    color: #a78bfa;
    font-size: 13px;
    font-family: monospace;
}

/* =====================================================
   POWERUP PRICES
   ===================================================== */

.powerup-container {
    max-width: 900px;
}

.powerup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 850px) {
    .powerup-grid {
        grid-template-columns: 1fr;
    }
}

.powerup-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all 0.25s;
}

.powerup-card:hover {
    border-color: rgba(124,58,237,0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.powerup-icon {
    font-size: 36px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124,58,237,0.1);
    border: 1px solid rgba(124,58,237,0.15);
    border-radius: 16px;
    flex-shrink: 0;
}

.powerup-info {
    flex: 1;
    min-width: 0;
}

.powerup-info h3 {
    font-size: 15px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.powerup-info p {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.powerup-price-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
    flex-shrink: 0;
    min-width: 110px;
}

.powerup-price-group label {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.powerup-price-group input {
    width: 110px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(251,191,36,0.2);
    background: rgba(251,191,36,0.06);
    color: #fbbf24;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-align: center;
    outline: none;
    transition: all 0.2s;
}

.powerup-price-group input:focus {
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251,191,36,0.15);
    background: rgba(251,191,36,0.1);
}

/* Powerup Actions */
.powerup-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

/* Prices Result */
.prices-result {
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    animation: fadeSlide 0.3s ease;
}

.prices-result.success {
    background: rgba(5,150,105,0.1);
    border: 1px solid rgba(5,150,105,0.25);
    color: #34d399;
}

.prices-result.error {
    background: rgba(220,38,38,0.1);
    border: 1px solid rgba(220,38,38,0.25);
    color: #f87171;
}

/* =====================================================
   DIAMOND SPECIFIC STYLES
   ===================================================== */

.diamond-balance {
    background: rgba(96,165,250,0.08) !important;
    border-color: rgba(96,165,250,0.15) !important;
}

.diamond-balance b {
    color: #60a5fa !important;
    text-shadow: 0 0 20px rgba(96,165,250,0.3) !important;
}

.diamond-player-balance b {
    color: #60a5fa !important;
}

/* =====================================================
   MILESTONE SETTINGS
   ===================================================== */

.milestone-container {
    max-width: 900px;
}

.milestone-card-main {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 30px;
}

.milestone-card-main h3 {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.milestone-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

@media (max-width: 850px) {
    .milestone-settings-grid {
        grid-template-columns: 1fr;
    }
}

.milestone-setting-card {
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.25s;
}

.milestone-setting-card:hover {
    border-color: rgba(96,165,250,0.25);
    background: rgba(96,165,250,0.04);
}

.milestone-setting-icon {
    font-size: 28px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(96,165,250,0.1);
    border: 1px solid rgba(96,165,250,0.15);
    border-radius: 14px;
    flex-shrink: 0;
}

.milestone-setting-info {
    flex: 1;
    min-width: 0;
}

.milestone-setting-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.milestone-setting-info p {
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
}

.milestone-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
    flex-shrink: 0;
    min-width: 100px;
}

.milestone-input-group label {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.milestone-input-group input {
    width: 100px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(96,165,250,0.2);
    background: rgba(96,165,250,0.06);
    color: #60a5fa;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-align: center;
    outline: none;
    transition: all 0.2s;
}

.milestone-input-group input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96,165,250,0.15);
    background: rgba(96,165,250,0.1);
}

/* Milestone Preview */
.milestone-preview {
    margin-bottom: 24px;
}

.milestone-preview h4 {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =====================================================
   POWERUP SYSTEM — FULL CARDS
   ===================================================== */

.powerup-system-container {
    max-width: 960px;
}

.powerup-full-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .powerup-full-grid { grid-template-columns: 1fr; }
}

.powerup-full-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 22px 24px;
    transition: all 0.25s;
}

.powerup-full-card:hover {
    border-color: rgba(124,58,237,0.3);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.powerup-full-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.powerup-full-title h3 {
    font-size: 15px;
    font-weight: 700;
    color: white;
    margin-bottom: 2px;
}

.powerup-full-title p {
    font-size: 12px;
    color: #64748b;
}

.powerup-full-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.powerup-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.powerup-field label {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.powerup-field input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(124,58,237,0.2);
    background: rgba(124,58,237,0.06);
    color: #a78bfa;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-align: center;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.powerup-field input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
    background: rgba(124,58,237,0.1);
}

/* Unlock Reward Section */
.unlock-reward-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 12px;
    margin-top: 4px;
}

.unlock-reward-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: rgba(15,23,42,0.5);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
}

.unlock-reward-item > span {
    font-size: 13px;
    color: #94a3b8;
}

.unlock-reward-item > span b {
    color: #a78bfa;
}

.unlock-reward-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.unlock-reward-input label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.unlock-reward-input input {
    width: 70px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(124,58,237,0.2);
    background: rgba(124,58,237,0.08);
    color: #a78bfa;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-align: center;
    outline: none;
    transition: all 0.2s;
}

.unlock-reward-input input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.unlock-reward-input > span {
    font-size: 12px;
    color: #64748b;
}

/* Stock Logic List */
.stock-logic-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stock-logic-item {
    font-size: 13px;
    color: #94a3b8;
    padding: 6px 10px;
    background: rgba(15,23,42,0.4);
    border-radius: 8px;
    border-left: 2px solid rgba(124,58,237,0.3);
}

.stock-logic-item span {
    color: #a78bfa;
    font-weight: 600;
}

/* =====================================================
   POWERUP STOCK — PLAYER STOCK GRID
   ===================================================== */

.stock-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 4px;
}

.stock-item {
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.stock-item:hover {
    border-color: rgba(124,58,237,0.2);
    background: rgba(124,58,237,0.04);
}

.stock-item-icon {
    font-size: 28px;
}

.stock-item-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stock-item-count {
    font-size: 32px;
    font-weight: 800;
    color: #a78bfa;
    text-shadow: 0 0 15px rgba(167,139,250,0.3);
    line-height: 1;
}

.stock-item-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    width: 100%;
}

.stock-item-actions input {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0f172a;
    color: white;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    text-align: center;
    outline: none;
    transition: all 0.2s;
    min-width: 0;
}

.stock-item-actions input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124,58,237,0.15);
}

.stock-item-actions .action-btn {
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

/* =====================================================
   DAILY REWARD SYSTEM
   ===================================================== */

/* Info Banner */
.daily-reward-info-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(251,191,36,0.06), rgba(245,158,11,0.03));
    border: 1px solid rgba(251,191,36,0.15);
    border-radius: 16px;
    padding: 18px 24px;
    margin-bottom: 20px;
    transition: all 0.25s;
}

.daily-reward-info-banner:hover {
    border-color: rgba(251,191,36,0.3);
    box-shadow: 0 4px 16px rgba(251,191,36,0.08);
}

.daily-reward-info-icon {
    font-size: 32px;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(251,191,36,0.1);
    border-radius: 14px;
}

.daily-reward-info-text b {
    display: block;
    font-size: 14px;
    color: #fbbf24;
    margin-bottom: 4px;
}

.daily-reward-info-text p {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
}

/* Reward Table Card */
.daily-reward-table-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 28px;
}

.daily-reward-table-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

/* Table */
.daily-reward-table-wrapper {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
}

.daily-reward-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.daily-reward-table thead th {
    background: rgba(124,58,237,0.12);
    color: #a78bfa;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(124,58,237,0.15);
}

.daily-reward-table tbody tr {
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.daily-reward-table tbody tr:last-child {
    border-bottom: none;
}

.daily-reward-table tbody tr:hover {
    background: rgba(124,58,237,0.04);
}

.daily-reward-table tbody td {
    padding: 12px 18px;
    vertical-align: middle;
}

/* Day special row (7th day) */
.day-special-row {
    background: rgba(251,191,36,0.04) !important;
}

.day-special-row:hover {
    background: rgba(251,191,36,0.08) !important;
}

/* Day Number */
.day-cell {
    width: 60px;
}

.day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(124,58,237,0.12);
    color: #a78bfa;
    font-size: 15px;
    font-weight: 700;
    border: 1px solid rgba(124,58,237,0.15);
}

.day-number.day-7 {
    background: linear-gradient(135deg, rgba(251,191,36,0.2), rgba(245,158,11,0.15));
    color: #fbbf24;
    border-color: rgba(251,191,36,0.3);
    box-shadow: 0 0 12px rgba(251,191,36,0.1);
}

/* Daily Select */
.daily-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    appearance: auto;
}

.daily-select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.daily-select:hover {
    border-color: rgba(124,58,237,0.3);
}

/* Daily Amount Input */
.daily-amount {
    width: 100px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(124,58,237,0.2);
    background: rgba(124,58,237,0.06);
    color: #a78bfa;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-align: center;
    outline: none;
    transition: all 0.2s;
}

.daily-amount:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
    background: rgba(124,58,237,0.1);
}

/* Special Day Checkbox */
.special-cell {
    text-align: center;
    width: 80px;
}

.daily-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #fbbf24;
    cursor: pointer;
    border-radius: 4px;
}

/* Streak Display */
.daily-streak-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.streak-stat {
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.streak-stat-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.streak-stat-value {
    font-size: 36px;
    font-weight: 800;
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251,191,36,0.3);
    line-height: 1;
}

.streak-stat-value.streak-date {
    font-size: 14px;
    color: #94a3b8;
    text-shadow: none;
    font-weight: 500;
}

.streak-stat-sub {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

/* Streak Progress */
.streak-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 16px;
    background: rgba(15,23,42,0.4);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.04);
}

.streak-day-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.streak-dot {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.streak-dot.completed {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    border-color: rgba(5,150,105,0.4);
    box-shadow: 0 0 10px rgba(5,150,105,0.2);
}

.streak-dot.current {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #0f172a;
    border-color: rgba(251,191,36,0.5);
    box-shadow: 0 0 12px rgba(251,191,36,0.3);
    animation: streakPulse 2s ease-in-out infinite;
}

.streak-dot.pending {
    background: rgba(30,41,59,0.8);
    color: #475569;
    border-color: rgba(255,255,255,0.06);
}

.streak-dot.special {
    position: relative;
}

.streak-dot.special::after {
    content: '🎁';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 12px;
}

.streak-day-label {
    font-size: 10px;
    color: #475569;
    font-weight: 500;
}

@keyframes streakPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(251,191,36,0.3); }
    50% { box-shadow: 0 0 20px rgba(251,191,36,0.5); }
}

/* Streak Actions */
.daily-streak-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.streak-set-input {
    width: 70px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #0f172a;
    color: white;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    text-align: center;
    outline: none;
    transition: all 0.2s;
}

.streak-set-input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

/* Reward Type Chips */
.daily-reward-types-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reward-type-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    font-size: 12px;
    color: #94a3b8;
    font-family: 'Consolas', 'Monaco', monospace;
    transition: all 0.2s;
}

.reward-type-chip:hover {
    border-color: rgba(124,58,237,0.2);
    background: rgba(124,58,237,0.06);
    color: #c4b5fd;
}

.reward-type-chip span {
    font-size: 16px;
}

/* =====================================================
   WHEEL SYSTEM (ŞANS ÇARKI)
   ===================================================== */

/* Rules Bar */
.wheel-rules-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

@media (max-width: 700px) {
    .wheel-rules-bar {
        grid-template-columns: 1fr;
    }
}

.wheel-rule-item {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.25s;
}

.wheel-rule-item:hover {
    border-color: rgba(168,85,247,0.25);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.wheel-rule-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(168,85,247,0.1);
    border: 1px solid rgba(168,85,247,0.15);
    border-radius: 14px;
    flex-shrink: 0;
}

.wheel-rule-text {
    flex: 1;
    min-width: 0;
}

.wheel-rule-text b {
    font-size: 14px;
    color: white;
    display: block;
    margin-bottom: 2px;
}

.wheel-rule-text p {
    font-size: 12px;
    color: #64748b;
}

.wheel-cooldown-edit {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.wheel-cooldown-edit input {
    width: 70px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(168,85,247,0.2);
    background: rgba(168,85,247,0.06);
    color: #c084fc;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-align: center;
    outline: none;
    transition: all 0.2s;
}

.wheel-cooldown-edit input:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168,85,247,0.15);
    background: rgba(168,85,247,0.1);
}

.wheel-cooldown-edit span {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

/* Total Weight Display */
.wheel-total-weight {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(168,85,247,0.08);
    border: 1px solid rgba(168,85,247,0.15);
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #94a3b8;
}

.wheel-total-weight b {
    color: #c084fc;
    font-size: 16px;
    font-weight: 700;
}

/* Probability Column */
.wheel-probability {
    font-size: 13px;
    font-weight: 600;
    color: #c084fc;
    background: rgba(168,85,247,0.08);
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    min-width: 50px;
    text-align: center;
}

/* Weight Input */
.wheel-weight-input {
    width: 80px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(168,85,247,0.2);
    background: rgba(168,85,247,0.06);
    color: #c084fc;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-align: center;
    outline: none;
    transition: all 0.2s;
}

.wheel-weight-input:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168,85,247,0.15);
    background: rgba(168,85,247,0.1);
}

/* Slice Actions */
.wheel-slice-actions {
    display: flex;
    gap: 10px;
}

/* Countdown Display */
.wheel-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px;
    background: rgba(168,85,247,0.06);
    border: 1px solid rgba(168,85,247,0.12);
    border-radius: 14px;
    margin-bottom: 18px;
    text-align: center;
}

.wheel-countdown-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.wheel-countdown-value {
    font-size: 28px;
    font-weight: 800;
    color: #c084fc;
    text-shadow: 0 0 15px rgba(168,85,247,0.3);
    font-family: 'Consolas', 'Monaco', monospace;
    letter-spacing: 2px;
}

/* =====================================================
   SHOP SYSTEM (MAĞAZA)
   ===================================================== */

/* Tabs */
.shop-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 5px;
}

.shop-tab {
    flex: 1;
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.shop-tab:hover {
    color: #cbd5e1;
    background: rgba(124,58,237,0.06);
}

.shop-tab.active {
    background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(99,102,241,0.15));
    color: #c4b5fd;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(124,58,237,0.15);
}

/* Tab Content */
.shop-tab-content {
    animation: fadeSlide 0.3s ease;
}

/* IAP Table Inputs */
.shop-text-input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s;
}

.shop-text-input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124,58,237,0.15);
}

.shop-text-input.id-input {
    font-family: 'Consolas', 'Monaco', monospace;
    color: #a78bfa;
    font-size: 12px;
}

.shop-text-input.price-input {
    color: #34d399;
    font-weight: 600;
    text-align: center;
    width: 100px;
}

.shop-diamond-input {
    width: 80px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(96,165,250,0.2);
    background: rgba(96,165,250,0.06);
    color: #60a5fa;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-align: center;
    outline: none;
    transition: all 0.2s;
}

.shop-diamond-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96,165,250,0.15);
}

/* Delete row button */
.shop-delete-btn {
    border: none;
    background: rgba(220,38,38,0.1);
    color: #f87171;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.shop-delete-btn:hover {
    background: rgba(220,38,38,0.25);
    color: #fca5a5;
}

/* Box Cards */
.box-card {
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.25s;
}

.box-card:hover {
    border-color: rgba(124,58,237,0.2);
}

.box-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.box-card-icon {
    font-size: 32px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124,58,237,0.1);
    border: 1px solid rgba(124,58,237,0.15);
    border-radius: 14px;
    flex-shrink: 0;
}

.box-card-fields {
    flex: 1;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.box-field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.box-field-group label {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.box-field-group input {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s;
}

.box-field-group input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124,58,237,0.15);
}

.box-card-delete {
    margin-left: auto;
    flex-shrink: 0;
}

/* Box Rewards Table */
.box-rewards-section h4 {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.box-rewards-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px;
    overflow: hidden;
}

.box-rewards-table th {
    background: rgba(124,58,237,0.08);
    color: #a78bfa;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 14px;
    text-align: left;
}

.box-rewards-table td {
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.box-rewards-table tr:last-child td {
    border-bottom: none;
}

.box-reward-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

/* =====================================================
   BATCH GENERATOR (TOPLU ÜRETİM)
   ===================================================== */

.batch-container {
    max-width: 800px;
    margin: 40px auto;
}

.batch-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.batch-card h2 {
    font-size: 28px;
    margin-bottom: 12px;
    color: white;
}

.batch-desc {
    color: #94a3b8;
    margin-bottom: 32px;
    font-size: 15px;
    line-height: 1.6;
}

.batch-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.batch-advanced-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    background: rgba(15, 23, 42, 0.4);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 32px;
    text-align: left;
}

.batch-advanced-grid .input-group label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.batch-settings .input-group input,
.batch-advanced-grid .input-group select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(51, 65, 85, 0.5);
    background: rgba(15, 23, 42, 0.4);
    color: white;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.25s;
}

.batch-advanced-grid .input-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.batch-settings .input-group input:focus,
.batch-advanced-grid .input-group select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
    background: rgba(15, 23, 42, 0.8);
}

.batch-advanced-grid .input-group select option {
    background: #1e293b;
    color: white;
    padding: 10px;
}

.batch-info {
    background: rgba(124, 58, 237, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 32px;
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.info-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-row span {
    font-size: 13px;
    font-weight: 600;
    color: #a78bfa;
}

.info-row small {
    font-size: 12px;
    color: #94a3b8;
}

.batch-result {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.result-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-stat span {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
}

.result-stat b {
    font-size: 24px;
    color: #34d399;
}

/* =====================================================
   MOBILE HAMBURGER BUTTON
   ===================================================== */

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.mobile-menu-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
}

.mobile-menu-btn.active {
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.5);
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: #c4b5fd;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =====================================================
   SIDEBAR OVERLAY (MOBILE)
   ===================================================== */

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* =====================================================
   MOBILE RESPONSIVE — MAX 768px
   ===================================================== */

@media (max-width: 768px) {

    /* --- Body & Globals --- */
    body {
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.mobile-sidebar-open {
        overflow: hidden;
    }

    /* --- Hamburger button --- */
    .mobile-menu-btn {
        display: flex;
    }

    /* --- Sidebar overlay --- */
    .sidebar-overlay {
        display: block;
        pointer-events: none;
    }

    /* --- App Section --- */
    #appSection {
        flex-direction: column;
        overflow: auto;
        height: auto;
        min-height: 100vh;
    }

    /* --- Container --- */
    .container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    /* --- Sidebar (mobile drawer) --- */
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px !important;
        height: 100vh !important;
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 100;
        border-radius: 0 20px 20px 0 !important;
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5) !important;
        overflow-y: auto !important;
        padding-top: 20px !important;
    }

    #sidebar.full {
        width: 280px !important;
        transform: translateX(-100%);
    }

    #sidebar.small {
        width: 280px !important;
        transform: translateX(-100%);
        border-top-right-radius: 20px !important;
        border-bottom-right-radius: 20px !important;
    }

    #sidebar.closing {
        width: 280px !important;
        transform: translateX(-100%);
        border-radius: 0 20px 20px 0 !important;
    }

    #sidebar.mobile-open {
        transform: translateX(0) !important;
    }

    /* --- Content --- */
    #content {
        height: auto;
        min-height: calc(100vh - 60px);
        padding: 68px 16px 24px;
        overflow-y: visible;
        width: 100%;
    }

    /* --- Login Card --- */
    .login-card {
        width: 92vw;
        max-width: 420px;
        padding: 32px 24px;
    }

    .login-logo .logo-icon {
        font-size: 40px;
    }

    .login-logo h1 {
        font-size: 20px;
    }

    .login-logo p {
        font-size: 12px;
    }

    .login-input-group input {
        padding: 12px 14px;
        font-size: 14px;
    }

    .login-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    /* --- Page Header --- */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .page-header h2 {
        font-size: 18px;
    }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .header-actions .action-btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
        padding: 8px 12px;
        font-size: 12px;
    }

    /* --- Action Buttons --- */
    .action-btn {
        padding: 8px 14px;
        font-size: 12px;
    }

    .action-btn.large {
        padding: 12px 24px;
        font-size: 14px;
    }

    /* --- Home Page --- */
    .welcome-card {
        padding: 24px 20px;
        border-radius: 18px;
    }

    .welcome-text h1 {
        font-size: 22px;
    }

    .welcome-text p {
        font-size: 14px;
    }

    .home-grid {
        grid-template-columns: 1fr;
    }

    .info-card.full-width {
        grid-column: span 1;
    }

    .info-card {
        padding: 18px;
        border-radius: 16px;
    }

    .q-stat b {
        font-size: 20px;
    }

    /* --- Player Cards --- */
    .card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 16px;
    }

    .card-stats {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
    }

    .stat-box {
        padding: 6px 10px;
        min-width: unset;
    }

    .card-actions {
        width: 100%;
        display: flex;
    }

    .card-actions button {
        flex: 1;
        justify-content: center;
    }

    /* --- Edit Player --- */
    .edit-card {
        padding: 20px;
        border-radius: 16px;
    }

    .edit-grid {
        grid-template-columns: 1fr;
    }

    .edit-header span {
        font-size: 16px;
    }

    .edit-header > div {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
    }

    /* --- Friends Page --- */
    .friends-layout {
        grid-template-columns: 1fr;
    }

    .friend-detail-header {
        flex-direction: column;
        gap: 12px;
    }

    .friend-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px;
    }

    .friend-stats {
        flex-direction: row;
        text-align: left;
        width: 100%;
        gap: 12px;
    }

    .friend-remove-btn {
        width: 100%;
        text-align: center;
    }

    .search-box {
        flex-direction: column;
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    /* --- Leaderboard --- */
    .leaderboard-stats {
        flex-direction: column;
        gap: 10px;
    }

    .leaderboard-card {
        border-radius: 14px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .lb-table {
        min-width: 600px;
    }

    .lb-table th, .lb-table td {
        padding: 10px 12px;
        font-size: 12px;
    }

    /* --- Collection Page --- */
    .coll-grid-layout {
        grid-template-columns: 1fr;
    }

    .coll-cat-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .coll-cat-btns {
        width: 100%;
        flex-wrap: wrap;
    }

    .coll-cat-btns .action-btn {
        flex: 1;
        justify-content: center;
        min-width: 70px;
    }

    .coll-items-wrap {
        grid-template-columns: 1fr;
    }

    .coll-side-area {
        position: static;
    }

    /* --- Remote Config --- */
    .config-grid {
        grid-template-columns: 1fr;
    }

    .config-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .config-row input[type="number"],
    .config-row input[type="text"] {
        width: 100%;
        text-align: left;
    }

    /* --- Level List --- */
    .level-stats-bar {
        flex-direction: column;
    }

    .level-list-container {
        grid-template-columns: 1fr;
        max-height: none;
    }

    /* --- Level Editor --- */
    .editor-layout {
        flex-direction: column;
        height: auto;
    }

    .editor-settings {
        width: 100%;
        overflow-y: visible;
        padding-right: 0;
    }

    .editor-grid-area {
        width: 100%;
    }

    .grid-canvas-wrapper {
        min-height: 300px;
        padding: 12px;
    }

    #gridCanvas {
        max-width: 100%;
        height: auto;
    }

    /* --- Batch Generate --- */
    .batch-container {
        padding: 20px 0;
        margin: 0;
    }

    .batch-card {
        padding: 24px 18px;
        border-radius: 18px;
    }

    .batch-card h2 {
        font-size: 22px;
    }

    .batch-settings {
        grid-template-columns: 1fr;
    }

    .batch-advanced-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .result-stats {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    /* --- Publish --- */
    .publish-container {
        padding: 20px 0;
    }

    .publish-card {
        padding: 24px 18px;
        border-radius: 18px;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    /* --- Economy Pages --- */
    .economy-stats-bar {
        grid-template-columns: 1fr 1fr;
    }

    .economy-layout {
        grid-template-columns: 1fr;
    }

    .economy-card {
        padding: 18px;
        border-radius: 14px;
    }

    .coin-detail-balance {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 14px 16px;
    }

    .coin-detail-balance b {
        font-size: 28px;
    }

    .coin-action-row {
        flex-direction: column;
        gap: 8px;
    }

    .coin-action-row input {
        width: 100%;
    }

    .coin-action-row .action-btn {
        width: 100%;
        justify-content: center;
    }

    .coin-player-list {
        max-height: 300px;
    }

    /* --- Powerup System --- */
    .powerup-grid {
        grid-template-columns: 1fr;
    }

    .powerup-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 18px;
    }

    .powerup-price-group {
        width: 100%;
        align-items: stretch;
    }

    .powerup-price-group input {
        width: 100%;
        text-align: center;
    }

    .powerup-full-grid {
        grid-template-columns: 1fr;
    }

    .powerup-full-fields {
        grid-template-columns: 1fr 1fr;
    }

    .powerup-full-card {
        padding: 18px;
    }

    /* --- Powerup Stock --- */
    .stock-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stock-item-count {
        font-size: 26px;
    }

    .stock-item-actions {
        flex-direction: column;
    }

    .stock-item-actions input {
        width: 100%;
    }

    /* --- Milestone --- */
    .milestone-settings-grid {
        grid-template-columns: 1fr;
    }

    .milestone-setting-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .milestone-input-group {
        width: 100%;
        align-items: stretch;
    }

    .milestone-input-group input {
        width: 100%;
    }

    /* --- Daily Reward --- */
    .daily-reward-info-banner {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }

    .daily-reward-table-card {
        padding: 18px;
    }

    .daily-reward-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .daily-streak-display {
        grid-template-columns: 1fr;
    }

    .streak-progress {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding: 12px;
    }

    .daily-streak-actions {
        flex-direction: column;
        gap: 8px;
    }

    .daily-streak-actions .action-btn {
        width: 100%;
        justify-content: center;
    }

    /* --- Wheel System --- */
    .wheel-rules-bar {
        grid-template-columns: 1fr;
    }

    .wheel-rule-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 16px;
    }

    .wheel-cooldown-edit {
        width: 100%;
    }

    .wheel-cooldown-edit input {
        flex: 1;
    }

    /* --- Shop System --- */
    .shop-tabs {
        flex-direction: column;
    }

    .shop-tab {
        padding: 10px 16px;
        font-size: 13px;
    }

    .box-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .box-card-fields {
        width: 100%;
    }

    .box-field-group {
        flex: 1;
        min-width: 0;
    }

    .box-field-group input {
        width: 100%;
    }

    .box-rewards-table {
        min-width: 450px;
    }

    .box-card .box-rewards-section {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* --- Asset Pages --- */
    .asset-info-bar {
        flex-direction: column;
    }

    .asset-info-item {
        min-width: unset;
    }

    .asset-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        max-height: none;
    }

    .upload-zone {
        padding: 30px 16px;
    }

    /* Audio assets */
    .audio-asset-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px;
    }

    .audio-info {
        min-width: unset;
        width: 100%;
    }

    .audio-controls {
        width: 100%;
    }

    .audio-actions {
        width: 100%;
    }

    .audio-actions .action-btn {
        flex: 1;
        justify-content: center;
    }

    /* --- Modal --- */
    .modal-content {
        max-width: 92vw;
        padding: 24px 18px;
        border-radius: 18px;
        max-height: 85vh;
        overflow-y: auto;
    }

    .modal-content h3 {
        font-size: 18px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .action-btn {
        width: 100%;
        justify-content: center;
    }

    .input-grid {
        grid-template-columns: 1fr !important;
    }

    /* --- Toast --- */
    .toast-notification {
        left: 16px;
        right: 16px;
        bottom: 16px;
        text-align: center;
    }

    /* --- Misc Fixes --- */
    .blaze-warning {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .unlock-reward-grid {
        grid-template-columns: 1fr;
    }

    .unlock-reward-item {
        padding: 14px;
    }

    .unlock-reward-input {
        width: 100%;
    }

    .bulk-preview {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .economy-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .daily-reward-types-grid {
        gap: 6px;
    }

    .reward-type-chip {
        font-size: 11px;
        padding: 6px 10px;
    }

    /* Fix tables in leaderboard to scroll */
    .leaderboard-card,
    .daily-reward-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .wheel-slice-actions {
        flex-direction: column;
        gap: 6px;
    }

    /* Powerup actions */
    .powerup-actions {
        flex-direction: column;
    }

    .powerup-actions .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* =====================================================
   VERY SMALL SCREENS — MAX 400px
   ===================================================== */

@media (max-width: 400px) {

    #content {
        padding: 64px 10px 20px;
    }

    .welcome-text h1 {
        font-size: 18px;
    }

    .welcome-card {
        padding: 20px 16px;
    }

    .economy-stats-bar {
        grid-template-columns: 1fr;
    }

    .stock-grid {
        grid-template-columns: 1fr;
    }

    .powerup-full-fields {
        grid-template-columns: 1fr;
    }

    .pc-stats-grid {
        grid-template-columns: 1fr;
    }

    .batch-card h2 {
        font-size: 18px;
    }

    .header-actions .action-btn {
        font-size: 11px;
        padding: 6px 10px;
    }

    .sidebar-header h2 {
        font-size: 16px;
    }

    .page-header h2 {
        font-size: 16px;
    }
}
