/* ═══════════════════════════════════════════════════════════
   WorldCashino Admin Panel — Premium Dark CSS
   ═══════════════════════════════════════════════════════════ */

/* ─── RESET & BASE ─── */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    box-sizing: border-box;
}

html, body {
    overscroll-behavior-y: contain;
    touch-action: manipulation;
}

body {
    background: #0B0F19;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    color: #F8FAFC;
}

/* ─── GLASS CARD ─── */
.glass-card {
    background: rgba(21, 27, 43, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.glass-card:active {
    transform: scale(0.98);
}

/* ─── NAV BUTTONS ─── */
.nav-btn {
    color: #94A3B8; /* textSub */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    border: none;
    background: transparent;
    position: relative;
}

.nav-btn:active {
    transform: scale(0.92);
    background: rgba(139, 92, 246, 0.1);
}

.nav-btn.active {
    color: #8B5CF6; /* brand */
    transform: translateY(-2px);
}

.nav-btn.active span {
    font-weight: 900;
}

.nav-btn.active i {
    text-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

.nav-btn span, .nav-btn i {
    transition: all 0.2s ease;
}

/* ─── TAB CONTENT ANIMATION ─── */
.tab-content {
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ─── MODALS ─── */
#user-modal.flex #user-modal-content {
    transform: translateY(0);
}

#user-modal-content {
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

#confirm-modal {
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#confirm-modal > div {
    animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ─── FORM INPUTS ─── */
input[type="text"],
input[type="number"],
input[type="search"],
textarea {
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    transition: all 0.15s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
textarea:focus {
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    background: rgba(21, 27, 43, 0.9);
}

/* Hide arrow spinners in number input */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* ─── BUTTONS ─── */
button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    transition: all 0.15s ease;
}

button:active {
    transform: scale(0.96);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none !important;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

/* ─── ANIMATIONS ─── */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes pulseSoft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulseSoft 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ─── BOTTOM NAV SAFE AREA ─── */
nav {
    padding-bottom: max(env(safe-area-inset-bottom), 12px);
}

/* ─── MOBILE RESPONSIVE ─── */
@media (max-width: 380px) {
    .nav-btn {
        font-size: 9px;
        padding: 4px 6px;
    }

    .nav-btn i {
        font-size: 18px;
    }
}

/* ─── TABLET ─── */
@media (min-width: 768px) {
    #app {
        max-width: 480px;
    }
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ─── FOCUS VISIBLE ─── */
button:focus-visible,
input:focus-visible {
    outline: 2px solid #8B5CF6;
    outline-offset: 2px;
}

/* ─── SELECTION ─── */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: #FFFFFF;
}

/* ─── LOADER OVERLAY ─── */
#loader {
    background: radial-gradient(circle at 50% 30%, #151B2B 0%, #0B0F19 100%);
}

/* ─── NO-AUTH STATE ─── */
#no-auth h1 {
    animation: shake 0.4s ease;
}

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

/* ─── INPUT LABEL ─── */
input::placeholder {
    color: #475569;
    opacity: 1;
}

/* ─── HOVER EFFECTS (Desktop only) ─── */
@media (hover: hover) {
    button:hover:not(:disabled) {
        filter: brightness(1.1);
    }

    .glass-card:hover {
        box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.4);
        border-color: rgba(255, 255, 255, 0.08);
    }
}

/* ─── PRINT ─── */
@media print {
    nav, header, button {
        display: none !important;
    }
}
