/* Weihnachtliche Farbpalette */
:root {
    --christmas-red: #C41E3A;
    --christmas-green: #165B33;
    --christmas-gold: #FFD700;
    --christmas-white: #FFFAFA;
    --christmas-dark-green: #0F3D23;
    --christmas-light-red: #E74C3C;
    --shadow-color: rgba(0, 0, 0, 0.15);
    --recording-red: #FF0000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--christmas-dark-green) 0%, var(--christmas-green) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Schneeflocken Hintergrund-Effekt */
body::before {
    content: '❄';
    position: fixed;
    top: -50px;
    left: 10%;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.3);
    animation: snowfall 10s linear infinite;
    pointer-events: none;
}

body::after {
    content: '❄';
    position: fixed;
    top: -50px;
    right: 20%;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.2);
    animation: snowfall 12s linear infinite 2s;
    pointer-events: none;
}

@keyframes snowfall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Toggle Container */
.toggle-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 15px;
    border-radius: 25px;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: transform 0.2s ease;
}

.toggle-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-color);
}

.toggle-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--christmas-dark-green);
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--christmas-red);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Hauptcontainer */
.container {
    background: var(--christmas-white);
    border-radius: 24px;
    padding: 40px 30px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
}

/* Elch Container */
.elch-container {
    position: relative;
    margin-bottom: 30px;
    display: inline-block;
}

.elch-image {
    max-width: 280px;
    width: 100%;
    height: auto;
    border-radius: 16px;
    transition: transform 0.3s ease;
    animation: floatElch 3s ease-in-out infinite;
}

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

.elch-image.recording {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-15px) scale(1.05);
    }
}

.recording-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background-color: var(--recording-red);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recording-indicator.active {
    opacity: 1;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Status Text */
.status-text {
    font-size: 1.1rem;
    color: var(--christmas-dark-green);
    margin-bottom: 15px;
    font-weight: 500;
}

/* Timer */
.timer {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--christmas-red);
    margin-bottom: 25px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}

.timer.warning {
    color: var(--recording-red);
    animation: timerPulse 0.5s ease-in-out infinite;
}

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

/* Aufnahme Button */
.record-button {
    background: linear-gradient(135deg, var(--christmas-red) 0%, var(--christmas-light-red) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 18px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 auto 25px;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
    transition: all 0.3s ease;
    min-width: 220px;
}

.record-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.5);
}

.record-button:active {
    transform: translateY(0);
}

.record-button.recording {
    background: linear-gradient(135deg, #666 0%, #888 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.mic-icon {
    width: 24px;
    height: 24px;
}

/* Visualizer */
.visualizer {
    width: 100%;
    height: 80px;
    background: #f5f5f5;
    border-radius: 12px;
    margin-bottom: 20px;
    display: none;
}

.visualizer.active {
    display: block;
}

/* Aktions-Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.primary-button,
.secondary-button {
    padding: 14px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-button {
    background: var(--christmas-green);
    color: white;
    box-shadow: 0 4px 12px rgba(22, 91, 51, 0.3);
}

.primary-button:hover {
    background: var(--christmas-dark-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(22, 91, 51, 0.4);
}

.secondary-button {
    background: #e0e0e0;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.secondary-button:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 35px;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-content h2 {
    color: var(--christmas-dark-green);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.modal-content p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--christmas-green);
    color: white;
    padding: 16px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: bottom 0.4s ease;
    z-index: 3000;
    font-weight: 500;
}

.toast.show {
    bottom: 30px;
}

/* Mobile Optimierungen */
@media (max-width: 600px) {
    .container {
        padding: 30px 20px;
    }

    .elch-image {
        max-width: 220px;
    }

    .timer {
        font-size: 2rem;
    }

    .record-button {
        padding: 16px 30px;
        font-size: 1rem;
        min-width: 200px;
    }

    .toggle-text {
        font-size: 0.8rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }
}

