* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #64748b;
    --secondary-hover: #475569;
    --background: #0f172a;
    --card-background: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, #1e293b 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
}

.screen {
    display: none;
    width: 100%;
    max-width: 500px;
    animation: fadeIn 0.3s ease-in;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    width: 100%;
}

/* Startbildschirm */
#startScreen {
    text-align: center;
}

#startScreen h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#startScreen .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* Karte */
.card {
    background: var(--card-background);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px var(--shadow);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.card-body {
    flex: 1;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
}

.audio-info {
    margin-top: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    min-height: 20px;
    line-height: 1.6;
}

.audio-info strong {
    color: var(--text-primary);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 8px;
}

.game-icon-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-icon {
    max-width: 150px;
    max-height: 150px;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--shadow);
    object-fit: contain;
}

.answer-text {
    margin-top: 10px;
}

.card-footer {
    display: flex;
    gap: 15px;
    flex-direction: column;
}

/* Buttons */
.btn {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(100, 116, 139, 0.3);
}

.btn-play {
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    color: white;
    padding: 20px 40px;
    font-size: 1.3rem;
    min-height: 80px;
}

.btn-play:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}

.btn-play.playing {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-play.playing .play-icon {
    display: none;
}

.btn-play.playing::before {
    content: "⏸";
    font-size: 1.5rem;
}

.play-icon {
    font-size: 1.5rem;
}

/* Responsive Design */
@media (max-width: 480px) {
    #startScreen h1 {
        font-size: 2.5rem;
    }

    .card {
        padding: 20px;
    }

    .btn {
        padding: 14px 28px;
        font-size: 1rem;
    }

    .btn-play {
        padding: 18px 36px;
        font-size: 1.1rem;
        min-height: 70px;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Visualizer */
.visualizer-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visualizer-canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.btn-play-center {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    color: white;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-play-center:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.music-note-icon {
    display: none;
}

.btn-play-center.playing .play-icon {
    display: none;
}

.btn-play-center.playing .music-note-icon {
    display: block;
    animation: notePulse 1s ease-in-out infinite;
}

@keyframes notePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

.btn-play-center:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Timeline */
.timeline-container {
    width: 100%;
    margin-top: 20px;
    padding: 0 10px;
}

.timeline-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.time-display {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.timeline-slider {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timeline-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--primary-hover);
}

.timeline-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.timeline-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: var(--primary-hover);
}

.timeline-slider::-webkit-slider-runnable-track {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
}

.timeline-slider::-moz-range-track {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
}

/* Lautstärkeregler */
.volume-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 15px;
    padding: 0 10px;
}

.volume-icon {
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
}

.volume-slider {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--secondary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--secondary-hover);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--secondary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: var(--secondary-hover);
}

.volume-slider::-webkit-slider-runnable-track {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
}

.volume-slider::-moz-range-track {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
}

.volume-value {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 45px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Responsive Anpassungen für Timeline und Lautstärke */
@media (max-width: 480px) {
    .time-display {
        font-size: 0.75rem;
        min-width: 35px;
    }
    
    .volume-value {
        font-size: 0.75rem;
        min-width: 40px;
    }
}

