/* Global Styles */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --accent-color: #FF9800;
    --dark-color: #333;
    --light-color: #f4f4f4;
    --danger-color: #f44336;
    --success-color: #4CAF50;
    --warning-color: #FFC107;
    --info-color: #2196F3;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: var(--dark-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 80px; /* Space for footer */
}

.hidden {
    display: none !important;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* Section Styles */
.section {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

/* Goal Selection */
.goals-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.goal-card {
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 20px;
    width: 250px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.goal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.goal-card.selected {
    border-color: var(--primary-color);
    background-color: rgba(76, 175, 80, 0.1);
}

.goal-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.goal-card h3 {
    margin-bottom: 10px;
}

.level-selection {
    text-align: center;
    margin-bottom: 25px;
}

.level-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.level-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 30px;
    background-color: #e0e0e0;
    cursor: pointer;
    transition: var(--transition);
}

.level-btn:hover {
    background-color: #d0d0d0;
}

.level-btn.selected {
    background-color: var(--primary-color);
    color: white;
}

/* Buttons */
.primary-btn {
    display: block;
    width: 200px;
    margin: 0 auto;
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    transition: var(--transition);
}

.primary-btn:hover {
    background-color: #3d8b40;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.secondary-btn {
    padding: 8px 15px;
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.secondary-btn:hover {
    background-color: rgba(76, 175, 80, 0.1);
}

/* Routine Display */
.routine-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.workout-container {
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    padding: 20px;
}

.workout-info {
    margin-bottom: 20px;
}

.workout-progress {
    margin-top: 15px;
}

.progress-text {
    margin-bottom: 5px;
    font-weight: bold;
}

.progress-bar-container {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    transition: width 0.5s ease;
}

.exercises-list {
    margin-bottom: 30px;
}

.exercise-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: white;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.exercise-info {
    flex: 1;
}

.exercise-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.exercise-details {
    color: #666;
    font-size: 0.9rem;
}

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

.exercise-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.complete-btn {
    background-color: var(--primary-color);
    color: white;
}

.complete-btn:hover {
    background-color: #3d8b40;
}

.exercise-item.completed {
    opacity: 0.7;
    background-color: rgba(76, 175, 80, 0.1);
}

.exercise-item.completed .exercise-name {
    text-decoration: line-through;
}

/* Timer */
.timer-container {
    text-align: center;
    padding: 20px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.timer-display {
    font-size: 3rem;
    font-weight: bold;
    margin: 20px 0;
    color: var(--dark-color);
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.timer-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.timer-btn:hover {
    transform: scale(1.1);
    background-color: #3d8b40;
}

/* Calendar View */
.calendar-container {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
}

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

.calendar-nav-btn {
    background-color: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.calendar-nav-btn:hover {
    color: #3d8b40;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day {
    padding: 15px;
    border-radius: var(--border-radius);
    background-color: #f9f9f9;
    text-align: center;
    min-height: 100px;
}

.calendar-day-header {
    font-weight: bold;
    margin-bottom: 10px;
}

.calendar-day.today {
    border: 2px solid var(--primary-color);
}

.calendar-day.has-workout {
    background-color: rgba(76, 175, 80, 0.1);
}

.workout-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    border-radius: 50%;
    margin-right: 5px;
}

/* BMI Calculator */
.bmi-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.bmi-inputs {
    flex: 1;
    min-width: 300px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.bmi-result {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
}

.bmi-result h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Footer Navigation */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.nav-tabs {
    display: flex;
    justify-content: space-around;
    max-width: 600px;
    margin: 0 auto;
}

.nav-tab {
    padding: 15px;
    text-align: center;
    cursor: pointer;
    flex: 1;
    transition: var(--transition);
}

.nav-tab i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #777;
}

.nav-tab span {
    font-size: 0.8rem;
    color: #777;
}

.nav-tab.active i,
.nav-tab.active span {
    color: var(--primary-color);
}

.nav-tab:hover i,
.nav-tab:hover span {
    color: var(--primary-color);
}

/* Popup Reminder */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.popup-content h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.popup-content p {
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .goals-container {
        flex-direction: column;
        align-items: center;
    }
    
    .goal-card {
        width: 100%;
        max-width: 300px;
    }
    
    .calendar-days {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .calendar-day {
        min-height: 80px;
    }
    
    .timer-display {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .level-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .level-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .calendar-days {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-tab span {
        display: none;
    }
    
    .nav-tab i {
        margin-bottom: 0;
    }
}