* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000000;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Mobile-First App Container */
.iphone-frame {
    width: 100%;
    height: 100vh;
    background: #000000;
    position: relative;
    overflow: hidden;
}

/* Mobile Status Bar Spacing */
.iphone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-top, 20px);
    background: #000000;
    z-index: 10;
}

/* Screen */
.iphone-screen {
    width: 100%;
    height: 100%;
    background: #000000;
    padding-top: env(safe-area-inset-top, 20px);
    padding-bottom: env(safe-area-inset-bottom, 20px);
    overflow: hidden;
    position: relative;
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
}

/* App Container */
#app {
    width: 100%;
    height: 100%;
    background: #000000;
    border-radius: 34px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* App Bar */
.app-bar {
    background: #000000;
    color: white;
    padding: 50px 20px 16px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    text-align: center;
}

.app-bar-title {
    text-align: center;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    color: white;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 14px;
    color: #9E9E9E;
    font-weight: 400;
}



/* Content Section */
.content-section {
    flex: 1;
    padding: 0 20px 120px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    min-height: calc(100vh - 200px);
}

/* Section Headers */
.section-header {
    font-size: 12px;
    font-weight: 600;
    color: #9E9E9E;
    letter-spacing: 1px;
    margin: 24px 0 12px 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}

.stat-card {
    background: #1E1E1E;
    border: 0.5px solid #424242;
    border-radius: 12px;
    padding: 16px;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.stat-title {
    font-size: 10px;
    font-weight: 600;
    color: #9E9E9E;
    letter-spacing: 1px;
}

.stat-icon {
    font-size: 14px;
}

.stat-value {
    font-size: 20px;
    font-weight: 800;
    color: white;
    margin-bottom: 4px;
}

.stat-subtitle {
    font-size: 10px;
    color: #9E9E9E;
}

/* Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}

.action-card {
    background: #1E1E1E;
    border: 0.5px solid #424242;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.action-card:hover {
    transform: scale(0.98);
}

.action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.action-icon {
    font-size: 18px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.action-arrow {
    font-size: 14px;
    color: #9E9E9E;
}

.action-title {
    font-size: 14px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.action-subtitle {
    font-size: 11px;
    color: #9E9E9E;
}

/* Workout Card */
.workout-card {
    background: #1E1E1E;
    border: 0.5px solid #424242;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.workout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.workout-title {
    font-size: 16px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

.workout-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.workout-status.completed {
    background: rgba(0, 200, 81, 0.2);
    color: #00C851;
}

.workout-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #9E9E9E;
}

.workout-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.workout-stat {
    text-align: center;
    flex: 1;
}

.workout-stat-icon {
    font-size: 14px;
    margin-bottom: 4px;
}

.workout-stat-value {
    font-size: 14px;
    font-weight: 700;
    color: white;
    margin-bottom: 2px;
}

.workout-stat-label {
    font-size: 10px;
    color: #9E9E9E;
}

.workout-exercises {
    border-top: 0.5px solid #424242;
    padding-top: 12px;
}

.exercise-title {
    font-size: 10px;
    font-weight: 600;
    color: #9E9E9E;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.exercise-item {
    font-size: 12px;
    color: #9E9E9E;
    margin-bottom: 4px;
}

/* Quote Card */
.quote-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0;
    text-align: center;
}

.quote-text {
    font-size: 16px;
    font-weight: 600;
    color: black;
    font-style: italic;
    margin-bottom: 8px;
}

.quote-author {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
}

/* Bottom Navigation */
.bottom-nav {
    background: #121212;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 calc(20px + env(safe-area-inset-bottom, 20px)) 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999 !important;
    pointer-events: auto !important;
    border-top: 0.5px solid #424242;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.2s ease;
    pointer-events: auto !important;
    position: relative;
    z-index: 10000 !important;
}

.nav-item:hover {
    transform: scale(1.1);
}

.nav-item.active {
    color: white;
}

.nav-item:not(.active) {
    color: #9E9E9E;
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-label {
    font-size: 12px;
    font-weight: 600;
}

/* Floating Action Button - Hidden */
.fab {
    display: none;
}

/* Scrollbar Styling */
.content-section::-webkit-scrollbar {
    width: 2px;
}

.content-section::-webkit-scrollbar-track {
    background: transparent;
}

.content-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1px;
}

.content-section::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .section-header {
        margin: 20px 0 16px 0;
        font-size: 14px;
    }
    
    .stat-card, .action-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .action-title {
        font-size: 16px;
    }
}

/* Ensure bottom navigation is always accessible */
@media (max-height: 600px) {
    .content-section {
        padding-bottom: 100px;
    }
    
    .bottom-nav {
        padding: 4px 0 calc(16px + env(safe-area-inset-bottom, 16px)) 0;
    }
}

/* Settings Page Styles */
.settings-card {
    background: #1E1E1E;
    border: 0.5px solid #424242;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.profile-section {
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 40px;
    background: white;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    margin: 0 auto 16px auto;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.profile-email {
    font-size: 14px;
    color: #9E9E9E;
    margin-bottom: 16px;
}

.settings-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
    font-weight: 600;
}

.settings-button:hover {
    transform: scale(0.98);
}

.settings-button.compact {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    padding: 8px 16px;
    display: inline-flex;
}

.settings-button.logout {
    background: rgba(255, 68, 68, 0.1);
    border: 0.5px solid rgba(255, 68, 68, 0.3);
    color: #FF4444;
    width: 100%;
    margin: 24px 0 16px 0;
}

.button-icon {
    font-size: 16px;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    cursor: pointer;
}

.settings-item-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.settings-icon {
    font-size: 18px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-text {
    flex: 1;
}

.settings-title {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
}

.settings-subtitle {
    font-size: 12px;
    color: #9E9E9E;
}

.settings-arrow {
    font-size: 16px;
    color: #9E9E9E;
}

.settings-divider {
    height: 0.5px;
    background: #424242;
    margin: 8px 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 28px;
    background: #424242;
    border-radius: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle-switch:hover {
    background: #555;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 12px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-slider.active {
    transform: translateX(20px);
}

.toggle-switch.active {
    background: white;
}

.toggle-switch.active .toggle-slider {
    background: black;
}

.app-version {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin: 24px 0;
}

/* Settings Back Button */
.settings-back-btn {
    position: fixed;
    top: 70px;
    left: 30px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: none;
    z-index: 200;
    backdrop-filter: blur(10px);
}

.settings-back-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Light Theme Overrides */
body.light-theme {
    background: #f0f0f0;
}

body.light-theme .iphone-screen {
    background: #ffffff;
}

body.light-theme #app {
    background: #ffffff;
}

body.light-theme .app-bar {
    background: #ffffff;
    color: black;
}

body.light-theme .logo {
    color: black;
}



body.light-theme .content-section {
    color: black;
}

body.light-theme .section-header {
    color: #666;
}

body.light-theme .stat-card,
body.light-theme .action-card,
body.light-theme .workout-card,
body.light-theme .settings-card {
    background: #f8f9fa;
    border-color: #e0e0e0;
}

body.light-theme .stat-value,
body.light-theme .action-title,
body.light-theme .workout-title,
body.light-theme .settings-title {
    color: black;
}

body.light-theme .bottom-nav {
    background: #ffffff;
    border-top: 0.5px solid #e0e0e0;
}

body.light-theme .nav-item.active {
    color: black;
}

body.light-theme .fab {
    background: black;
    color: white;
}

body.light-theme .profile-avatar {
    background: black;
    color: white;
}

body.light-theme .profile-name,
body.light-theme .settings-title {
    color: black;
}

body.light-theme .settings-button.compact {
    background: rgba(0, 0, 0, 0.1);
    color: black;
}

body.light-theme .settings-icon {
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme .toggle-switch {
    background: #e0e0e0;
}

body.light-theme .toggle-switch:hover {
    background: #d0d0d0;
}

body.light-theme .toggle-switch.active {
    background: black;
}

body.light-theme .toggle-switch.active .toggle-slider {
    background: white;
}

/* Exercise Page Styles */
#exercise-content {
    position: relative;
}

#guided-flow-content {
    position: relative;
    padding-bottom: 20px;
    pointer-events: auto;
    z-index: 1;
}

.exercise-categories {
    margin-bottom: 20px;
}

.exercise-category {
    margin-bottom: 32px;
}

.category-header {
    margin-bottom: 16px;
}

.category-title {
    font-size: 16px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

.exercise-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exercise-card {
    background: #1E1E1E;
    border: 0.5px solid #424242;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.exercise-card:hover {
    transform: scale(0.98);
}

.exercise-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 16px;
    flex-shrink: 0;
}

.exercise-info {
    flex: 1;
}

.exercise-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.exercise-description {
    font-size: 12px;
    color: #9E9E9E;
    margin-bottom: 8px;
    line-height: 1.4;
}

.exercise-sets {
    background: rgba(255, 255, 255, 0.1);
    color: #9E9E9E;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    display: inline-block;
}

.exercise-arrow {
    font-size: 16px;
    color: #9E9E9E;
    margin-left: 12px;
}

.exercise-help-btn {
    background: white;
    color: black;
    padding: 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
    margin-bottom: 24px;
}

.exercise-help-btn:hover {
    transform: scale(1.02);
}

.help-icon {
    font-size: 16px;
}

/* Guided Flow Styles */
.goal-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.goal-button {
    background: #1E1E1E;
    border: 0.5px solid #424242;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.goal-button:hover {
    transform: scale(0.98);
}

.goal-icon {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 12px;
    font-size: 24px;
    margin-right: 16px;
}

.goal-info {
    flex: 1;
}

.goal-title {
    font-size: 16px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.goal-subtitle {
    font-size: 12px;
    color: #9E9E9E;
}

.goal-arrow {
    font-size: 16px;
    color: #9E9E9E;
}

.recommendation-header {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.recommendation-icon {
    font-size: 24px;
}

.recommendation-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.recommendation-info p {
    font-size: 12px;
    color: #9E9E9E;
    margin: 0;
}

.exercise-card.recommended {
    border-color: rgba(255, 255, 255, 0.3);
    border-width: 1px;
}

.exercise-card.recommended .exercise-icon {
    background: rgba(255, 255, 255, 0.1);
}

.recommended-badge {
    background: white;
    color: black;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

/* Light Theme Exercise Overrides */
body.light-theme .category-title {
    color: black;
}

body.light-theme .exercise-card {
    background: #f8f9fa;
    border-color: #e0e0e0;
}

body.light-theme .exercise-name {
    color: black;
}

body.light-theme .exercise-icon {
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme .exercise-sets {
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme .exercise-help-btn {
    background: black;
    color: white;
}

body.light-theme .goal-button {
    background: #f8f9fa;
    border-color: #e0e0e0;
}

body.light-theme .goal-title {
    color: black;
}

body.light-theme .goal-icon {
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme .recommendation-header {
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme .recommendation-info h3 {
    color: black;
}

body.light-theme .exercise-card.recommended {
    border-color: rgba(0, 0, 0, 0.3);
}

body.light-theme .exercise-card.recommended .exercise-icon {
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme .recommended-badge {
    background: black;
    color: white;
} 