:root {
    --primary-color: #2563eb;
    --primary-light: #60a5fa;
    --primary-dim: #93c5fd;
    --accent-green: #10b981;
    --accent-green-light: #34d399;
    --bg-dark: #1a1a2e;
    --bg-darker: #16213e;
    --text-white: #ffffff;
    --text-gray: #d1d5db;
}

[data-theme="kristen"] {
    --primary-color: #ec4899;
    --primary-light: #f472b6;
    --primary-dim: #f9a8d4;
    --accent-green: #10b981;
    --accent-green-light: #34d399;
    --bg-dark: #1a1a2e;
    --bg-darker: #16213e;
    --text-white: #ffffff;
    --text-gray: #d1d5db;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    color: var(--text-white);
    min-height: 100vh;
}

.navbar {
    background: rgba(37, 99, 235, 0.9);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

[data-theme="kristen"] .navbar {
    background: rgba(236, 72, 153, 0.9);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 0.5rem;
}

.nav-user-switcher {
    text-align: center;
    margin-bottom: 0.75rem;
}

.nav-user-switcher select {
    min-width: 150px;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    border-radius: 8px;
    border: 2px solid var(--text-white);
    background: rgba(255,255,255,0.15);
    color: var(--text-white);
    cursor: pointer;
}

.nav-user-switcher select:hover {
    background: rgba(255,255,255,0.25);
}

.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--text-white);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: rgba(255,255,255,0.2);
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    padding-bottom: 3rem;
}

.tab-content {
    display: none;
}

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

h1 {
    text-align: center;
    margin: 1.5rem 0;
    font-size: 2rem;
    color: var(--primary-light);
}

h2 {
    margin: 1.5rem 0 1rem;
    color: var(--primary-dim);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.workout-selector {
    text-align: center;
    margin: 1rem 0;
}

select {
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    background: var(--bg-dark);
    color: var(--text-white);
    min-width: 250px;
}

.workout-display {
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid var(--primary-color);
}

[data-theme="kristen"] .workout-display {
    background: rgba(236, 72, 153, 0.1);
    border: 1px solid var(--primary-color);
}

.exercise-item {
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: background 0.3s;
}

.exercise-item.active-exercise {
    background: rgba(16, 185, 129, 0.2);
    border-left-color: var(--accent-green);
}

.exercise-item h3 {
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

.exercise-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-top: 0.5rem;
}

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

.weight-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.weight-input label {
    color: var(--primary-dim);
    font-size: 0.85rem;
}

.weight-input input {
    width: 80px;
    padding: 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--primary-color);
    background: var(--bg-dark);
    color: var(--text-white);
    font-size: 0.9rem;
}

.timer-section {
    background: rgba(37, 99, 235, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin: 1.5rem 0;
}

[data-theme="kristen"] .timer-section {
    background: rgba(236, 72, 153, 0.2);
}

.timer-display {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-light);
    font-family: monospace;
    margin-bottom: 1rem;
    transition: color 0.3s;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

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

.btn-primary:hover {
    background: #1d4ed8;
}

[data-theme="kristen"] .btn-primary {
    background: var(--primary-color);
}

[data-theme="kristen"] .btn-primary:hover {
    background: #db2777;
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: var(--text-white);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

.form-group {
    margin: 1rem 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-dim);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    background: var(--bg-dark);
    color: var(--text-white);
}

.stats-form, .photo-upload, .food-entry {
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid var(--primary-color);
}

[data-theme="kristen"] .stats-form,
[data-theme="kristen"] .photo-upload,
[data-theme="kristen"] .food-entry {
    background: rgba(236, 72, 153, 0.1);
    border: 1px solid var(--primary-color);
}

.stats-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.summary-card {
    background: rgba(37, 99, 235, 0.2);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--primary-color);
}

[data-theme="kristen"] .summary-card {
    background: rgba(236, 72, 153, 0.2);
    border: 1px solid var(--primary-color);
}

.summary-card h3 {
    color: var(--primary-dim);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.summary-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-light);
}

.summary-goal {
    font-size: 0.85rem;
    color: var(--primary-dim);
    margin-top: 0.5rem;
}

.water-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.comparison-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    align-items: flex-end;
}

.comparison-display {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.comparison-display img {
    max-width: 300px;
    border-radius: 12px;
    border: 3px solid var(--primary-color);
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
    position: relative;
}

.photo-gallery img {
    width: 100%;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: transform 0.3s;
    display: block;
}

.photo-gallery img:hover {
    transform: scale(1.05);
}

.food-history, .stats-history, .workout-log-history {
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
}

[data-theme="kristen"] .food-history,
[data-theme="kristen"] .stats-history,
[data-theme="kristen"] .workout-log-history {
    background: rgba(236, 72, 153, 0.1);
}

.food-item, .stats-item, .log-item {
    background: rgba(255,255,255,0.05);
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.food-item div, .stats-item div, .log-item div {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.food-item span, .stats-item span, .log-item span {
    color: var(--primary-dim);
}

.workout-log-section {
    text-align: center;
    margin: 1rem 0;
}

.progress-charts {
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
}

[data-theme="kristen"] .progress-charts {
    background: rgba(236, 72, 153, 0.1);
}

canvas {
    max-width: 100%;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}

.exercise-examples {
    margin-top: 2rem;
}

.exercise-guide-item {
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    margin: 0.75rem 0;
    border-radius: 8px;
    border-left: 4px solid var(--accent-green);
}

.exercise-guide-item h4 {
    color: var(--accent-green-light);
    margin-bottom: 0.5rem;
}

.exercise-guide-item p {
    color: var(--text-gray);
    line-height: 1.6;
    margin: 0.5rem 0;
}

.exercise-guide-item .tips {
    background: rgba(16, 185, 129, 0.1);
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.workout-progress {
    margin-top: 1rem;
    text-align: center;
}

@media (max-width: 768px) {
    .nav-tabs {
        gap: 0.25rem;
    }
    
    .tab-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .nav-user-switcher select {
        min-width: 120px;
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .timer-display {
        font-size: 2rem;
    }
    
    .summary-cards, .stats-summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .comparison-controls {
        flex-direction: column;
    }
    
    .comparison-display img {
        max-width: 100%;
    }
    
    .food-item div {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .exercise-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}
