/* ==========================================================================
   Interstellar Ball Manager - Space Dark Theme (Basis-Styles)
   ========================================================================== */

:root {
    /* Logo-Palette: tiefes Blau, Eisblau, Elektro-Cyan, Gold */
    --color-primary: #1E88E5;
    --color-primary-light: #70C6EB;
    --color-primary-dark: #0E5B9C;
    --color-accent: #FFD700;
    --color-accent-cyan: #00BFFF;
    
    /* Backgrounds – an Logo-Banner angelehnt */
    --color-bg: #0a1628;
    --color-bg-alt: #0E2A47;
    --color-bg-card: #0f2744;
    --color-bg-elevated: #143352;
    --color-bg-hover: #1a3d5c;
    
    /* Text – helles Eisblau wie Logo-Schrift */
    --color-text: #D4F1F9;
    --color-text-light: #ADD8E6;
    --color-text-muted: #5a9bb8;
    --color-text-bright: #E0FFFF;
    
    /* Borders – dezentes Blau/Grau */
    --color-border: #1e4d6b;
    --color-border-light: #2a6b8f;
    
    /* Effects – Glow in Logo-Farben */
    --glow-primary: 0 0 20px rgba(30, 136, 229, 0.25);
    --glow-accent: 0 0 20px rgba(255, 215, 0, 0.2);
    --glow-cyan: 0 0 20px rgba(0, 191, 255, 0.25);
    
    /* Fonts & Layout */
    --font-family-heading: 'Exo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-body: 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family: var(--font-family-body);
    --container-width: 1400px;
    --spacing: 1rem;
}

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

html {
    font-size: var(--sbm-font-size-base);
    line-height: 1.6;
    text-wrap: pretty;
    hyphens: auto;
}

body {
    margin: 0;
    font-family: var(--font-family);
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
}

/* Optional: Starfield background effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 50% 20%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 60% 50%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 70% 80%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 80% 40%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 90% 60%, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 15% 60%, rgba(255,255,255,0.15), transparent),
        radial-gradient(2px 2px at 35% 40%, rgba(255,255,255,0.1), transparent),
        radial-gradient(2px 2px at 55% 90%, rgba(255,255,255,0.15), transparent),
        radial-gradient(2px 2px at 75% 10%, rgba(255,255,255,0.1), transparent),
        radial-gradient(2px 2px at 95% 50%, rgba(255,255,255,0.15), transparent);
    background-size: 250px 250px;
    pointer-events: none;
    z-index: -1;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* Header – tiefes Blau wie Logo-Banner */
.site-header {
    background: linear-gradient(180deg, #0E2A47 0%, #0a1628 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-family-heading);
    font-size: var(--sbm-font-2xl, 1.75rem);
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.03em;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Logo als Bild: Gradient abschalten, Bild skalieren */
.logo:has(.site-logo-img) {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

.site-logo-img {
    display: block;
    height: 80px;
    width: auto;
    max-width: 100%;
}

.logo:hover {
    filter: brightness(1.2);
}

.logo:hover .site-logo-img {
    filter: brightness(1.2);
}

/* ==========================================================================
   Navigation - Kompakt & Interstellar (aufgepeppt)
   ========================================================================== */

.nav-list {
    display: flex;
    gap: 0.15rem;
    list-style: none;
    margin: 0;
    padding: 0.2rem;
    background: linear-gradient(
        165deg,
        #0E2A47 0%,
        #143352 25%,
        #1a3d5c 50%,
        #143352 75%,
        #0a1628 100%
    );
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 191, 255, 0.25);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.35),
        0 4px 16px rgba(0, 0, 0, 0.4),
        0 0 1px rgba(0, 191, 255, 0.15);
}

.nav-item {
    position: relative;
}

/* Kompakte Nav-Buttons – Logo-Blau mit Eisblau-Text */
.nav-item > a {
    position: relative;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-family-heading);
    text-transform: none;
    letter-spacing: 0.03em;
    font-size: var(--sbm-font-xs, 0.875rem);
    padding: 0.4rem 0.85rem;
    border-radius: 0.375rem;
    display: block;
    background: linear-gradient(
        180deg,
        #1a3d5c 0%,
        #143352 20%,
        #0f2744 50%,
        #0E2A47 80%,
        #0a1628 100%
    );
    border: 1px solid rgba(30, 136, 229, 0.4);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25),
        0 1px 3px rgba(0, 0, 0, 0.25);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease,
                box-shadow 0.25s ease, transform 0.2s ease;
    overflow: hidden;
    z-index: 1;
}

/* Schmaler Glanz-Streifen (Hover) */
.nav-item > a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        95deg,
        transparent 0%,
        rgba(255, 255, 255, 0.12) 40%,
        transparent 100%
    );
    transition: left 0.35s ease;
    z-index: 2;
}

/* Obere Akzentlinie – Elektro-Cyan wie im Logo */
.nav-item > a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 191, 255, 0.5) 50%,
        transparent 100%
    );
    border-radius: 1px;
    z-index: 3;
    opacity: 0.9;
}

.nav-item > a:hover {
    color: var(--color-text-bright);
    background: linear-gradient(
        180deg,
        #1e4d6b 0%,
        #1a3d5c 25%,
        #143352 60%,
        #0E2A47 100%
    );
    border-color: var(--color-accent-cyan);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2),
        0 0 18px rgba(0, 191, 255, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.nav-item > a:hover::before {
    left: 100%;
}

.nav-item > a:hover::after {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 191, 255, 0.85) 50%,
        transparent 100%
    );
}

/* Aktiver Tab – Gold-Akzent wie Logo-Streifen + Cyan-Glow */
.nav-item.active > a,
.nav-item.current > a {
    color: var(--color-text-bright);
    background: linear-gradient(
        180deg,
        #1a3d5c 0%,
        #143352 20%,
        #0f2744 50%,
        #0E2A47 85%,
        #0a1628 100%
    );
    border-color: var(--color-accent);
    box-shadow: 
        inset 0 1px 0 rgba(255, 215, 0, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2),
        0 0 24px rgba(0, 191, 255, 0.35),
        0 0 0 1px rgba(255, 215, 0, 0.35),
        0 2px 6px rgba(0, 0, 0, 0.3);
}

.nav-item.active > a::after,
.nav-item.current > a::after {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 215, 0, 0.7) 50%,
        transparent 100%
    );
    opacity: 1;
}

/* ==========================================================================
   Dropdown/Untermenü - Metallisches Panel
   ========================================================================== */

/* Unsichtbare Brücke zum Untermenü */
.nav-item > a + .nav-sublist::after {
    content: '';
    position: absolute;
    top: -1rem;
    left: 0;
    width: 100%;
    height: 1rem;
}

.nav-sublist {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: linear-gradient(
        180deg,
        #143352 0%,
        #0f2744 20%,
        #0E2A47 60%,
        #0a1628 100%
    );
    border: 1px solid var(--color-border-light);
    border-radius: 0.75rem;
    padding: 0.5rem;
    list-style: none;
    min-width: 200px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 15px 35px rgba(0, 0, 0, 0.5),
        0 5px 15px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(0, 191, 255, 0.12);
    transition: 
        opacity 0.2s ease, 
        visibility 0.2s ease,
        transform 0.2s ease;
    transition-delay: 0.15s;
    z-index: 1000;
}

/* Obere Akzentlinie des Panels – Cyan/Gold wie Logo */
.nav-sublist::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--color-accent-cyan) 30%,
        var(--color-accent) 70%,
        transparent 100%
    );
    border-radius: 2px;
}

/* Dropdown sichtbar machen */
.nav-item:hover > .nav-sublist {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    transition-delay: 0s;
}

/* Untermenü-Items - Kleine metallische Buttons */
.nav-subitem {
    margin: 0.25rem 0;
}

.nav-subitem a {
    position: relative;
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--sbm-font-xs, 0.875rem);
    border-radius: 0.375rem;
    background: linear-gradient(
        180deg,
        rgba(20, 51, 82, 0.5) 0%,
        rgba(14, 42, 71, 0.5) 100%
    );
    border: 1px solid transparent;
    transition: all 0.2s ease;
    overflow: hidden;
}

/* Linker Akzent-Streifen – Cyan */
.nav-subitem a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 2px;
    background: var(--color-accent-cyan);
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 2px;
}

.nav-subitem a:hover {
    color: var(--color-text-bright);
    background: linear-gradient(
        180deg,
        rgba(26, 61, 92, 0.7) 0%,
        rgba(20, 51, 82, 0.7) 100%
    );
    border-color: rgba(0, 191, 255, 0.35);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 10px rgba(0, 191, 255, 0.2);
    padding-left: 1.25rem;
}

.nav-subitem a:hover::before {
    opacity: 1;
}

/* Aktiver Untermenü-Eintrag – Eisblau/Gold */
.nav-subitem.active a,
.nav-subitem.current a {
    color: var(--color-primary-light);
    background: linear-gradient(
        180deg,
        rgba(30, 136, 229, 0.2) 0%,
        rgba(30, 136, 229, 0.1) 100%
    );
    border-color: rgba(0, 191, 255, 0.35);
    padding-left: 1.25rem;
}

.nav-subitem.active a::before,
.nav-subitem.current a::before {
    opacity: 1;
    background: linear-gradient(
        180deg,
        var(--color-accent-cyan),
        var(--color-accent)
    );
}

/* Main Content – erbt Basis 16px von html */
.site-main {
    min-height: calc(100vh - 200px);
    padding: calc(var(--spacing) * 2) 0;
}

/* Footer – erbt Basis 16px von html */
.site-footer {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    padding: calc(var(--spacing) * 1.5) 0;
    text-align: center;
    color: var(--color-text-muted);
}

.site-footer p {
    font-size: var(--sbm-font-sm, 0.9375rem);
}

.site-footer a {
    color: var(--color-text-light);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--color-primary-light);
}

.footer-nav {
    margin-bottom: calc(var(--spacing) * 0.75);
}

.footer-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1.5rem;
}

.footer-nav-item a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: var(--sbm-font-sm, 0.9375rem);
    transition: color 0.2s;
}

.footer-nav-item a:hover {
    color: var(--color-primary-light);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    line-height: 1.2;
    font-family: var(--font-family-heading);
    font-weight: 600;
    color: var(--color-text-bright);
    letter-spacing: 0.02em;
}

h1 { font-size: var(--sbm-font-4xl, 2.5rem); }
h2 { font-size: var(--sbm-font-3xl, 2rem); }
h3 { font-size: var(--sbm-font-2xl, 1.75rem); }

p {
    color: var(--color-text);
}

a {
    color: var(--color-primary-light);
    transition: color 0.2s;
}

a:hover {
    color: var(--color-accent);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-size: var(--sbm-font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    box-shadow: var(--glow-primary);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--color-bg-elevated);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

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

/* Cards */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px -1px rgb(0 0 0 / 0.3);
}

.card:hover {
    border-color: var(--color-border-light);
    box-shadow: 0 8px 20px -2px rgb(0 0 0 / 0.4), var(--glow-primary);
}

/* Forms */
input, select, textarea {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
    color: var(--color-text);
    font-size: var(--sbm-font-size-base);
    transition: all 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.25);
}

input::placeholder {
    color: var(--color-text-muted);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/* Selection */
::selection {
    background: rgba(0, 191, 255, 0.25);
    color: var(--color-text-bright);
}

/* Responsive */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: var(--spacing);
    }
    
    .nav-list {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    h1 { font-size: var(--sbm-font-4xl, 2.5rem); }
    h2 { font-size: var(--sbm-font-2xl, 1.75rem); }
    h3 { font-size: var(--sbm-font-xl, 1.5rem); }
}
