/**
 * HERMETIKA GLASSMORPHISM SYSTEM
 * 
 * Glass-morphic effects with backdrop blur
 * Creates depth and layering without heavy decoration
 */

/* ==========================================
   BASE GLASS LAYERS
   ========================================== */

.glass {
    background: rgba(20, 30, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(199, 164, 74, 0.15);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.glass-light {
    background: rgba(20, 30, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(199, 164, 74, 0.1);
}

.glass-heavy {
    background: rgba(20, 30, 42, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(199, 164, 74, 0.2);
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ==========================================
   SPECIALIZED GLASS COMPONENTS
   ========================================== */

.glass-card {
    background: rgba(20, 30, 42, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(199, 164, 74, 0.15);
    padding: var(--space-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(20, 30, 42, 0.65);
    border-color: rgba(199, 164, 74, 0.3);
    transform: translateY(-4px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(199, 164, 74, 0.15);
}

.glass-panel {
    background: rgba(14, 22, 33, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(199, 164, 74, 0.12);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.glass-nav {
    background: rgba(14, 22, 33, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(199, 164, 74, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   GRADIENT BORDERS
   ========================================== */

.glass-gradient-border {
    position: relative;
    background: rgba(20, 30, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 2px;
}

.glass-gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
            rgba(199, 164, 74, 0.4) 0%,
            rgba(58, 95, 111, 0.2) 50%,
            rgba(199, 164, 74, 0.4) 100%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
}

/* ==========================================
   FROSTED OVERLAYS
   ========================================== */

.glass-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14, 22, 33, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
}

.glass-modal {
    background: rgba(20, 30, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(199, 164, 74, 0.2);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ==========================================
   DEPTH LAYERS (Z-AXIS)
   ========================================== */

.depth-ground {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.depth-elevated {
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(199, 164, 74, 0.1);
}

.depth-floating {
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(199, 164, 74, 0.15);
}

.depth-highest {
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(199, 164, 74, 0.2);
}

/* ==========================================
   LIGHT REFRACTION EFFECTS
   ========================================== */

.glass-shimmer {
    position: relative;
    overflow: hidden;
}

.glass-shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.05) 50%,
            transparent 70%);
    transform: rotate(45deg);
    animation: shimmer 3s ease-in-out infinite;
}

/* ==========================================
   GLOW EFFECTS
   ========================================== */

.glow-gold {
    box-shadow:
        0 0 20px rgba(199, 164, 74, 0.3),
        0 0 40px rgba(199, 164, 74, 0.15);
}

.glow-gold-intense {
    box-shadow:
        0 0 30px rgba(199, 164, 74, 0.5),
        0 0 60px rgba(199, 164, 74, 0.25),
        inset 0 0 20px rgba(199, 164, 74, 0.1);
}

.glow-teal {
    box-shadow:
        0 0 20px rgba(58, 95, 111, 0.4),
        0 0 40px rgba(58, 95, 111, 0.2);
}

/* ==========================================
   INTERACTIVE STATES
   ========================================== */

.glass-interactive {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-interactive:hover {
    background: rgba(20, 30, 42, 0.75);
    border-color: rgba(199, 164, 74, 0.3);
    transform: translateY(-2px);
}

.glass-interactive:active {
    transform: translateY(0);
    background: rgba(20, 30, 42, 0.85);
}

/* ==========================================
   FALLBACK FOR NON-SUPPORTING BROWSERS
   ========================================== */

@supports not (backdrop-filter: blur(10px)) {

    .glass,
    .glass-light,
    .glass-heavy,
    .glass-card,
    .glass-panel,
    .glass-nav,
    .glass-gradient-border,
    .glass-modal {
        background: rgba(20, 30, 42, 0.95);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}