html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    /* pattern background z JS:
       - veľkosť necháme natívnu (mozog patternu)
       - repeat je nastavený aj v JS, ale necháme ho aj tu
    */
    background-repeat: repeat;
}

/* helper na skrytie prvkov pri úvodnej obrazovke */
.hidden {
    display: none !important;
}

#container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 30px;
}

/* FANCY karta s otázkou */
#question {
    /* pôvodné vlastnosti nahradené/rozšírené */
    max-width: 700px;
    font-size: 1.6rem;
    padding: 28px 40px;
    border-radius: 18px;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.98), rgba(245,245,245,0.92));
    box-shadow:
        0 14px 35px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}

/* jemný „svetelný“ akcent v rohu karty */
#question::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -40%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255,255,255,0.8), transparent 60%);
    opacity: 0.9;
    pointer-events: none;
}

/* ÚVODNÁ ANIMÁCIA (zobrazenie/skrytie info textu) */
@keyframes intro-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes intro-fade-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
}

/* použitá pri prvom zobrazení info textu */
.intro-visible {
    animation: intro-fade-in 260ms ease-out both;
}

/* použitá pri prechode na prvú otázku */
.intro-hide {
    animation: intro-fade-out 220ms ease-in both;
}

/* NOVÉ ANIMÁCIE pre zmenu otázky */
@keyframes question-fade-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(4px) scale(0.99);
    }
}

@keyframes question-fade-in {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.question-fade-out {
    animation: question-fade-out 200ms ease-in forwards;
}

.question-fade-in {
    animation: question-fade-in 220ms ease-out forwards;
}

/* FANCY tlačidlo */
#nextBtn {
    align-self: center;
    margin: 16px 0 16px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    border-radius: 999px;
    border: none;
    color: #ffffff;
    background-image: linear-gradient(135deg, #4f46e5, #ec4899);
    box-shadow:
        0 10px 25px rgba(79, 70, 229, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

/* lesk na tlačidle */
#nextBtn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0.3),
        transparent 40%,
        transparent 60%,
        rgba(255, 255, 255, 0.25)
    );
    mix-blend-mode: screen;
    opacity: 0.6;
    pointer-events: none;
}

/* hover efekt */
#nextBtn:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow:
        0 14px 30px rgba(79, 70, 229, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.5);
    filter: brightness(1.05);
}

/* active efekt (klik) */
#nextBtn:active {
    transform: translateY(1px) scale(0.99);
    box-shadow:
        0 6px 16px rgba(79, 70, 229, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.4);
}

/* disabled stav, ak by bol použitý */
#nextBtn:disabled {
    cursor: default;
    opacity: 0.65;
    box-shadow: none;
    transform: none;
}

/* spodný blok s nastaveniami/hintom */
#hint {
    align-self: center;
    margin: 0;
    padding-top: 8px;
    font-size: 0.9rem;
    color: #555;
}

/* spodný pás pod vetou a checkboxom */
#bgToggleContainer {
    align-self: center;
    width: 100%;
    text-align: center;
    padding: 8px 0 24px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
}

#bgToggleContainer label {
    cursor: pointer;
}

#bgToggleContainer input[type="checkbox"] {
    margin-right: 6px;
}
