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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 16px;
    padding: 40px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
}

h1 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
}

.timer-display {
    font-size: 120px;
    font-weight: bold;
    margin: 40px 0;
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease;
}

.timer-display.green {
    color: #22c55e;
}

.timer-display.yellow {
    color: #eab308;
}

.timer-display.red {
    color: #ef4444;
}

.timer-display.blue {
    color: #3b82f6;
}

.exercise-info {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.exercise-name {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.form-hint {
    font-size: 14px;
    color: #888;
    font-style: italic;
    margin-top: 10px;
    padding: 0 20px;
}

.rest-label {
    font-size: 26px;
    font-weight: 600;
    color: #3b82f6;
    margin-bottom: 10px;
}

.start-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 20px 60px;
    font-size: 20px;
    font-weight: 600;
    border-radius: 12px 0 0 12px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.2s;
    flex: 1;
}

.start-btn:hover {
    background: #2563eb;
}

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

.split-button-container {
    display: flex;
    width: 100%;
    max-width: 400px;
    margin: 20px auto 0;
}

.expand-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-left: 2px solid rgba(255,255,255,0.3);
    padding: 0;
    font-size: 18px;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    flex: 0 0 60px;
    height: 100%;
}

.expand-btn:hover {
    background: #2563eb;
}

.expand-arrow {
    font-size: 16px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.expand-arrow.expanded {
    transform: rotate(90deg);
}

.individual-exercises {
    margin-top: 20px;
    padding: 0 20px;
    background: #f9fafb;
    border-radius: 12px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.individual-exercises.expanded {
    max-height: 600px;
    padding: 20px;
}

.exercise-card {
    background: white;
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 10px;
    border: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

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

.exercise-card-content {
    flex: 1;
}

.exercise-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.exercise-card-info {
    font-size: 13px;
    color: #666;
}

.exercise-start-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.exercise-start-btn:hover {
    background: #059669;
}

.workout-selection {
    margin: 20px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.workout-selection-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: left;
}

.workout-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
}

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

.workout-card:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.workout-card.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.workout-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.workout-card-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.workout-card-badge {
    background: #3b82f6;
    color: white;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.workout-card-info {
    font-size: 14px;
    color: #666;
}

.skip-btn {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.2s;
}

.skip-btn:hover {
    background: #d97706;
}

.pause-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #6b7280;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.pause-btn:hover {
    background: #4b5563;
}

.pause-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.pause-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
}

.pause-title {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.resume-btn {
    background: #22c55e;
    color: white;
    border: none;
    padding: 15px 50px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.2s;
}

.resume-btn:hover {
    background: #16a34a;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.skip-rep-btn, .skip-exercise-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.skip-rep-btn:hover, .skip-exercise-btn:hover {
    background: #dc2626;
}

.update-banner.hidden {
    display: none !important;
}

.hidden {
    display: none;
}

.status-text {
    font-size: 16px;
    color: #666;
    margin-top: 20px;
}

.next-info {
    font-size: 18px;
    color: #666;
    margin-top: 20px;
}

.voice-hint {
    font-size: 14px;
    color: #999;
    margin-top: 15px;
}

.listening-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    margin-left: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.complete-message {
    font-size: 28px;
    font-weight: 600;
    color: #22c55e;
    margin-bottom: 20px;
}

.calendar-section {
    margin: 30px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.calendar-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.week-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.day-cell {
    text-align: center;
    padding: 10px 5px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
}

.day-header {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
}

.day-status {
    font-size: 20px;
    margin-top: 5px;
}

.day-cell.today {
    border-color: #3b82f6;
    background: #eff6ff;
}

.week-summary {
    font-size: 14px;
    color: #666;
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.debug-btn {
    margin-top: 10px;
    padding: 8px 16px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.debug-btn:hover {
    background: #dc2626;
}

.settings-btn {
    margin-top: 10px;
    margin-left: 10px;
    padding: 10px 20px;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.settings-btn:hover {
    background: #4b5563;
}

.settings-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.back-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    margin-right: 10px;
}

.settings-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.settings-workout-title {
    font-size: 18px;
    font-weight: 600;
    color: #3b82f6;
    margin-bottom: 20px;
    padding: 15px;
    background: #eff6ff;
    border-radius: 8px;
    text-align: center;
}

.exercise-settings {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.exercise-settings-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.setting-label {
    font-size: 16px;
    color: #666;
}

.setting-input {
    width: 80px;
    padding: 8px 12px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    text-align: center;
}

.setting-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.settings-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.reset-btn {
    flex: 1;
    padding: 15px;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.reset-btn:hover {
    background: #d97706;
}

.save-btn {
    flex: 1;
    padding: 15px;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.save-btn:hover {
    background: #16a34a;
}

.update-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #3b82f6;
    color: white;
    padding: 12px 20px;
    text-align: center;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.update-banner-text {
    flex: 1;
    font-size: 14px;
}

.update-reload-btn {
    background: white;
    color: #3b82f6;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.update-reload-btn:hover {
    background: #f0f0f0;
}

.version-info {
    font-size: 12px;
    color: #999;
    margin-top: 15px;
}
