/**
 * Luxury Superdesign v2.0 - Premium Floating UI System
 * Theme: Deep Void & Metallic Gold
 * Reference: Glassmorphism patterns with ambient glows
 */

/* ============================================
   1. CSS VARIABLES
   ============================================ */
:root {
    /* Backgrounds */
    --bg-void: #050505;
    --bg-app: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-light: #1a1a2e;
    --bg-glass: rgba(15, 23, 42, 0.85);
    --bg-glass-light: rgba(255, 255, 255, 0.05);

    /* Gold Accent (Primary) - Metallic Gold */
    --gold-main: #D4AF37;
    --gold-bright: #FFD700;
    --gold-dim: rgba(212, 175, 55, 0.15);
    --gold-glow: rgba(255, 215, 0, 0.4);
    --gold-gradient: linear-gradient(135deg, #D4AF37 0%, #FFD700 50%, #FFC125 100%);

    /* Purple Accent (Secondary) */
    --purple-deep: #312e81;
    --purple-mid: #4c1d95;
    --purple-glow: rgba(139, 92, 246, 0.4);

    /* Text */
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    /* Borders */
    --border-gold: rgba(212, 175, 55, 0.3);
    --border-subtle: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 215, 0, 0.4);

    /* Radius */
    --radius-xl: 3rem;
    --radius-lg: 2rem;
    --radius-md: 1.5rem;
    --radius-sm: 1rem;
    --radius-pill: 9999px;

    /* Shadows */
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    --shadow-gold: 0 0 40px rgba(212, 175, 55, 0.5);
    --shadow-glow: 0 4px 25px rgba(255, 215, 0, 0.25);

    /* Spacing */
    --nav-height: 5rem;
    --sidebar-width: 200px;
    --content-max: 1600px;
}

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

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

::selection {
    background: var(--gold-bright);
    color: black;
}

body.luxury-superdesign {
    background: var(--bg-app);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* ============================================
   STANDARD BACKGROUND SYSTEM (applies to all apps)
   ============================================ */

/* Subtle ambient glow overlay */
body.luxury-superdesign::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 15% 15%, rgba(49, 46, 129, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 85%, rgba(212, 175, 55, 0.04) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
}

/* Subtle grid pattern overlay */
body.luxury-superdesign::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   3. SCROLL PROGRESS BAR
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-bright);
    transform-origin: left;
    z-index: 9999;
    mix-blend-mode: difference;
}

/* ============================================
   4. FLOATING CONTAINER SYSTEM
   ============================================ */
.super-app-wrapper {
    min-height: 100vh;
    background: var(--bg-void);
    padding: 1rem;
}

@media (min-width: 768px) {
    .super-app-wrapper {
        padding: 1.5rem;
    }
}

.super-app-container {
    max-width: var(--content-max);
    margin: 0 auto;
    background: var(--bg-app);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    min-height: calc(100vh - 3rem);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

@media (min-width: 768px) {
    .super-app-container {
        border-radius: var(--radius-xl);
    }
}

/* Grid Pattern Overlay */
.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Noise Texture Overlay */
.noise-overlay {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 0;
}

/* Ambient Glows */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    pointer-events: none;
    z-index: 0;
}

.ambient-glow--gold {
    top: -20%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--gold-main);
    opacity: 0.08;
    animation: pulse-slow 8s ease-in-out infinite;
}

.ambient-glow--purple {
    bottom: -15%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: var(--purple-deep);
    opacity: 0.04;
}

@keyframes pulse-slow {

    0%,
    100% {
        opacity: 0.06;
        transform: scale(1);
    }

    50% {
        opacity: 0.08;
        transform: scale(1.05);
    }
}

/* Main content area */
.app-content {
    position: relative;
    z-index: 1;
    padding: calc(var(--nav-height) + 2rem) 1.5rem 2rem;
}

@media (min-width: 768px) {
    .app-content {
        padding: calc(var(--nav-height) + 3rem) 3rem 3rem;
    }
}

/* ============================================
   5. GLASS NAVIGATION PILL
   ============================================ */
.global-nav {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    padding: 0.5rem 0.5rem 0.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-xl);
}

.global-nav__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.global-nav__brand:hover {
    color: var(--gold-bright);
}

.global-nav__brand svg {
    width: 28px;
    height: 28px;
    fill: var(--gold-bright);
}

.global-nav__status {
    display: none;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-family: monospace;
    letter-spacing: 0.5px;
}

@media (min-width: 768px) {
    .global-nav__status {
        display: flex;
    }
}

.global-nav__status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-bright);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.global-nav__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   6. PILL BUTTONS
   ============================================ */
.btn-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.btn-pill--solid {
    background: var(--gold-bright);
    color: #000;
    border: 1px solid var(--gold-bright);
    box-shadow: var(--shadow-glow);
}

.btn-pill--solid:hover {
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

.btn-pill--outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-pill--outline:hover {
    background: var(--bg-glass-light);
    border-color: var(--border-hover);
}

.btn-pill--ghost {
    background: var(--bg-glass-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.btn-pill--ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   7. GLASS PANELS & CARDS
   ============================================ */
.glass-panel {
    background: var(--bg-glass-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: all 0.3s ease;
}

.glass-panel:hover {
    border-color: var(--border-gold);
}

.glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.glass-card:hover {
    border-color: rgba(204, 255, 0, 0.3);
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card--highlight {
    border-color: var(--border-gold);
    background: var(--bg-surface-light);
}

/* ============================================
   8. SECTION LABELS
   ============================================ */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-gold);
    background: var(--gold-dim);
    color: var(--gold-bright);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.5rem;
}

.section-label::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-bright);
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   9. TYPOGRAPHY
   ============================================ */
.display-heading {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 500;
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.display-heading span {
    color: var(--gold-bright);
    font-style: italic;
    font-family: Georgia, serif;
}

.section-heading {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.body-text {
    font-size: 1.125rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 40rem;
}

/* ============================================
   10. BENTO GRID LAYOUT
   ============================================ */
.bento-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.bento-grid__item--large {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .bento-grid__item--large {
        grid-column: span 2;
        grid-row: span 2;
    }
}

.bento-grid__item--wide {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .bento-grid__item--wide {
        grid-column: span 2;
    }
}

/* ============================================
   11. CONTENT GRID WITH SIDEBAR
   ============================================ */
.content-grid-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .content-grid-sidebar {
        grid-template-columns: 1fr var(--sidebar-width);
    }
}

.sidebar-column {
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
    display: none;
}

@media (min-width: 1024px) {
    .sidebar-column {
        display: block;
    }
}

.slim-ad {
    width: 100%;
    min-height: 600px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   12. FLOATING BOTTOM AD (Responsive)
   ============================================ */
.global-ad {
    position: fixed;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg), 0 0 10px rgba(212, 175, 55, 0.1);
    max-width: calc(100% - 1rem);
    transition: all 0.4s ease, opacity 0.3s ease, transform 0.3s ease;
    overflow: hidden;
    font-size: 0.7rem;
    opacity: 1;
}

/* Hidden state for scroll-based visibility on mobile */
.global-ad.global-ad--hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(100%);
    pointer-events: none;
}

/* Tablet breakpoint */
@media (min-width: 768px) {
    .global-ad {
        bottom: 1rem;
        padding: 0.75rem 1.5rem;
        gap: 1rem;
        border-radius: var(--radius-lg);
        border-width: 2px;
        font-size: 0.8rem;
        max-width: 90%;
    }
}

/* Desktop breakpoint */
@media (min-width: 1024px) {
    .global-ad {
        bottom: 1.5rem;
        padding: 1rem 2rem;
        gap: 1.25rem;
        min-width: 40%;
        max-width: 70%;
        font-size: 0.875rem;
        box-shadow: var(--shadow-xl), 0 0 20px rgba(212, 175, 55, 0.15);
    }
}

/* Golden animated border glow on hover */
.global-ad::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--gold-bright) 25%,
            var(--gold-main) 50%,
            var(--gold-bright) 75%,
            transparent 100%);
    background-size: 200% 100%;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.global-ad:hover::before {
    opacity: 0.05;
    animation: shimmer-gold 2s linear infinite;
}

.global-ad:hover {
    border-color: var(--gold-bright);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(255, 215, 0, 0.15);
}

@media (min-width: 768px) {
    .global-ad:hover {
        transform: translateX(-50%) translateY(-2px);
    }
}

@keyframes shimmer-gold {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Inner glass overlay for depth */
.global-ad::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.global-ad__label {
    font-size: 0.6rem;
    color: var(--gold-bright);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    background: var(--gold-dim);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-pill);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .global-ad__label {
        font-size: 0.65rem;
        letter-spacing: 1.25px;
        padding: 0.3rem 0.6rem;
    }
}

@media (min-width: 1024px) {
    .global-ad__label {
        font-size: 0.7rem;
        letter-spacing: 1.5px;
        padding: 0.375rem 0.75rem;
    }
}

.global-ad__content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 500;
}

.global-ad__content img {
    height: 24px;
    border-radius: 4px;
}

@media (min-width: 768px) {
    .global-ad__content {
        gap: 0.75rem;
        font-size: 0.85rem;
    }
    
    .global-ad__content img {
        height: 32px;
    }
}

@media (min-width: 1024px) {
    .global-ad__content {
        gap: 1rem;
        font-size: 1rem;
    }
    
    .global-ad__content img {
        height: 40px;
    }
}

.global-ad__content a {
    color: var(--gold-bright);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.global-ad__content a:hover {
    text-shadow: 0 0 10px var(--gold-glow);
}

/* Ad spacer - responsive */
.ad-spacer {
    height: 80px;
    width: 100%;
}

@media (min-width: 768px) {
    .ad-spacer {
        height: 100px;
    }
}

@media (min-width: 1024px) {
    .ad-spacer {
        height: 140px;
    }
}

/* ============================================
   13. STAT CARDS
   ============================================ */
.stat-card {
    background: var(--bg-surface-light);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.02);
}

.stat-card__value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-card__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold-bright);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: monospace;
}

/* ============================================
   14. ICON BADGES
   ============================================ */
.icon-badge {
    width: 56px;
    height: 56px;
    background: var(--gold-dim);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-bright);
    margin-bottom: 1.5rem;
}

.icon-badge svg {
    width: 28px;
    height: 28px;
}

/* ============================================
   15. ANIMATIONS
   ============================================ */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fade-up 0.8s ease forwards;
}

.animate-delay-100 {
    animation-delay: 0.1s;
}

.animate-delay-200 {
    animation-delay: 0.2s;
}

.animate-delay-300 {
    animation-delay: 0.3s;
}

.animate-delay-400 {
    animation-delay: 0.4s;
}

/* Hover lift */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

/* ============================================
   16. UTILITY CLASSES
   ============================================ */
.text-gold {
    color: var(--gold-bright);
}

.text-muted {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

.font-mono {
    font-family: monospace;
}

.font-bold {
    font-weight: 700;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wide {
    letter-spacing: 0.5px;
}

.tracking-widest {
    letter-spacing: 2px;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-auto {
    margin-top: auto;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.min-h-screen {
    min-height: 100vh;
}