/* --- 1. Grundeinstellungen & Variablen --- */
:root {
    --bg-gradient: linear-gradient(135deg, #fff0f5 0%, #f3e5f5 100%);
    --primary: #d63384;
    --secondary: #7952b3;
    --accent: linear-gradient(90deg, var(--primary), var(--secondary));
    --text-main: #2c3e50;
    --text-light: #6c757d;

    --card-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --shadow-soft: 0 8px 24px rgba(149, 157, 165, 0.1);
    --shadow-hover: 0 12px 30px rgba(121, 82, 179, 0.15);

    --radius-l: 24px;
    --radius-m: 16px;
}

* { box-sizing: border-box; }

html {
    /* Verhindert das "Gummiband"-Ziehen über den Rand (wichtig für Handys) */
    overscroll-behavior: none;

    /* Fallback-Farbe (das Violett vom Ende deines Verlaufs) */
    background-color: #f3e5f5;
}

body {
    font-family: 'Inter', sans-serif;

    /* Der Verlauf ist jetzt FIXIERT -> Er bewegt sich beim Scrollen nicht */
    background: linear-gradient(135deg, #fff0f5 0%, #f3e5f5 100%);
    background-attachment: fixed;

    color: var(--text-main);
    margin: 0;
    padding: 20px;

    /* Mindestens so hoch wie der Bildschirm */
    min-height: 100vh;

    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.6;
    overflow-x: hidden;
}

.container { width: 100%; max-width: 800px; margin: 0 auto; }

/* --- Die einheitliche Box-Klasse --- */
.glass-box {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-soft);

    padding: 30px; /* Innenabstand */

    /* WICHTIG: Begrenzung und Zentrierung für ALLE Boxen (auch Header) */
    width: 100%;
    max-width: 800px;
    margin: 0 auto 24px auto; /* 0 oben, auto (mitte) rechts/links, 24px unten */

    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Header Anpassung --- */

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -1px;

    /* WICHTIG: Hier machen wir "Lena" normal (dunkelgrau) */
    color: var(--text-main);
    background: none; /* Kein Verlauf mehr im Hintergrund */
    -webkit-text-fill-color: initial; /* Reset für Webkit-Browser */
}

header h1 span {
    /* Die 18 wird jetzt ein eigenständiger Block in der Zeile */
    display: inline-block;

    /* Farbe: Pink */
    color: var(--primary);

    /* Größe & Position */
    font-size: 1em; /* 1em = Gleiche Größe wie "Lena". Wenn du es größer willst, nimm 1.2em */
    vertical-align: baseline; /* Sitzt jetzt auf der gleichen Linie, nicht mehr oben */
    margin-left: 5px; /* Ein kleiner Abstand zu "Lena" */

    /* Interaktion */
    cursor: pointer;
    transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Hover-Effekt bleibt */
header h1 span:hover {
    transform: scale(1.1);
}
header .subtitle { display: block; margin-top: 8px; color: var(--text-light); font-size: 1rem; text-transform: uppercase; }

/* Main ist jetzt nur noch ein unsichtbarer Rahmen */
main { width: 100%; padding: 0; background: transparent; box-shadow: none; border: none; }

h2 { font-size: 1.5rem; margin-top: 0; margin-bottom: 24px; color: var(--text-main); font-weight: 700; }

/* --- Countdown Inhalt --- */
.countdown-box h3 {
    margin: 0 0 4px 0;
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
#timer {
    font-size: 2rem; font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: var(--accent); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* --- Kalender Grid --- */
#calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.month-box {
    background: #fff; border-radius: var(--radius-m);
    padding: 20px 10px; text-align: center; font-weight: 600;
    color: var(--text-main); border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    display: flex; align-items: center; justify-content: center; min-height: 80px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Status: Offen */
.month-box.unlocked {
    cursor: pointer;
    background: linear-gradient(to bottom right, #ffffff, #fffbfd);
    border-color: rgba(214, 51, 132, 0.1);
}
.month-box.unlocked:hover {
    transform: scale(1.05); /* Vergrößern */
    box-shadow: var(--shadow-hover);
    border-color: rgba(214, 51, 132, 0.3);
    color: var(--primary);
    z-index: 5;
}

/* Status: Gesperrt */
.month-box.locked { background: #f1f3f5; color: #adb5bd; cursor: not-allowed; opacity: 0.7; }

/* --- Inhalt & Footer --- */
.responsive-img { width: 100%; height: auto; border-radius: var(--radius-m); box-shadow: var(--shadow-soft); margin: 24px 0; }
#month-content p { font-size: 1.1rem; line-height: 1.7; margin-bottom: 32px; }

.button {
    display: inline-flex; padding: 12px 24px; border-radius: 50px;
    font-weight: 600; text-decoration: none; cursor: pointer; border: none; font-size: 1rem;
    transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.button:hover { transform: scale(1.05); }

.button--ghost { background: transparent; color: var(--secondary); border: 2px solid rgba(121, 82, 179, 0.15); }
.button--ghost:hover { background: rgba(121, 82, 179, 0.05); border-color: var(--secondary); transform: scale(1.05); }

footer { margin-top: auto; padding-top: 20px; text-align: center; color: var(--text-light); font-size: 0.85rem; }
.footer-line { width: 60px; height: 4px; background: var(--accent); margin: 0 auto 12px auto; border-radius: 10px; opacity: 0.5; }
.heart-icon {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;

    /* 1. Die Farbe: Wir nehmen deinen Accent-Gradient */
    background: var(--accent);

    /* 2. Die Form: Wir nutzen das SVG als Maske */
    -webkit-mask: url('images/hearts.svg') no-repeat center;
    mask: url('images/hearts.svg') no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;

    vertical-align: -0.2em;
    margin: 0 4px;
}

/* Mobile */
@media (max-width: 600px) {
    #calendar-grid { grid-template-columns: repeat(2, 1fr); }
    .glass-box { padding: 24px 20px; }
    header h1 { font-size: 2rem; }
}

/* --- Styling für die Erklär-Box --- */
.info-box h3 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: var(--primary); /* Nutzt dein Pink */
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.info-box p {
    margin: 0;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.5;
}

/* --- BILDER IMMER IM HOCHFORMAT (Portrait) --- */
.responsive-img {
    width: 100%;
    /* Erzwingt Hochformat (Verhältnis 3:4) */
    aspect-ratio: 3 / 4;
    /* Schneidet das Bild zu, damit es nicht verzerrt */
    object-fit: cover;

    border-radius: var(--radius-m);
    box-shadow: var(--shadow-soft);
    margin: 24px 0;
    display: block;
}

/* --- OVERLAY FÜR DAS "18" SPECIAL --- */
#magic-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Dunkler Hintergrund */
    z-index: 9999; /* Ganz oben */
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px); /* Hintergrund verschwimmen lassen */
    animation: fadeIn 0.5s ease-out;
    cursor: pointer;
}

#magic-overlay img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(214, 51, 132, 0.6); /* Pinkes Leuchten */
    transform: scale(0.9);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    aspect-ratio: 3 / 4;
    /* Schneidet das Bild zu, damit es nicht verzerrt */
    object-fit: cover;
}

@keyframes popIn {
    to { transform: scale(1); }
}