/* --- CSS VARIABLEN --- */
:root {
  --bg-color: #0f172a;
  --text-color: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-2: #10b981;
  --panel-bg: #1e293b;
  --panel-border: #334155;
  --nav-bg: rgba(15, 23, 42, 0.9);

  --font-mono: 'Consolas', 'Courier New', monospace;
  --font-sans: 'Inter', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', sans-serif;
}

body.light {
  --bg-color: #f8fafc;
  --text-color: #0f172a;
  --text-muted: #475569;
  --accent: #2563eb;
  --accent-2: #059669;
  --panel-bg: #ffffff;
  --panel-border: #e2e8f0;
  --nav-bg: rgba(248, 250, 252, 0.9);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-sans);
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

/* --- INTERAKTIVER HINTERGRUND --- */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
}

/* --- SPLASH SCREEN (NikOS Boot) --- */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
  font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
}

#splash-screen.splash-hidden {
  opacity: 0;
  pointer-events: none;
}

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

.splash-logo {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: -1px;
}

.splash-logo-bracket {
  color: #3b82f6;
  opacity: 0.6;
}

.splash-logo-text {
  color: #3b82f6;
  margin: 0 0.25rem;
}

.splash-bar-track {
  width: 200px;
  height: 3px;
  background: #1e293b;
  border-radius: 3px;
  margin: 0 auto 1rem;
  overflow: hidden;
}

.splash-bar-fill {
  width: 100%;
  height: 100%;
  background: #3b82f6;
  border-radius: 3px;
  transform-origin: left;
  transform: scaleX(0);
  animation: splash-load 1.2s ease-in-out forwards;
}

@keyframes splash-load {
  0%   { transform: scaleX(0); }
  30%  { transform: scaleX(0.3); }
  60%  { transform: scaleX(0.65); }
  100% { transform: scaleX(1); }
}

.splash-label {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 0.7rem;
  color: #475569;
  letter-spacing: 0.5px;
}

/* --- NAVIGATION --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--panel-border);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  transform: translateY(-100%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

nav.visible {
  transform: translateY(0);
}

.nav-brand {
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-brand:hover {
  opacity: 0.8;
}

.nav-links {
  display: flex;
  gap: 1.2rem;
}

.nav-links a {
  text-decoration: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
  cursor: pointer;
  padding: 5px 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.nav-links .nav-logout {
  color: #ef4444;
}

.nav-links .nav-logout:hover {
  color: #dc2626;
}

/* --- DARK / LIGHT MODE TOGGLE --- */
#mode-toggle {
  background: transparent;
  color: var(--text-color);
  border: 1px solid var(--panel-border);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  line-height: 1;
}

#mode-toggle:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
  transform: rotate(20deg);
}

/* --- PAGE WRAPPER & SECTIONS --- */
#main-content {
  padding: 6rem 1.5rem 3rem;
  max-width: 900px;
  margin: auto;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#main-content.visible {
  opacity: 1;
}

.page {
  display: none;
  animation: fadeInPage 0.4s ease-out forwards;
}

@keyframes fadeInPage {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.page.active {
  display: block;
}

header {
  margin-bottom: 2.5rem;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

header p {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  position: relative;
}

h2 {
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
  color: var(--text-color);
  font-weight: 600;
  border-bottom: 1px dotted var(--panel-border);
  padding-bottom: 0.8rem;
}

h3 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  color: var(--text-color);
  font-weight: 600;
}

p {
  line-height: 1.6;
  margin-bottom: 1rem;
  color: var(--text-color);
  font-size: 1.05rem;
}

p:last-child {
  margin-bottom: 0;
}

code {
  background: rgba(148, 163, 184, 0.1);
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* --- MUSIK HIGHLIGHT --- */
.music-highlight {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
  border: 1px solid var(--accent);
}

.music-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 1.5rem;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1.5rem;
}

.store-badge {
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.8rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.bg-amazon {
  background: #00a8e1;
  color: #000;
}

.bg-spotify {
  background: #1DB954;
  color: #000;
}

.bg-apple {
  background: #111;
  border: 1px solid #333;
}

.bg-deezer {
  background: #32323d;
}

.bg-youtube {
  background: #FF0000;
}

.bg-soundcloud {
  background: #ff7700;
}

.status-tag {
  display: inline-block;
  padding: 3px 8px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid #ef4444;
  border-radius: 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: bold;
  animation: pulse-red 2s infinite;
  vertical-align: middle;
  margin-left: 8px;
}

@keyframes pulse-red {
  0% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.6;
  }
}

/* --- FÄHIGKEITEN BADGES --- */
.badge-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1rem;
}

.badge {
  background: var(--bg-color);
  border: 1px solid var(--panel-border);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s;
}

.badge:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

/* Footer */
footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--panel-border);
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  align-items: center;
}

footer a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

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

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 10px;
}

/* --- LOGIN BEREICH CSS --- */
.login-input {
  width: 100%;
  padding: 12px;
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid var(--panel-border);
  color: var(--text-color);
  border-radius: 6px;
  font-family: var(--font-mono);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.login-btn-submit {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: var(--font-sans);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.login-btn-submit:hover:not(:disabled) {
  background: #2563eb;
}

.login-btn-submit:active:not(:disabled) {
  transform: scale(0.98);
}

.login-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- GESCHÜTZTER BEREICH (Glassmorphism) --- */
.protected-page {
  position: relative;
}

.protected-page-blur {
  filter: blur(3px);
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

/* Weißlicher Glaseffekt über dem geblurrten Kasten */
.protected-page-blur .card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

body.light .protected-page-blur .card {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(0, 0, 0, 0.08);
}

.protected-page-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.protected-page-box {
  text-align: center;
  max-width: 340px;
  width: 100%;
  padding: 2.5rem 2rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body.light .protected-page-box {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.protected-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1;
  display: block;
}

.protected-page-box h2 {
  border: none;
  padding-bottom: 0;
  margin-bottom: 0.5rem;
  font-size: 1.35rem;
  color: var(--text-color);
}

.protected-page-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0;
  line-height: 1.5;
}

.protected-login-btn {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 11px 30px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  letter-spacing: 0.3px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
  border: none;
  cursor: pointer;
}

.protected-login-btn:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.protected-login-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* --- DOWNLOAD LISTE --- */
.download-list {
  list-style: none;
  margin-top: 1.5rem;
}

.download-list li {
  margin-bottom: 1rem;
}

.download-list a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.download-list a:hover {
  color: var(--accent-2);
}

@media (max-width: 700px) {
  .nav-links {
    gap: 0.7rem;
    font-size: 0.85rem;
  }

  .nav-brand {
    display: none;
  }

  header h1 {
    font-size: 2rem;
  }
}