/* Beat Saber Theme Colors */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #45b7d1;
    --background-dark: #1a1a2e;
    --background-medium: #16213e;
    --background-light: #1c2939;
    --text-primary: #ffffff;
    --text-secondary: #b8c5d6;
    --success-color: #51cf66;
    --warning-color: #ffd43b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--background-medium) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo {
    height: 50px;
    filter: drop-shadow(0 0 10px rgba(255, 107, 107, 0.3));
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 107, 107, 0.5);
}

/* Music Toggle Button */
.music-toggle-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.music-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.music-toggle-btn.muted {
    background: rgba(255, 107, 107, 0.2);
    border-color: var(--primary-color);
}

.music-icon {
    font-size: 1.5rem;
    transition: opacity 0.3s ease;
}

.music-toggle-btn.muted .music-icon {
    opacity: 0.5;
}

/* Main Content */
.main-content {
    flex: 1;
    position: relative;
    padding: 20px;
}

/* Screen Management */
.screen {
    display: none;
    min-height: calc(100vh - 140px);
    align-items: center;
    justify-content: center;
}

.screen.active {
    display: flex;
}

/* Welcome Screen */
.welcome-content {
    text-align: center;
    max-width: 600px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.welcome-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.welcome-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.start-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.4);
}

/* Exercise Screen */
#exercise-screen {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding-top: 20px;
}

.exercise-header {
    margin-bottom: 30px;
}

.progress-info {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.exercise-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
    align-items: center;
}

.exercise-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--background-light);
    border-radius: 15px;
    padding: 20px;
    min-height: 300px;
}

.exercise-illustration img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
}

.exercise-info h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.exercise-info p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.timer-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rep-info {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.timer-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

#timer {
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-shadow: 0 0 20px rgba(78, 205, 196, 0.5);
}

.timer-label {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.timer-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
}

.timer-progress-fill {
    height: 100%;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    border-radius: 3px;
    transition: width 0.1s linear, background 0.3s ease;
    width: 100%;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 25px;
    border-radius: 25px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.stop-btn {
    background: linear-gradient(135deg, #ff4757, #ff3742);
    border: 1px solid #ff4757;
}

.stop-btn:hover {
    background: linear-gradient(135deg, #ff3742, #ff2f3a);
    border-color: #ff3742;
}

/* Break Screen */
.break-content {
    text-align: center;
    max-width: 600px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.break-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.next-exercise-preview {
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    align-items: center;
}

.next-exercise-image {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--background-light);
    border-radius: 10px;
    padding: 15px;
    min-height: 120px;
}

.next-exercise-image img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 8px;
}

.next-exercise-info {
    text-align: left;
}

.next-exercise-preview h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.next-exercise-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.break-timer {
    margin-top: 30px;
}

#break-countdown {
    font-size: 3rem;
    font-weight: 700;
    color: var(--warning-color);
    display: block;
    margin-bottom: 10px;
}

/* Completion Screen */
.completion-content {
    text-align: center;
    max-width: 600px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.completion-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--success-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .exercise-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .next-exercise-preview {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .next-exercise-info {
        text-align: center;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .logo-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 200px;
    }
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.timer-display #timer {
    animation: pulse 1s infinite when timer is running;
}

/* Timer warning states */
#timer.warning {
    color: var(--warning-color);
    animation: pulse 0.5s infinite;
}

#timer.critical {
    color: var(--primary-color);
    animation: pulse 0.3s infinite;
}
