body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    /* Sytější, tmavší zimní modrý gradient pro lepší kontrast vloček i karet */
    background: linear-gradient(135deg, #1d3557 0%, #457b9d 100%);
    min-height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #2c3e50;
    overflow-x: hidden;
    position: relative;
}

/* Canvas pro padající sníh přes celé pozadí */
#snowCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

.card, .disney-split-container, .disney-wrapper {
    position: relative;
    z-index: 1;
}

.card {
    background: #ffffff;
    padding: 2.2rem;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card form, .card .nav-bar, .card p, .card h1, .card h2, .card .love-buttons-container {
    width: 100%;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.nav-arrow {
    background: #f1f3f5;
    color: #495057;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: bold;
    width: 38px;
    height: 38px;
    line-height: 36px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: inline-block;
}

.nav-arrow:hover {
    background: #e63946;
    color: white;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e63946;
}

h1, h2 {
    color: #d90429;
    margin-top: 0;
    font-size: 1.5rem;
    line-height: 1.3;
}

.question {
    font-size: 1rem;
    margin-bottom: 1.2rem;
    color: #4a5568;
}

input[type="text"] {
    width: 100%;
    padding: 14px;
    margin-bottom: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    box-sizing: border-box;
    text-align: center;
    transition: border-color 0.2s;
}

input[type="text"]:focus {
    border-color: #e63946;
    outline: none;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d90429;
    color: white;
    padding: 14px 20px;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(217, 4, 41, 0.25);
}

.btn:hover {
    background: #ef233c;
}

/* Disneyland Rozložení na střed */
.disney-split-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 35px;
    max-width: 900px;
    width: 90%;
}

.disney-left-card {
    max-width: 440px;
    width: 100%;
    flex: 1;
    padding: 2.2rem;
}

.disney-left-card h2 {
    margin-bottom: 1.8rem;
}

.options-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    width: 100%;
}

.option-btn {
    background: #4a5568;
    box-shadow: 0 4px 10px rgba(74, 85, 104, 0.2);
    font-size: 0.92rem;
    padding: 14px 10px;
    text-align: center;
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.option-btn:hover {
    background: #2d3748;
}

.disney-right-photo-box {
    width: 310px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.disney-photo-img {
    width: 100%;
    height: auto;
    max-height: 440px;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

.disney-photo-img.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

.disney-photo-img.fade-in {
    opacity: 1;
    transform: scale(1);
}

/* Styl pro Bludiště (11x11) */
.maze-card {
    max-width: 480px;
}

#maze-container {
    display: grid;
    grid-template-columns: repeat(11, 28px);
    grid-template-rows: repeat(11, 28px);
    gap: 0;
    width: 308px;
    height: 308px;
    margin: 10px auto;
    background: #f8f9fa;
    border: 3px solid #2c3e50;
    border-radius: 8px;
    box-sizing: content-box;
}

.maze-cell {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.cell-content {
    font-size: 0.95rem;
    line-height: 1;
    display: block;
    user-select: none;
}

.wall-top { border-top: 2px solid #2c3e50; }
.wall-right { border-right: 2px solid #2c3e50; }
.wall-bottom { border-bottom: 2px solid #2c3e50; }
.wall-left { border-left: 2px solid #2c3e50; }

.player {
    background-color: #ffe3e3;
    border-radius: 3px;
}

.goal {
    background-color: #d3f9d8;
    border-radius: 3px;
}

.win-message {
    background: #d3f9d8;
    color: #2b8a3e;
    padding: 12px;
    border-radius: 12px;
    font-weight: bold;
    margin-top: 15px;
    width: 100%;
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

.love-card {
    min-height: 300px;
}

.love-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
    width: 100%;
}

.btn-runaway {
    background-color: #6c757d;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2);
    transition: left 0.35s cubic-bezier(0.25, 1, 0.5, 1), top 0.35s cubic-bezier(0.25, 1, 0.5, 1), background 0.2s;
    margin: 0;
}

.btn-runaway:hover {
    background-color: #5a6268;
}

.error {
    color: #d90429;
    font-weight: 600;
    margin-bottom: 1rem;
    background: #ffe3e3;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.hint-box {
    background-color: #fff9db;
    border: 1px solid #ffe066;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 15px;
    color: #856404;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.hint-box summary {
    font-weight: 600;
    cursor: pointer;
}

.hint-box p {
    margin: 8px 0 0 0;
    font-size: 0.95rem;
}

.prize {
    font-size: 1.2rem;
    color: #2b8a3e;
    font-weight: 700;
    margin-top: 20px;
}

/* Styly pro vizuální stav políček u 6. úkolu */
input.correct-input {
    border-color: #2b8a3e !important;
    background-color: #d3f9d8 !important;
    color: #2b8a3e !important;
    font-weight: bold;
}

input.incorrect-input {
    border-color: #e63946 !important;
    background-color: #ffe3e3 !important;
}

/* Větší fotka (Úkol 1) – platí jen pro stránky s třídou photo-large-* */
.disney-split-container.photo-large-container {
    max-width: 1150px;
}

.disney-right-photo-box.photo-large-box {
    width: 560px;
    flex-shrink: 1;
}

.photo-large-box .disney-photo-img {
    max-height: 540px;
}

@media (max-width: 900px) {
    .disney-split-container.photo-large-container {
        flex-direction: column;
    }
    .disney-right-photo-box.photo-large-box {
        width: 100%;
        max-width: 560px;
    }
}

/* Větší fotka na výšku – platí jen pro stránky s třídou photo-tall-* */
.disney-split-container.photo-tall-container {
    max-width: 1000px;
}

.disney-right-photo-box.photo-tall-box {
    width: 420px;
    flex-shrink: 1;
}

.photo-tall-box .disney-photo-img {
    max-height: 640px;
}

@media (max-width: 900px) {
    .disney-split-container.photo-tall-container {
        flex-direction: column;
    }
    .disney-right-photo-box.photo-tall-box {
        width: 100%;
        max-width: 420px;
    }
}

/* Vyskakovací okno s heslem (úvodní stránka) */
.password-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(29, 53, 87, 0.92);
}

.password-modal {
    animation: password-pop 0.35s ease-out;
}

.password-modal form {
    width: 100%;
}

.password-modal input[type="password"] {
    width: 100%;
    padding: 14px;
    margin-bottom: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    box-sizing: border-box;
    text-align: center;
    transition: border-color 0.2s;
}

.password-modal input[type="password"]:focus {
    border-color: #e63946;
    outline: none;
}

.password-modal .btn {
    width: 100%;
}

@keyframes password-pop {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}
