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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Training Max Inputs */
.tm-inputs {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.tm-inputs h2 {
    margin-bottom: 20px;
    color: #667eea;
}

/* Program Selector */
.program-selector {
    margin-bottom: 25px;
}

.program-selector select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.program-selector select:focus {
    outline: none;
    border-color: #667eea;
}

/* Program Info */
.program-info {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.program-level {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.program-level.beginner {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.program-level.intermediate {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

.program-link {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 12px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.2s;
}

.program-link:hover {
    background: #5568d3;
}

.program-link.hidden {
    display: none;
}

.program-intro {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.program-instructions summary {
    cursor: pointer;
    font-weight: 600;
    color: #667eea;
    padding: 5px 0;
}

.program-instructions summary:hover {
    color: #5568d3;
}

.program-instructions ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.program-instructions li {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 5px;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.lifter-info {
    grid-template-columns: repeat(2, 1fr);
    max-width: 520px;
}

/* DOTS Score Display */
.dots-display {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    text-align: center;
    color: white;
}

.dots-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.dots-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.dots-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.dots-details {
    margin-top: 10px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.input-group input {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
}

.input-group select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    margin-bottom: 20px;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* Week Selector */
.week-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.week-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.week-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.week-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Program Display */
.program-display, .all-weeks-display {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.hidden {
    display: none;
}

/* Lift Cards - Compact */
.lift-card-compact {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
}

.lift-card-header {
    color: #667eea;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.lift-note-sm {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 8px;
}

.work-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.work-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.work-row:last-child {
    border-bottom: none;
}

.work-name {
    color: #555;
    font-weight: 600;
    min-width: 100px;
    font-size: 0.9rem;
}

.work-spec {
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

.work-weight {
    color: #667eea;
    font-weight: 700;
    font-size: 1rem;
}

.work-progression {
    color: #888;
    font-size: 0.8rem;
}

.work-rpe {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.work-note {
    font-size: 0.8rem;
    color: #856404;
    background: #fff3cd;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 4px;
}

/* Week Header Compact */
.week-header-compact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.week-header-compact h2 {
    font-size: 1.2rem;
    margin: 0;
}

/* GZCLP Day Layout */
.lift-row {
    display: flex;
    align-items: center;
    background: white;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    gap: 15px;
}

.lift-row .lift-name {
    font-weight: 700;
    min-width: 80px;
    font-size: 1rem;
}

.lift-row .lift-prescription {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.tier-label {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.lift-row .sets-reps {
    font-weight: 600;
    font-size: 0.95rem;
}

.lift-row .weight {
    color: #667eea;
    font-weight: 700;
    font-size: 1.1rem;
}

.stage-badge {
    background: #f0f0f0;
    color: #666;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.t3-note {
    color: #888;
    font-size: 0.85rem;
}

.lift-buttons {
    display: flex;
    gap: 6px;
}

.btn-adjust-sm {
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.btn-adjust-sm:hover {
    background: #e0e0e0;
}

.btn-success-sm {
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.btn-success-sm:hover {
    background: #c8e6c9;
}

.btn-fail-sm {
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.btn-fail-sm:hover {
    background: #ffcdd2;
}

/* Tier colors for lift rows */
.lift-row.tier-1 {
    border-left-color: #d32f2f;
}

.lift-row.tier-1 .tier-label {
    background: #d32f2f;
}

.lift-row.tier-1 .lift-name {
    color: #c62828;
}

.lift-row.tier-2 {
    border-left-color: #1976d2;
}

.lift-row.tier-2 .tier-label {
    background: #1976d2;
}

.lift-row.tier-2 .lift-name {
    color: #1565c0;
}

.lift-row.tier-3 {
    border-left-color: #7cb342;
    background: #f9fbe7;
}

.lift-row.tier-3 .lift-name {
    color: #558b2f;
}

/* Legacy support */
.lift-card {
    background: #f8f9fa;
    border-left: 5px solid #667eea;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 8px;
}

.lift-card h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.work-section {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.work-section:last-child {
    margin-bottom: 0;
}

.work-title {
    font-weight: 700;
    color: #555;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.work-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.detail-label {
    color: #666;
    font-weight: 500;
}

.detail-value {
    font-weight: 700;
    color: #333;
    font-size: 1.1rem;
}

.weight-highlight {
    color: #667eea;
    font-size: 1.3rem;
}

/* Week Header */
.week-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
}

.week-header h2 {
    font-size: 1.8rem;
}

.week-header p {
    margin-top: 5px;
    opacity: 0.9;
}

/* All Weeks View */
.all-weeks-content {
    margin-top: 20px;
}

.week-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 3px solid #e0e0e0;
}

.week-section:last-child {
    border-bottom: none;
}

/* Notes */
.notes {
    background: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 15px;
    margin-top: 15px;
    border-radius: 6px;
}

.notes p {
    color: #856404;
    font-weight: 500;
    margin: 5px 0;
}

/* RPE Badge */
.rpe-badge {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
}

/* AMRAP Note */
.amrap-note {
    background: #e3f2fd;
    border-left-color: #2196f3;
}

.amrap-note p {
    color: #1565c0;
}

/* Lift Note */
.lift-note {
    background: #f3e5f5;
    border-left: 4px solid #9c27b0;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.lift-note p {
    color: #7b1fa2;
    font-weight: 500;
    margin: 0;
}

/* Program Note */
.program-note {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 6px;
}

.program-note p {
    color: #2e7d32;
    font-weight: 500;
    margin: 0;
}

/* GZCLP Tier Styling */
.tier-1 {
    border-left: 4px solid #d32f2f;
}

.tier-1 .work-title {
    color: #d32f2f;
}

.tier-2 {
    border-left: 4px solid #1976d2;
}

.tier-2 .work-title {
    color: #1976d2;
}

/* GZCLP Stage Indicator */
.stage-indicator {
    background: #f0f0f0;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
    display: inline-block;
}

.tier-1 .stage-indicator {
    background: #ffebee;
    color: #c62828;
}

.tier-2 .stage-indicator {
    background: #e3f2fd;
    color: #1565c0;
}

/* Stage Buttons */
.stage-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.btn-fail {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.btn-fail:hover {
    background: #ffcdd2;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .week-selector {
        flex-direction: column;
    }

    .week-btn {
        width: 100%;
    }

    .work-details {
        grid-template-columns: 1fr;
    }
}
