/* CSS Variables */
:root {
    --primary-color: #e91e63;
    --primary-dark: #c2185b;
    --primary-light: #f8bbd9;
    --secondary-color: #9c27b0;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --background: #f5f5f5;
    --card-bg: #ffffff;
    --text-primary: #212121;
    --text-secondary: #757575;
    --border-color: #e0e0e0;
    --gym-color: #e91e63;
    --walk-color: #4caf50;
    --rest-color: #9e9e9e;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

/* Splash Screen */
.splash-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.splash-content {
    text-align: center;
    color: white;
}

.splash-content h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.splash-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.splash-loader {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    margin: 0 auto;
    animation: splash-spin 1s linear infinite;
}

@keyframes splash-spin {
    to { transform: rotate(360deg); }
}

/* Login Screen */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-group input {
    padding: 14px;
    font-size: 1rem;
}

.login-btn {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    margin-top: 10px;
}

.login-error {
    color: #f44336;
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    min-height: 20px;
}

/* Header with logout */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.header-user {
    font-size: 0.9rem;
    opacity: 0.9;
}

.header-user span {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sync-btn {
    background: rgba(76, 175, 80, 0.3);
    border: 1px solid rgba(76, 175, 80, 0.6);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.sync-btn:hover {
    background: rgba(76, 175, 80, 0.5);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* App Container */
.app-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px 32px;
}

/* Header */
.header {
    text-align: center;
    padding: 24px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    margin: 0 -16px;
    color: white;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.header .subtitle {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Navigation */
.nav-tabs {
    display: flex;
    gap: 4px;
    background: white;
    padding: 8px;
    margin: 0 -16px 16px;
    overflow-x: auto;
    box-shadow: var(--shadow);
}

.nav-tab {
    flex: 1;
    min-width: fit-content;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-tab:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.nav-tab.active {
    background: var(--primary-color);
    color: white;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.card h2 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-primary);
}

/* Profile View/Edit Modes */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.profile-header h2 {
    margin-bottom: 0;
}

.edit-profile-btn {
    background: var(--background);
    border: 2px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-profile-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.profile-info-item {
    background: var(--background);
    padding: 16px;
    border-radius: 10px;
    text-align: center;
}

.profile-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 6px;
    font-weight: 500;
}

.profile-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.profile-edit-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.profile-edit-buttons .btn {
    flex: 1;
}

/* Measurement History */
.measurement-history {
    overflow-x: auto;
}

.measurement-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.measurement-table th,
.measurement-table td {
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.measurement-table th {
    background: var(--background);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.measurement-table td {
    color: var(--text-primary);
}

.measurement-table tr:last-child td {
    border-bottom: none;
}

.measurement-table .date-cell {
    font-weight: 500;
    color: var(--primary-color);
}

.measurement-change {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

.measurement-change.up {
    background: #ffebee;
    color: #c62828;
}

.measurement-change.down {
    background: #e8f5e9;
    color: #2e7d32;
}

.empty-history {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
}

.empty-history-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

@media (max-width: 500px) {
    .profile-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Program Timer */
.program-timer-card {
    background: linear-gradient(135deg, #fff, #f8f9fa);
}

.program-timer {
    text-align: center;
}

.timer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.timer-dates {
    display: flex;
    gap: 20px;
    text-align: left;
}

.timer-date-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timer-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 500;
}

.timer-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.timer-countdown {
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
}

.countdown-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.countdown-label {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-top: 4px;
}

.timer-progress-container {
    margin-bottom: 16px;
}

.timer-progress-bar {
    height: 12px;
    background: var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.timer-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 6px;
    transition: width 0.5s ease;
    width: 0%;
}

.timer-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.reset-program-btn {
    margin-top: 8px;
    font-size: 0.85rem;
    padding: 10px 20px;
}

.timer-complete {
    background: linear-gradient(135deg, var(--success-color), #2e7d32) !important;
}

.timer-complete .countdown-number {
    font-size: 1.5rem;
}

@media (max-width: 500px) {
    .timer-info {
        flex-direction: column;
    }

    .timer-dates {
        width: 100%;
        justify-content: space-around;
    }

    .timer-countdown {
        width: 100%;
    }
}

/* Goals */
.goals-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.goal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--primary-light);
    border-radius: 8px;
}

.goal-icon {
    font-size: 1.5rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    text-align: center;
}

.stat-item {
    padding: 16px 8px;
    background: var(--background);
    border-radius: 8px;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Streak highlight */
.streak-item {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    position: relative;
    overflow: hidden;
}

.streak-item .stat-value {
    color: white;
    font-size: 2rem;
}

.streak-item .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Streak animation when > 0 */
.streak-item.active::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: streak-shine 3s infinite;
}

@keyframes streak-shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* Action buttons */
.exercise-actions .action-btn:active {
    transform: scale(0.95);
}

/* Start Workout Card */
.start-workout-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px;
}

.start-workout-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.start-workout-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.start-workout-info p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.start-workout-btn {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.start-workout-btn:hover {
    transform: scale(1.05);
}

.start-workout-btn:active {
    transform: scale(0.98);
}

/* Weekly Summary Card */
.weekly-summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.weekly-summary-card h2 {
    color: white;
    margin-bottom: 15px;
}

.weekly-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.weekly-stat {
    text-align: center;
    background: rgba(255,255,255,0.15);
    padding: 12px 8px;
    border-radius: 10px;
}

.weekly-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.weekly-stat-label {
    font-size: 0.75rem;
    opacity: 0.9;
}

.weekly-progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.weekly-progress-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.weekly-progress-text {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
    text-align: center;
}

/* Personal Records Card */
.pr-card {
    background: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
    color: white;
}

.pr-card h2 {
    color: white;
    margin-bottom: 15px;
}

.pr-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pr-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.15);
    padding: 12px 15px;
    border-radius: 10px;
}

.pr-item-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.pr-item-value {
    font-weight: 700;
    font-size: 1.1rem;
}

.pr-item-new {
    background: rgba(255,255,255,0.3);
    animation: pr-pulse 2s infinite;
}

@keyframes pr-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Weekly Schedule */
.week-schedule {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.day-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--border-color);
}

.day-card.gym-day {
    border-left-color: var(--gym-color);
}

.day-card.walk-day {
    border-left-color: var(--walk-color);
}

.day-card.rest-day {
    border-left-color: var(--rest-color);
}

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

.day-header h3 {
    font-size: 1.1rem;
}

.day-type {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 16px;
    font-weight: 500;
}

.gym-day .day-type {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.walk-day .day-type {
    background: #c8e6c9;
    color: #2e7d32;
}

.rest-day .day-type {
    background: #eeeeee;
    color: #616161;
}

.exercise-preview {
    list-style: none;
    padding-left: 0;
}

.exercise-preview li {
    padding: 4px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.exercise-preview li::before {
    content: "•";
    color: var(--primary-color);
    margin-right: 8px;
}

/* Today's Workout */
.today-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.workout-type-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.workout-type-badge.gym {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.workout-type-badge.walk {
    background: #c8e6c9;
    color: #2e7d32;
}

.workout-type-badge.rest {
    background: #eeeeee;
    color: #616161;
}

/* Daily Creatine Card */
.creatine-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #e1f5fe, #b3e5fc);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    border: 2px solid #03a9f4;
}

.creatine-card:has(.creatine-checkbox.checked) {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-color: var(--success-color);
}

.creatine-checkbox {
    width: 36px;
    height: 36px;
    border: 3px solid #03a9f4;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    background: white;
}

.creatine-checkbox:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(3, 169, 244, 0.4);
}

.creatine-checkbox.checked {
    background: var(--success-color);
    border-color: var(--success-color);
}

.creatine-checkbox.checked::after {
    content: "✓";
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
}

.creatine-info h4 {
    color: #0277bd;
    margin-bottom: 2px;
    font-size: 1rem;
}

.creatine-card:has(.creatine-checkbox.checked) .creatine-info h4 {
    color: #2e7d32;
}

.creatine-info p {
    color: #0288d1;
    font-size: 0.9rem;
}

.creatine-card:has(.creatine-checkbox.checked) .creatine-info p {
    color: #388e3c;
    font-weight: 500;
}

/* Exercise Items in Workout */
.exercise-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.exercise-item.completed {
    background: #e8f5e9;
    border: 2px solid var(--success-color);
}

.exercise-item-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.exercise-checkbox {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    margin-top: 2px;
}

.exercise-checkbox:hover {
    border-color: var(--primary-color);
}

.exercise-checkbox.checked {
    background: var(--success-color);
    border-color: var(--success-color);
}

.exercise-checkbox.checked::after {
    content: "✓";
    color: white;
    font-weight: bold;
}

.exercise-info {
    flex: 1;
}

.exercise-info h4 {
    margin-bottom: 4px;
}

.exercise-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.exercise-tip {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff3e0;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #e65100;
}

/* Completion Message */
.completion-message {
    text-align: center;
    padding: 24px;
}

.completion-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
}

.completion-message h3 {
    color: var(--success-color);
    margin-bottom: 8px;
}

/* Progress Section */
.weight-chart {
    height: 200px;
    background: var(--background);
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#weight-canvas {
    width: 100%;
    height: 100%;
}

.weight-list {
    max-height: 300px;
    overflow-y: auto;
}

.weight-entry {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.weight-entry:last-child {
    border-bottom: none;
}

.weight-date {
    color: var(--text-secondary);
}

.weight-value {
    font-weight: 600;
    color: var(--primary-color);
}

.weight-change {
    font-size: 0.85rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.weight-change.down {
    background: #e8f5e9;
    color: #2e7d32;
}

.weight-change.up {
    background: #fce4ec;
    color: #c2185b;
}

.workout-history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.history-date {
    font-weight: 500;
}

.history-type {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.history-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.history-status.complete {
    background: #e8f5e9;
    color: #2e7d32;
}

.history-status.partial {
    background: #fff3e0;
    color: #e65100;
}

/* Exercise Guide */
.exercise-categories {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.category-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.category-title {
    color: var(--primary-color);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}

.exercise-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.exercise-card:hover {
    border-color: var(--primary-color);
}

.exercise-card:last-child {
    margin-bottom: 0;
}

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--background);
}

.exercise-header h4 {
    font-size: 0.95rem;
}

.expand-icon {
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.exercise-card.expanded .expand-icon {
    transform: rotate(45deg);
}

.exercise-details {
    display: none;
    padding: 16px;
    background: white;
    border-top: 1px solid var(--border-color);
}

.exercise-card.expanded .exercise-details {
    display: block;
}

.exercise-details p {
    margin-bottom: 8px;
}

.exercise-details h5 {
    margin: 12px 0 8px;
    color: var(--primary-color);
}

.exercise-details ol {
    padding-left: 20px;
    margin-bottom: 12px;
}

.exercise-details li {
    margin-bottom: 6px;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 600px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .nav-tabs {
        padding: 6px;
    }

    .nav-tab {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Program Description */
.program-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Walking Info Card */
.walk-info {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.walk-info h3 {
    color: #2e7d32;
    margin-bottom: 8px;
}

.walk-tips {
    list-style: none;
}

.walk-tips li {
    padding: 6px 0;
    color: #1b5e20;
}

.walk-tips li::before {
    content: "🚶‍♀️";
    margin-right: 8px;
}

/* Rest Day Card */
.rest-info {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.rest-info h3 {
    margin-bottom: 8px;
}

.rest-suggestions {
    list-style: none;
    margin-top: 12px;
}

.rest-suggestions li {
    padding: 8px 0;
    color: var(--text-secondary);
}

/* Animations */
@keyframes checkmark {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.exercise-checkbox.checked::after {
    animation: checkmark 0.3s ease-out;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.toast.success {
    background: var(--success-color);
}

.toast.error {
    background: #f44336;
}

/* Exercise Hover Tooltip */
.exercise-item {
    position: relative;
}

.exercise-info {
    position: relative;
    cursor: pointer;
}

.exercise-tooltip {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    border: 2px solid var(--primary-color);
    max-height: 400px;
    overflow-y: auto;
}

.exercise-info:hover .exercise-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}

/* Exercise GIF Demo */
.tooltip-gif-container {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    border: 2px solid var(--primary-light);
}

.tooltip-gif {
    width: 100%;
    height: auto;
    display: block;
    max-height: 180px;
    object-fit: cover;
}

/* YouTube Video Button */
.tooltip-video-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #FF0000, #CC0000);
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

.tooltip-video-btn:hover {
    background: linear-gradient(135deg, #CC0000, #990000);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
}

.tooltip-video-btn:active {
    transform: translateY(0);
}

/* Weight Tracking Section */
.weight-tracking-section {
    margin-top: 12px;
    padding: 14px;
    background: linear-gradient(135deg, #fff3e0, #fce4ec);
    border-radius: 10px;
    border: 2px solid #ffb74d;
}

.weight-tracking-section.weight-logged {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-color: var(--success-color);
}

.today-weight-display {
    background: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--success-color);
    margin-bottom: 10px;
    text-align: center;
    border: 2px solid var(--success-color);
}

.weight-tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.weight-tracking-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.weight-history-btn {
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.weight-history-btn:hover {
    background: var(--primary-color);
    color: white;
}

.weight-increase-alert {
    background: linear-gradient(135deg, #c8e6c9, #a5d6a7);
    color: #1b5e20;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 10px;
    text-align: center;
}

.last-weight-display {
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-align: center;
}

.weight-input-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.weight-input-group {
    flex: 1;
    min-width: 80px;
}

.weight-input-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.weight-input {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    transition: border-color 0.2s;
}

.weight-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.weight-save-btn {
    padding: 10px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.weight-save-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.weight-save-btn.saved {
    background: var(--success-color);
}

.weight-save-btn.saved:hover {
    background: #388e3c;
}

/* Weight History Modal */
.weight-history-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.weight-history-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 450px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.weight-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.weight-history-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.weight-history-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 16px;
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
}

.weight-stat-item {
    text-align: center;
}

.weight-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.weight-stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.weight-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px;
}

.weight-history-entry {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.weight-history-entry:last-child {
    border-bottom: none;
}

.weight-history-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.weight-history-weight {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.weight-history-reps {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: right;
}

.weight-arrow {
    margin-left: 4px;
    font-weight: bold;
}

.weight-arrow.up {
    color: var(--success-color);
}

.weight-arrow.down {
    color: #f44336;
}

/* Responsive adjustments */
@media (max-width: 500px) {
    .weight-input-row {
        flex-direction: column;
    }

    .weight-input-group {
        width: 100%;
    }

    .weight-save-btn {
        width: 100%;
        margin-top: 4px;
    }

    .weight-history-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tooltip-header h5 {
    color: var(--primary-color);
    font-size: 1rem;
    margin: 0;
}

.tooltip-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tooltip-sets-reps {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    padding: 10px;
    background: var(--primary-light);
    border-radius: 8px;
}

.tooltip-sets-reps div {
    text-align: center;
    flex: 1;
}

.tooltip-sets-reps .label {
    display: block;
    font-size: 0.7rem;
    color: var(--primary-dark);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 2px;
}

.tooltip-sets-reps .value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.tooltip-section {
    margin-bottom: 12px;
}

.tooltip-section h6 {
    color: var(--text-primary);
    font-size: 0.85rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tooltip-section ol {
    padding-left: 18px;
    margin: 0;
}

.tooltip-section li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.tooltip-target {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e3f2fd;
    color: #1565c0;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tooltip-warning {
    background: #fff3e0;
    border-left: 3px solid var(--warning-color);
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    font-size: 0.8rem;
    color: #e65100;
    margin-top: 8px;
}

/* Tooltip arrow */
.exercise-tooltip::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 24px;
    width: 14px;
    height: 14px;
    background: white;
    border-left: 2px solid var(--primary-color);
    border-top: 2px solid var(--primary-color);
    transform: rotate(45deg);
}

/* Mobile: tap to show tooltip */
@media (max-width: 768px) {
    .exercise-tooltip {
        position: fixed;
        left: 16px !important;
        right: 16px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin-top: 0;
        max-height: 80vh;
    }

    .exercise-tooltip::before {
        display: none;
    }

    .exercise-info:hover .exercise-tooltip {
        transform: translateY(-50%);
    }

    .tooltip-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 99;
        opacity: 0;
        visibility: hidden;
        transition: all 0.25s;
    }

    .exercise-info:hover .tooltip-overlay {
        opacity: 1;
        visibility: visible;
    }
}
