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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    color: #2d3436;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 10px;
}

.subtitle {
    color: #636e72;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Controls */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e9ecef;
}

.settings label {
    font-weight: 500;
    color: #555;
    margin-right: 10px;
}

.settings select {
    padding: 8px 15px;
    border: 2px solid #e0e7ff;
    border-radius: 10px;
    background: white;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
}

.settings select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    background: #fd79a8;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(253, 121, 168, 0.3);
    min-height: 48px;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

/* Workout Plan */
.workout-plan {
    margin-bottom: 40px;
}

.exercise-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.exercise-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.exercise-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.exercise-title-row h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3436;
    margin: 0;
    flex: 1;
}

.muscle-group {
    display: inline-block;
    background: #fd79a8;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.exercise-image {
    width: 90%;
    height: 400px;
    background: #f1f3f4;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 20px auto;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.exercise-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.exercise-description {
    color: #636e72;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.exercise-actions {
    display: flex;
    gap: 10px;
}

.btn-timer, .btn-complete {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-timer {
    background: #74b9ff;
    color: white;
}

.btn-timer:hover {
    background: #0984e3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(116, 185, 255, 0.3);
}

.btn-complete {
    background: #00b894;
    color: white;
}

.btn-complete:hover {
    background: #00a085;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

.exercise-card.completed {
    opacity: 0.7;
    transform: scale(0.98);
}

.exercise-card.completed::after {
    content: '✅ Completed';
    position: absolute;
    top: 10px;
    right: 20px;
    background: #4caf50;
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

/* Stats */
.stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e9ecef;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #fd79a8;
    margin-bottom: 5px;
}

.stat-label {
    color: #636e72;
    font-size: 14px;
    font-weight: 500;
}

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

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

/* Timer */
.timer-display {
    text-align: center;
    margin-bottom: 25px;
}

#timerTime {
    font-size: 3rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.timer-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.timer-presets {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.preset-btn {
    padding: 6px 12px;
    border: 2px solid #e0e7ff;
    background: white;
    border-radius: 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px 0;
        margin-bottom: 25px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .controls {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 15px;
    }
    
    .exercise-card {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .exercise-title-row {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        align-items: center;
    }
    
    .exercise-title-row h3 {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .exercise-image {
        width: 95%;
        height: 360px;
    }
    
    .exercise-description {
        font-size: 15px;
        text-align: center;
    }
    
    .exercise-details {
        padding: 12px;
        text-align: center;
    }
    
    .exercise-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-timer, .btn-complete {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }
    
    .stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 15% auto;
        padding: 20px;
    }
    
    .timer-controls {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .btn-timer {
        flex: 1;
        min-width: 80px;
    }
    
    .timer-presets {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .preset-btn {
        flex: 1;
        min-width: 50px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .exercise-card {
        padding: 15px;
    }
    
    .exercise-image {
        width: 95%;
        height: 280px;
    }
    
    .exercise-title-row h3 {
        font-size: 1.1rem;
    }
    
    .exercise-description {
        font-size: 14px;
    }
    
    .modal-content {
        width: 98%;
        margin: 20% auto;
        padding: 15px;
    }
    
    #timerTime {
        font-size: 2.5rem;
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e9ecef;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #2d3436;
    margin-bottom: 10px;
}

.empty-state p {
    color: #636e72;
    font-size: 1rem;
} 