@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;0,900;1,600&display=swap');

:root {
    --sand-bg: #f8fafc;
    --sand-card: #ffffff;
    --sand-border: #e2e8f0;
    --gold-primary: #f59e0b;
    --gold-dark: #d97706;
    --gold-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gold-gradient-hover: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --dark-slate: #0b0f19;
    --dark-card: #0f172a;
    --sky-primary: #0284c7;
    --sky-gradient: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

* {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}

.font-mono {
    font-family: 'JetBrains Mono', "SFMono-Regular", Consolas, monospace;
}

.font-serif-title {
    font-family: 'Playfair Display', Georgia, serif;
}

body {
    background-color: var(--sand-bg);
    color: #1e293b;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================================================= */
/* Luxury Glass & Headers                                                   */
/* ========================================================================= */
.glass-header, .header-sand-glass {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.03);
}

.glass-card, .sand-card-glass {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover, .sand-card-glass:hover {
    box-shadow: 0 20px 40px -12px rgba(217, 119, 6, 0.12), 0 0 0 1px rgba(245, 158, 11, 0.25) inset;
    border-color: rgba(245, 158, 11, 0.35);
    transform: translateY(-2px);
}

.glass-sand-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.8) inset, 0 20px 40px -20px rgba(217, 119, 6, 0.12);
}

/* ========================================================================= */
/* Inputs & Forms                                                            */
/* ========================================================================= */
.glass-input, .glass-input-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-input:focus, .glass-input-box:focus-within {
    background: #ffffff;
    border-color: #d97706;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
    transform: translateY(-1px);
}

/* ========================================================================= */
/* World-Class Luxury Buttons                                                */
/* ========================================================================= */
.btn-gold, .btn-gold-action, .btn-luxury-gold, .btn-action-main {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.01em;
    border-radius: 1rem;
    box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-gold:hover, .btn-gold-action:hover, .btn-luxury-gold:hover, .btn-action-main:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 8px 24px 0 rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    filter: brightness(1.03);
}

.btn-gold:active, .btn-gold-action:active, .btn-luxury-gold:active, .btn-action-main:active {
    transform: scale(0.98);
}

.btn-telegram {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    font-weight: 800;
    border-radius: 1rem;
    box-shadow: 0 4px 14px 0 rgba(2, 132, 199, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-telegram:hover {
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    box-shadow: 0 8px 24px 0 rgba(2, 132, 199, 0.45);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #ffffff;
    color: #1e293b;
    font-weight: 700;
    border: 1.5px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.btn-dark {
    background: #0f172a;
    color: #ffffff;
    font-weight: 800;
    border-radius: 1rem;
    border: 1px solid #334155;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-dark:hover {
    background: #1e293b;
    border-color: #475569;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.3);
    transform: translateY(-2px);
}

/* ========================================================================= */
/* Ambient Auras                                                             */
/* ========================================================================= */
.ambient-gold {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
    pointer-events: none;
    filter: blur(80px);
}

.ambient-blue {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.07) 0%, transparent 70%);
    pointer-events: none;
    filter: blur(70px);
}

.ambient-aurora {
    background: radial-gradient(circle at 10% 20%, rgba(254, 243, 199, 0.6) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(240, 249, 255, 0.8) 0%, transparent 40%),
                radial-gradient(circle at 50% 50%, rgba(255, 251, 235, 0.5) 0%, transparent 50%),
                var(--sand-bg);
}

.sand-grid {
    background-size: 40px 40px;
    background-image: linear-gradient(to right, rgba(203, 213, 225, 0.3) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(203, 213, 225, 0.3) 1px, transparent 1px);
}

.modal-blur {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* ========================================================================= */
/* Responsive Table Styling                                                  */
/* ========================================================================= */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    min-width: 650px;
}

/* ========================================================================= */
/* Custom Scrollbar                                                          */
/* ========================================================================= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f8fafc; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Toast */
#toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    display: none;
    z-index: 99999;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#toast.show {
    display: flex;
    align-items: center;
    transform: translateY(0);
    opacity: 1;
}

/* Interactive Code Snippets */
pre, code {
    font-family: 'JetBrains Mono', monospace;
}

pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Responsive Utilities */
@media (max-width: 640px) {
    .glass-card {
        border-radius: 1.25rem;
        padding: 1rem;
    }
    
    .sand-card-glass {
        border-radius: 1.25rem;
        padding: 1.25rem;
    }

    #toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        text-align: center;
        justify-content: center;
    }
}
