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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--surface);
}

/* Views */
.view {
    display: none;
    padding: 1rem;
    padding-bottom: 5rem;
}

.view.active {
    display: block;
}

/* Header */
header {
    margin-bottom: 1.5rem;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
}

header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.date {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Session Card */
.session-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.session-card h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.session-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-back {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: white;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-back {
    background: var(--background);
    color: var(--text);
    width: auto;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Today Summary */
.today-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.today-summary h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.progress-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.progress-item:last-child {
    border-bottom: none;
}

.progress-exercise {
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.progress-sets {
    font-size: 0.875rem;
    color: var(--text-light);
}

.no-progress {
    color: var(--text-light);
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem 0;
}

/* Exercise List */
.exercises-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.exercise-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.exercise-card:active {
    transform: scale(0.98);
    border-color: var(--primary);
}

.exercise-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.exercise-today {
    font-size: 0.875rem;
    color: var(--success);
    font-weight: 500;
}

.exercise-none {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Stats */
.stats-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.stat-session {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.stat-exercise {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.stat-exercise:last-child {
    border-bottom: none;
}

.stat-name {
    font-weight: 500;
    color: var(--text);
}

.stat-total {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.125rem;
}

.week-range {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0;
    max-width: 600px;
    margin: 0 auto;
}

.nav-btn {
    background: none;
    border: none;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-btn.active {
    color: var(--primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 1rem;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.modal-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text);
}

.session-option {
    width: 100%;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.session-option:active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* Log Form */
.log-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.log-form label {
    font-weight: 500;
    color: var(--text);
}

.log-form input {
    padding: 0.875rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    width: 100%;
}

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

/* Responsive */
@media (min-width: 600px) {
    .container {
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }
}
