/* Minimalist Modern Workout Tracker */
:root {
    --primary: #60a5fa;
    --primary-dark: #2563eb;
    --secondary: #818cf8;
    --background: #18181b;
    --surface: #232329;
    --text: #f3f4f6;
    --text-light: #a1a1aa;
    --border: #27272a;
    --success: #22d3ee;
    --warning: #fbbf24;
    --danger: #ef4444;
    --shadow: 0 6px 24px -4px rgba(99,102,241,0.10), 0 1.5px 4px -1px rgba(244,114,182,0.08);
    --radius: 16px;
    --radius-sm: 10px;
}

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

body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    padding: 0;
    min-height: 100vh;
    font-size: 14px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    background: transparent;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--primary);
}

.subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Sections */

/* Exercise item dark mode and compact styles */
.exercise-item {
    display: flex;
    align-items: flex-start;
    background: #232329;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.7rem;
    padding: 0.7rem 1rem;
    color: var(--text);
    font-size: 0.95rem;
}
.exercise-icon {
    font-size: 1.5rem;
    margin-right: 0.7rem;
    margin-top: 0.2rem;
}
.exercise-main {
    flex: 1;
}
.exercise-details {
    margin-bottom: 0.2rem;
}
.exercise-name {
    font-weight: 600;
    font-size: 1rem;
}
.exercise-description {
    color: var(--text-light);
    font-size: 0.9rem;
}
.exercise-bottom-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.2rem;
}
.exercise-reps {
    color: var(--primary);
    font-size: 0.95rem;
    margin-right: 0.5rem;
}
.exercise-complete-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 0.2rem;
    transition: color 0.2s;
}
.exercise-complete-btn.completed {
    color: var(--success);
}
.set-checkboxes {
    display: flex;
    gap: 0.3rem;
    margin-right: 0.5rem;
}
.set-checkbox {
    width: 1.1em;
    height: 1.1em;
    accent-color: var(--primary);
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--background);
    cursor: pointer;
}
.mini-timer {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: #18181b;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.1rem 0.5rem;
    font-size: 0.92rem;
    color: var(--text);
}
.mini-timer-display {
    min-width: 2.5em;
    text-align: right;
}
.mini-timer-start {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.1rem 0.5rem;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.2s;
}
.mini-timer-start:disabled {
    background: #444;
    color: #bbb;
    cursor: not-allowed;
}
main, section, .workout-status, .stats-grid, .weight-tracker, .charts-section, .reminders {
    background: var(--surface);
    border-radius: var(--radius-sm);
}

h2, h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

p, label, input, button, .stat-label, .stat-value {
    font-size: 0.95rem;
}

input, select, button {
    background: var(--background);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

input:focus, select:focus, button:focus {
    outline: 2px solid var(--primary);
}

/* Dark mode tweaks for cards and surfaces */
.stat-card, .status-card, .weight-history, .chart-wrapper {
    background: #232329;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
}

/* Scrollbar dark mode */
::-webkit-scrollbar {
    width: 8px;
    background: #232329;
}
::-webkit-scrollbar-thumb {
    background: #33343a;
    border-radius: 8px;
}
section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

/* Today's Workout */
.date-display {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.workout-status {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.status-card {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-dark);
}

/* Buttons */
button {
    font-family: inherit;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

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

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

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Exercises */
.exercises {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.exercise-item {
    display: flex;
    align-items: center;
    padding: 1.1rem 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    border-left: 5px solid var(--primary);
    box-shadow: 0 2px 8px 0 rgba(99,102,241,0.06);
    position: relative;
}

.exercise-complete-btn {
    margin-left: 0;
    margin-right: 0;
    align-self: flex-end;
    margin-bottom: 0.1rem;
    background: none;
    color: var(--primary);
    border: none;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    box-shadow: none;
    display: flex;
    align-items: center;
}
.exercise-complete-btn.completed {
    background: none;
    color: #22c55e;
    border: none;
    cursor: default;
    transform: scale(1.15);
    box-shadow: none;
}
.checkbox-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5em;
    height: 1.5em;
}

.exercise-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 40px;
    text-align: center;
    align-self: flex-start;
}

.exercise-details {
    width: 100%;
}

.exercise-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

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

.exercise-reps {
    font-weight: 600;
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 0.1rem;
}

/* Timer */
.timer {
    background: var(--background);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
}

#timerDisplay {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

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

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--background);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Weight Tracker */
.weight-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.weight-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.weight-history {
    background: var(--background);
    border-radius: var(--radius-sm);
    padding: 1rem;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
}

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

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

/* Reminders */
.reminder-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reminder-controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.reminder-controls select {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    max-width: 200px;
}

/* Footer */
footer {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.small {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Charts */
.charts-section {
    margin-bottom: 1.5rem;
}

.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.chart-wrapper {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    min-height: 250px;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 200px !important;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    section {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stat-value {
        font-size: 2rem;
    }

    .charts-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chart-wrapper {
        padding: 1rem;
        min-height: 200px;
    }
}

.exercise-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.exercise-bottom-row {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 1.2rem;
    width: 100%;
}