/* css/style.css */
:root {
  --primary-color: #a855f7; /* Helles Violett */
  --primary-glow: rgba(168, 85, 247, 0.4);
  --bg-dark: #0f172a;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --nav-bg: rgba(15, 23, 42, 0.8);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: url('../assets/stitch.png') no-repeat center center fixed;
  background-size: cover;
  color: var(--text-main);
  min-height: 100vh;
  padding-bottom: 90px;
  overflow-x: hidden;
}

/* Dunkler Overlay über dem Hintergrundbild für bessere Lesbarkeit */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 10, 25, 0.75); /* Dunkler violetter Tint */
  z-index: -1;
}

/* Animationen 
@keyframes fadeInUp {
    from {
        opacity: 0;
        filter: blur(20px);
        -webkit-filter: blur(20px);
    }
    to {
        opacity: 1;
        filter: blur(0);
        -webkit-filter: blur(0);
    }
} */

.container {
  padding: 20px;
  max-width: 500px;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease-out;
}

header {
  padding: 40px 20px 20px;
  text-align: center;
}

header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(to right, #e879f9, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px var(--primary-glow);
}

/* Glassmorphism Card */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.card h2 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: #e9d5ff;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Formularelemente */
input {
  width: 100%;
  padding: 14px;
  margin-bottom: 15px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  transition: border-color 0.3s;
}

input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Violette Buttons */
button {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 4px 15px var(--primary-glow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

button:active {
  transform: scale(0.97);
}

/* Quiz-Optionen im Glass-Style */
.quiz-option {
  display: block;
  width: 100%;
  padding: 15px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: white;
  text-align: left;
  transition: all 0.3s;
}

.quiz-option.selected {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--primary-color);
  box-shadow: 0 0 15px var(--primary-glow);
}

.bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 15px; /* Etwas mehr Platz zu den Rändern */
  right: 15px;
  height: 70px; /* Minimal höher für 4 Icons */
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 1000;
}

.nav-item {
  flex: 1; /* Verteilt den Platz gleichmäßig auf alle 4 */
  text-decoration: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.65rem; /* Schrift etwas kleiner für 4 Items */
  transition: color 0.3s;
}

.nav-item.active {
  color: var(--primary-color);
}

.nav-icon {
  font-size: 1.4rem;
  margin-bottom: 2px;
}

/* Connection Status Banner */
.connection-status {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 5px;
  font-size: 0.7rem;
  text-align: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
}
.connection-status.online { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.connection-status.offline { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.delete-btn {
    background: rgba(239, 68, 68, 0.2) !important; /* Transparentes Rot */
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    padding: 5px 10px !important;
    width: auto !important;
    font-size: 0.9rem !important;
    margin-left: 10px;
    box-shadow: none !important;
}

.delete-btn:active {
    background: rgba(239, 68, 68, 0.4) !important;
}

.wish-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
}
/* Sperr-Bildschirm für Wünsche und Quiz */
.card {
  position: relative; /* Wichtig für das Overlay */
  overflow: hidden; 
}

.locked-content {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
  opacity: 0.5;
  transition: filter 0.5s ease, opacity 0.5s ease;
}

.unlock-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10;
  border-radius: 24px;
}

.timer-text {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 15px;
  text-shadow: 0 0 15px var(--primary-glow);
}
/* --- KI LADEBILDSCHIRM & MODAL --- */
.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin { 
  to { transform: rotate(360deg); } 
}

.modal-content {
  background: var(--nav-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 25px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  text-align: center;
}

.modal-content input {
  background: rgba(0,0,0,0.3);
  border-color: rgba(255,255,255,0.2);
  margin-bottom: 10px;
}

/* --- KING OF THE STITCH (GAME STYLES) --- */
.throne-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    /* NEU: Hintergrundfarbe von grau auf gold geändert */
    background: #FFD700; 
    border: 4px solid #B8860B; /* NEU: Dunklerer Goldton für den Rand */
    color: black; /* NEU: Textfarbe auf schwarz geändert für besseren Kontrast */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    transition: all 0.2s;
    cursor: pointer;
    margin: 0 auto;
    /* NEU: Standardmäßig schnell pulsierenden Glow-Effekt hinzufügen */
    animation: rapidPulse 1s infinite;
}

.throne-btn:active {
    transform: scale(0.95);
}

.throne-btn.active {
    background: #6c5ce7;
    border-color: #a29bfe;
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.6);
    /* NEU: Puls-Animation für den aktiven Zustand */
    animation: activePulse 2s infinite; 
    color: white; /* NEU: Textfarbe auf weiß geändert, wenn aktiv */
}

/* NEU: Keyframes für schnelles Pulsieren (Stürzen-Modus) */
@keyframes rapidPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(255, 215, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

/* NEU: Keyframes für das Standard-Pulsieren (Aktiver-Modus) */
@keyframes activePulse {
    0% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(108, 92, 231, 0); }
    100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0); }
}

.throne-btn.night-mode {
    background: #1e272e;
    border-color: #353b48;
    box-shadow: none;
    opacity: 0.7;
    cursor: not-allowed;
    animation: none;
    color: #b2bec3; /* NEU: Textfarbe für Nachtmodus */
}