/**
 * LIQUID GLASS DESIGN SYSTEM
 * Apple-style frosted glass: deep blur, saturation boost, specular highlights,
 * hairline borders, soft depth, springy motion.
 */
:root {
    --app-bg: #02040F;
    --app-surface: rgba(255, 255, 255, 0.045);
    --app-surface-strong: rgba(255, 255, 255, 0.07);
    --app-surface-solid: #060B1F;
    --app-border: rgba(255, 255, 255, 0.09);
    --app-border-strong: rgba(255, 255, 255, 0.16);
    --app-highlight: rgba(255, 255, 255, 0.14);
    --app-primary: #3B82F6;
    --app-primary-light: #60A5FA;
    --app-cyan: #22D3EE;
    --app-text: #EAF2FF;
    --app-muted: #94A3B8;
    --app-radius-lg: 28px;
    --app-radius: 20px;
    --app-radius-sm: 14px;
    --app-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    --app-shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.35);
    --app-blur: blur(36px) saturate(180%);
    --app-spring: cubic-bezier(0.34, 1.3, 0.5, 1);
}

body.app-modern {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--app-bg);
    color: var(--app-text);
    -webkit-font-smoothing: antialiased;
}

/* ===== AURORA BACKGROUND ===== */
.app-modern .bg-animation {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: var(--app-bg);
}

.app-modern .bg-animation::before {
    content: '';
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(38% 32% at 18% 22%, rgba(59, 130, 246, 0.22), transparent 70%),
        radial-gradient(34% 30% at 82% 12%, rgba(34, 211, 238, 0.14), transparent 70%),
        radial-gradient(40% 36% at 70% 85%, rgba(99, 102, 241, 0.16), transparent 70%),
        radial-gradient(30% 26% at 12% 88%, rgba(14, 116, 144, 0.14), transparent 70%);
    filter: blur(60px);
    animation: aurora-drift 26s ease-in-out infinite alternate;
}

.app-modern .bg-animation::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 10%, transparent 80%);
}

@keyframes aurora-drift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(3%, -2%) scale(1.06); }
    100% { transform: translate(-3%, 2%) scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
    .app-modern .bg-animation::before { animation: none; }
}

/* ===== GLASS NAV ===== */
.app-modern header {
    background: rgba(6, 11, 31, 0.55);
    -webkit-backdrop-filter: var(--app-blur);
    backdrop-filter: var(--app-blur);
    border-bottom: 1px solid var(--app-border);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* ===== GLASS SURFACES ===== */
.app-modern .glass-card,
.app-modern .glass {
    position: relative;
    background: var(--app-surface);
    -webkit-backdrop-filter: var(--app-blur);
    backdrop-filter: var(--app-blur);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow:
        var(--app-shadow-soft),
        inset 0 1px 0 var(--app-highlight);
    transition: transform 0.35s var(--app-spring), border-color 0.25s ease, box-shadow 0.35s ease;
}

.app-modern .glass-card:hover {
    border-color: var(--app-border-strong);
    box-shadow:
        var(--app-shadow),
        inset 0 1px 0 var(--app-highlight),
        0 0 0 1px rgba(96, 165, 250, 0.08);
}

/* Specular sheen sweep on glass surfaces */
.app-modern .glass-card::before,
.app-modern .glass::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.045) 46%, transparent 60%);
    pointer-events: none;
}

/* ===== BUTTONS ===== */
.app-modern .btn-app-primary,
.app-modern .btn-glass-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: 1px solid rgba(96, 165, 250, 0.45);
    border-radius: 100px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.92));
    box-shadow:
        0 10px 30px rgba(59, 130, 246, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s var(--app-spring), box-shadow 0.3s ease, filter 0.2s ease;
}

.app-modern .btn-app-primary:hover,
.app-modern .btn-glass-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 16px 44px rgba(59, 130, 246, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    filter: brightness(1.06);
}

.app-modern .btn-app-primary:active,
.app-modern .btn-glass-primary:active {
    transform: translateY(0) scale(0.99);
}

.app-modern .btn-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 24px;
    border: 1px solid var(--app-border-strong);
    border-radius: 100px;
    background: var(--app-surface-strong);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
    box-shadow: inset 0 1px 0 var(--app-highlight);
    color: var(--app-text);
    font-weight: 600;
    font-size: 14.5px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s var(--app-spring), background 0.25s ease, border-color 0.25s ease;
}

.app-modern .btn-glass:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.26);
    transform: translateY(-2px);
}

/* ===== PILLS / CHIPS ===== */
.app-modern .chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 15px;
    border-radius: 100px;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--app-muted);
    box-shadow: inset 0 1px 0 var(--app-highlight);
}

.app-modern .chip-primary {
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(59, 130, 246, 0.14);
    color: #93C5FD;
}

.app-modern .chip-success {
    border-color: rgba(52, 211, 153, 0.4);
    background: rgba(16, 185, 129, 0.12);
    color: #6EE7B7;
}

.app-modern .chip-danger {
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(239, 68, 68, 0.12);
    color: #FCA5A5;
}

/* ===== INPUTS ===== */
.app-modern input[type="text"],
.app-modern input[type="email"],
.app-modern input[type="number"],
.app-modern input[type="password"],
.app-modern select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.app-modern input:focus-visible,
.app-modern select:focus-visible {
    outline: none;
    border-color: rgba(96, 165, 250, 0.6) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

/* ===== LEGACY HOOKS (older pages keep working) ===== */
.app-modern .input-section,
.app-modern .bankroll-section,
.app-modern .auth-container,
.app-modern .admin-card,
.app-modern .page-header {
    border-color: var(--app-border);
}
