/* Ascunde scrollbar-ul */
::-webkit-scrollbar {
    display: none;
}
/* ==========================================================================
   1. VARIABILE ȘI CONFIGURARE DESIGN (Păstrate din stilul tău)
   ========================================================================== */
:root {
    --bg: #fbf7f2;
    --bg-soft: rgba(255, 255, 255, 0.72);
    --surface: rgba(255, 248, 244, 0.84);
    --surface-strong: rgba(255, 255, 255, 0.95);
    --text: #3f2f2a;
    --muted: #7b6460;
    --line: rgba(157, 112, 108, 0.18);
    --rose: #d98a95;
    --rose-deep: #bf5966;
    --sand: #e9d6c1;
    --cream: #fff7ef;
    --shadow: 0 18px 50px rgba(114, 67, 66, 0.12);
    --shadow-soft: 0 12px 30px rgba(114, 67, 66, 0.08);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --container: 800px; /* Optimizat pentru lizibilitate de text/poveste lungă */
    --font-display: "Cormorant Garamond", Georgia, serif;
    --font-body: "Manrope", "Segoe UI", sans-serif;
    --font-busuioc: "Busuioc", "Cormorant Garamond", Georgia, serif;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    margin-bottom: 2rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    cursor: pointer;

    /* Asta scoate linia de sub text sub orice formă */
    text-decoration: none;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    background: var(--surface-strong);
    color: var(--rose-deep);

    /* Ne asigurăm că nu apare underline nici la hover */
    text-decoration: none;
}
@font-face {
    font-family: "Busuioc";
    src: url("BusuiocFont.otf") format('opentype');
    font-display: swap;
}
/* ==========================================================================
   NIGHT / DARK MODE pentru Poveste
   ========================================================================== */
[data-theme="dark"] {
    --bg: #181214;
    --surface: rgba(32, 23, 26, 0.92);
    --surface-strong: rgba(45, 32, 36, 0.95);
    --text: #f5ebe9;
    --muted: #b8a09c;
    --line: rgba(217, 138, 149, 0.22);
    --rose: #e28091;
    --rose-deep: #ea6b7e;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] body {
    background:
            radial-gradient(circle at top left, rgba(217, 138, 149, 0.12), transparent 35%),
            radial-gradient(circle at bottom right, rgba(184, 79, 100, 0.15), transparent 40%),
            linear-gradient(180deg, #100c0d 0%, var(--bg) 100%);
}

[data-theme="dark"] p.code {
    background: rgba(15, 10, 11, 0.6);
    color: #e2d1cd;
}

[data-theme="dark"] .back-btn {
    background: var(--surface-strong);
    color: var(--text);
}
/* Teme alternative dacă sunt activate din JS ([data-theme]) */
[data-theme="rose"] {
    --bg: #fcf8f8;
    --surface: rgba(255, 246, 248, 0.88);
    --rose: #da7f92;
    --rose-deep: #b84f64;
    --sand: #f0dccf;
}
[data-theme="sand"] {
    --bg: #fcf7ef;
    --surface: rgba(255, 251, 245, 0.9);
    --rose: #cb8a74;
    --rose-deep: #9d4d44;
    --sand: #ebd6bf;
}
[data-theme="blush"] {
    --bg: #fff8f6;
    --surface: rgba(255, 244, 241, 0.88);
    --rose: #e06d6d;
    --rose-deep: #b83c3c;
    --sand: #eed6c2;
}

/* Reset de bază */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ==========================================================================
   2. STILIZARE BODY ȘI FUNDAL GRADIENT
   ========================================================================== */
body {
    margin: 0;
    min-height: 100vh;
    background:
            radial-gradient(circle at top left, rgba(217, 138, 149, 0.16), transparent 28%),
            radial-gradient(circle at bottom right, rgba(233, 214, 193, 0.35), transparent 34%),
            linear-gradient(180deg, #fff 0%, var(--bg) 100%);
    color: var(--text);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.7;
    padding: 4rem 1rem;
}

/* Efectul de grilă fină pe fundal */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
            linear-gradient(rgba(157, 112, 108, 0.08) 1px, transparent 1px),
            linear-gradient(90deg, rgba(157, 112, 108, 0.08) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.4;
    mask-image: linear-gradient(180deg, transparent 0%, black 15%, black 85%, transparent 100%);
    z-index: -1;
}

/* ==========================================================================
   3. STRUCTURA CONTAINERELOR (.div1, .div2, .div3)
   ========================================================================== */

/* .div1 - Wrapperul exterior (Shell-ul paginii) */
.div1 {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

/* .div2 - Cardul mare cu efect de sticlă (Glassmorphism) */
.div2 {
    width: min(var(--container), calc(100% - 1rem));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* .div3 - Zona interioară de padding și aliniere conținut */
.div3 {
    padding: clamp(2rem, 5vw, 4.5rem);
}

/* Decorare subtilă de fundal în interiorul cardului (un mic glow de trandafir) */
.div2::after {
    content: "";
    position: absolute;
    top: -10rem;
    right: -10rem;
    width: 25rem;
    height: 25rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 138, 149, 0.15), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ==========================================================================
   4. TIPOGRAFIE ȘI TEXTE (Povestea)
   ========================================================================== */

/* Titlul principal elegant */
h1 {
    margin: 0 0 2.5rem 0;
    font-family: var(--font-busuioc); /* Folosește fontul familiei Busuioc */
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 500;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-align: center;
    position: relative;
    padding-bottom: 1.2rem;
}

/* Linie decorativă sub titlu */
h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--sand), var(--rose));
    border-radius: 999px;
}

/* Paragrafele de poveste */
p {
    font-size: 1.1rem;
    margin: 0 0 1.2rem 0;
    color: var(--text);
    opacity: 0.95;
}

/* Evidențierea replicilor amuzante sau a accentelor tari (ex: "MARE!", "Yahoo!", "ОЙ ТЫ...") */
.accent {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--rose-deep);
}

/* ==========================================================================
   5. BLOCURILE DE COD (.code) - Pentru momentele tehnice ascunse
   ========================================================================== */
p.code {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.92rem;
    background: rgba(43, 32, 30, 0.04);
    border-left: 4px solid var(--rose);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin: 1.8rem 0;
    overflow-x: auto;
    white-space: pre-wrap; /* Păstrează indentarea codului */
    line-height: 1.6;
    color: #5a4540;
    box-shadow: inset 0 2px 8px rgba(114, 67, 66, 0.03);
}

/* Stil pentru accentele din interiorul codului (etichetele bold de poze) */
p.code b {
    color: var(--rose-deep);
    background: rgba(217, 138, 149, 0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-weight: 600;
}

/* ==========================================================================
   6. TEXTUL DE SUBSOL SAU DETALII MICI (.small)
   ========================================================================== */
p.small {
    font-size: 0.9rem;
    color: var(--muted);
    font-style: italic;
    margin-top: 3rem;
    text-align: center;
    border-top: 1px dashed var(--line);
    padding-top: 1.5rem;
}

/* ==========================================================================
   7. RESPONSIVITATE (Ajustări pentru Telefoane)
   ========================================================================== */
@media (max-width: 720px) {
    body {
        padding: 1.5rem 0.5rem;
    }

    .div2 {
        width: min(var(--container), calc(100% - 0.5rem));
        border-radius: var(--radius-lg);
    }

    .div3 {
        padding: 1.5rem 1.2rem;
    }

    h1 {
        margin-bottom: 1.8rem;
    }

    p {
        font-size: 1.02rem;
        margin-bottom: 1rem;
    }

    p.code {
        font-size: 0.85rem;
        padding: 1rem;
        margin: 1.4rem 0;
    }
}