/* ==========================================================================
   Theme: Midnight Magic
   Deep Ink + Warm Brass - Refined, mysterious, premium
   ========================================================================== */

.theme-midnight,
body:not([class*="theme-"]) {
    /* Hintergruende - Deeper, richer blacks */
    --color-bg: #08080d;
    --color-bg-gradient: linear-gradient(
        145deg,
        #08080d 0%,
        #0f0f18 40%,
        #12121f 70%,
        #0a0a12 100%
    );
    --color-surface: #111118;
    --color-surface-elevated: #1a1a24;
    --color-surface-hover: #222230;

    /* Text - Warmer whites */
    --color-text: #e8e6e3;
    --color-text-muted: #8a8892;
    --color-heading: #faf9f7;

    /* Akzent - Warm Brass (nicht generisches Gold) */
    --color-accent: #c9a962;
    --color-accent-light: #dfc88a;
    --color-accent-dark: #a68a42;
    --color-accent-glow: rgba(201, 169, 98, 0.35);

    /* Sekundaerfarbe - Burgundy for depth */
    --color-secondary: #6b2d3a;
    --color-secondary-light: #8a3d4d;

    /* Spielkarten */
    --color-hearts: #c9424b;
    --color-spades: #faf9f7;
    --color-diamonds: #c9424b;
    --color-clubs: #faf9f7;

    /* Semantisch */
    --color-success: #5cb87a;
    --color-warning: #d4a84b;
    --color-error: #c9424b;

    /* Gradienten - Mehr Tiefe */
    --gradient-hero: linear-gradient(
        180deg,
        rgba(8, 8, 13, 0) 0%,
        rgba(8, 8, 13, 0.4) 40%,
        rgba(8, 8, 13, 0.85) 70%,
        rgba(8, 8, 13, 1) 100%
    );
    --gradient-gold: linear-gradient(
        135deg,
        #a68a42 0%,
        #c9a962 25%,
        #dfc88a 50%,
        #c9a962 75%,
        #a68a42 100%
    );
    --gradient-card: linear-gradient(
        155deg,
        #1a1a24 0%,
        #111118 60%,
        #0d0d14 100%
    );
    --gradient-shimmer: linear-gradient(
        110deg,
        transparent 0%,
        rgba(201, 169, 98, 0.03) 40%,
        rgba(201, 169, 98, 0.08) 50%,
        rgba(201, 169, 98, 0.03) 60%,
        transparent 100%
    );

    /* Schatten - Weicher, mehrstufig */
    --shadow-card:
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 16px 48px rgba(0, 0, 0, 0.2);
    --shadow-card-hover:
        0 4px 8px rgba(0, 0, 0, 0.25),
        0 12px 32px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(201, 169, 98, 0.08);
    --shadow-glow:
        0 0 20px rgba(201, 169, 98, 0.15),
        0 0 60px rgba(201, 169, 98, 0.1);
    --shadow-glow-intense:
        0 0 30px rgba(201, 169, 98, 0.25),
        0 0 80px rgba(201, 169, 98, 0.15),
        0 0 120px rgba(201, 169, 98, 0.08);

    /* Borders - Subtiler */
    --border-subtle: 1px solid rgba(255, 255, 255, 0.05);
    --border-accent: 1px solid rgba(201, 169, 98, 0.4);
    --border-glow: 1px solid rgba(201, 169, 98, 0.2);
}

/* ==========================================================================
   Grain Overlay - Adds texture, prevents flat AI look
   ========================================================================== */

.theme-midnight body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
}

/* ==========================================================================
   Theme-spezifische Overrides
   ========================================================================== */

/* Cards mit Shimmer-Effekt */
.theme-midnight .card {
    background: var(--gradient-card);
    border: var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.theme-midnight .card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: var(--gradient-shimmer);
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.theme-midnight .card:hover::after {
    left: 100%;
}

/* Buttons mit Premium-Feel */
.theme-midnight .btn-primary {
    background: var(--gradient-gold);
    color: #08080d;
    text-shadow: none;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.theme-midnight .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.theme-midnight .btn-primary:hover::before {
    left: 100%;
}

.theme-midnight .btn-primary:hover {
    box-shadow: var(--shadow-glow-intense);
    transform: translateY(-2px);
}

/* Sparkles verbessert */
.theme-midnight .sparkle {
    filter: brightness(1.3) saturate(1.2);
    box-shadow: 0 0 6px var(--color-accent);
}

/* Testimonials mit Border-Glow */
.theme-midnight .testimonial-card {
    border: var(--border-glow);
    background: linear-gradient(
        145deg,
        rgba(26, 26, 36, 0.8),
        rgba(17, 17, 24, 0.9)
    );
}

.theme-midnight .testimonial-card:hover {
    border-color: rgba(201, 169, 98, 0.35);
    box-shadow: 0 0 30px rgba(201, 169, 98, 0.08);
}

/* Divider mit Glow */
.theme-midnight .divider {
    box-shadow: 0 0 20px rgba(201, 169, 98, 0.3);
}

/* Feature Icons mit sanftem Glow */
.theme-midnight .feature-icon {
    filter: drop-shadow(0 0 8px rgba(201, 169, 98, 0.2));
}

/* Navigation glassmorphism */
.theme-midnight .nav {
    background: rgba(8, 8, 13, 0.85);
    backdrop-filter: blur(16px) saturate(1.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.theme-midnight .nav.scrolled {
    background: rgba(8, 8, 13, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

/* Hero verbessert */
.theme-midnight .hero-title {
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.5);
}

.theme-midnight .hero-subtitle {
    color: rgba(232, 230, 227, 0.75);
}

/* Inputs mit subtilerem Focus */
.theme-midnight .form-input:focus,
.theme-midnight .form-textarea:focus,
.theme-midnight .form-select:focus {
    border-color: var(--color-accent);
    box-shadow:
        0 0 0 3px rgba(201, 169, 98, 0.15),
        0 0 20px rgba(201, 169, 98, 0.1);
}

/* Badge Verfeinerung */
.theme-midnight .badge {
    background: var(--gradient-gold);
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* FAQ Items */
.theme-midnight .faq-item {
    border-color: rgba(255, 255, 255, 0.04);
    transition: border-color var(--transition-base);
}

.theme-midnight .faq-item:hover {
    border-color: rgba(201, 169, 98, 0.15);
}

/* Footer mit Tiefe */
.theme-midnight .footer {
    background: linear-gradient(
        180deg,
        #0d0d14 0%,
        #08080d 100%
    );
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

/* ==========================================================================
   Mobile Optimierungen
   ========================================================================== */

@media (max-width: 768px) {
    /* Grain-Overlay deaktivieren */
    .theme-midnight body::before {
        display: none;
    }

    /* Shimmer-Effekte deaktivieren */
    .theme-midnight .card::after {
        display: none;
    }

    .theme-midnight .btn-primary::before {
        display: none;
    }
}
