/* Basis & Fonts */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Schnee-Animation im Hintergrund */
body::before {
    content: '❄️ ❄️ ❄️ ❄️ ❄️ ❄️ ❄️ ❄️ ❄️ ❄️';
    position: fixed;
    top: -50px;
    left: 0;
    right: 0;
    font-size: 20px;
    opacity: 0.6;
    animation: snow-fall 10s linear infinite;
    pointer-events: none;
    letter-spacing: 100px;
}

@keyframes snow-fall {
    0% { transform: translateY(-50px); }
    100% { transform: translateY(100vh); }
}

/* Hilfeklassen */
.hidden {
    display: none !important;
}

/* ===== PASSWORT-SCREEN ===== */
.password-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.password-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.snow-decoration {
    font-size: 60px;
    margin-bottom: 20px;
    animation: spin 4s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.password-container h1 {
    color: #c41e3a;
    font-size: 32px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.love-message {
    color: #555;
    font-size: 18px;
    margin-bottom: 30px;
    font-style: italic;
}

.password-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#password-input {
    flex: 1;
    padding: 15px 20px;
    border: 3px solid #c41e3a;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

#password-input:focus {
    border-color: #165b33;
    box-shadow: 0 0 15px rgba(22, 91, 51, 0.3);
}

#password-submit {
    padding: 15px 30px;
    background: linear-gradient(135deg, #c41e3a 0%, #a91629 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

#password-submit:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(196, 30, 58, 0.4);
}

.error-message {
    color: #c41e3a;
    font-size: 14px;
    min-height: 20px;
}

.hearts {
    font-size: 40px;
    margin-top: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== KALENDER-SCREEN ===== */
.calendar-screen {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fade-in 1s ease-in;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.title {
    color: white;
    font-size: 48px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    font-style: italic;
}

/* ===== KALENDER-GRID ===== */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.door {
    aspect-ratio: 1;
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.door::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
}

.door:hover::before {
    left: 100%;
}

.door-number {
    font-size: 48px;
    font-weight: bold;
    color: #c41e3a;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.door-icon {
    font-size: 30px;
    margin-top: 5px;
}

.door.locked {
    background: linear-gradient(135deg, #cccccc 0%, #aaaaaa 100%);
    cursor: not-allowed;
    opacity: 0.6;
}

.door.locked .door-number {
    color: #666;
}

.door.opened {
    background: linear-gradient(135deg, #165b33 0%, #0f4525 100%);
}

.door.opened .door-number {
    color: white;
}

.door:not(.locked):not(.opened):hover {
    transform: scale(1.05) rotateZ(2deg);
    box-shadow: 0 10px 30px rgba(196, 30, 58, 0.4);
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fade-in 0.3s ease;
}

.modal-content {
    background: white;

    max-width: 400px;
    max-height: 90vh;
    width: 800px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slide-up 0.4s ease;
    overflow: hidden;
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: #666666;
    color: white;
    font-size: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
}

.close-modal:hover {
    background: #a91629;
    transform: rotate(90deg);
}

.modal-header {
    background: linear-gradient(135deg, #c41e3a 0%, #a91629 100%);
    color: white;
    padding: 20px 30px;

    text-align: center;
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 32px;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Inhalts-Typen im Modal */
.content-image img,
.content-video video {
    max-width: 100%;
    max-height: 50vh;
    width: auto;
    height: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    object-fit: contain;
}

.content-text {
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    max-width: 600px;
    margin: 10px auto;
    white-space: pre-line;
}

/* Scratch Card Canvas */
.scratch-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    max-width: 90%;
    max-height: 55vh;
}

.scratch-canvas {
    cursor: pointer;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    max-height: 55vh;
    display: block;
    position: relative;
    z-index: 2;
}

.scratch-result {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.scratch-result img {
    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
}

/* Footer */
.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    margin-top: 40px;
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive */
/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .calendar-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .title {
        font-size: 32px;
    }

    .subtitle {
        font-size: 16px;
    }

    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .door-number {
        font-size: 36px;
    }

    .door-icon {
        font-size: 24px;
    }

    .password-container {
        padding: 30px 20px;
    }

    .password-container h1 {
        font-size: 24px;
    }

    /* Modal optimiert für Mobile */
    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
        margin: 10px;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-header h2 {
        font-size: 24px;
    }

    .modal-body {
        padding: 20px 15px;
    }

    .content-image img,
    .content-video video {
        max-height: 60vh;
    }

    .content-text {
        font-size: 15px;
        line-height: 1.4;
    }

    .scratch-container {
        max-height: 60vh;
    }

    .scratch-canvas {
        max-height: 60vh;
    }

    .close-modal {
        width: 35px;
        height: 35px;
        font-size: 25px;
    }
}
