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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: white;
    border-radius: 12px;
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.subtitle {
    opacity: 0.9;
    font-size: 1rem;
}

h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #2e7d32;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.15rem;
    margin: 20px 0 15px;
    color: #333;
}

h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #1565c0;
}

/* Form Styles */
.input-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #43a047;
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #d32f2f;
}

.even-odd-indicator {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.even-odd-indicator.even {
    background: #e3f2fd;
    color: #1565c0;
}

.even-odd-indicator.odd {
    background: #fff3e0;
    color: #e65100;
}

.btn-calculate {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #2e7d32, #43a047);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
}

.btn-calculate:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.btn-calculate:active {
    transform: translateY(0);
}

.group-preview {
    margin-top: 20px;
    padding: 12px 16px;
    background: #e8f5e9;
    border-radius: 8px;
    border-left: 4px solid #43a047;
}

.group-preview strong {
    color: #2e7d32;
}

/* Results Section */
.results-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.schedule-summary {
    background: #f1f8e9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.schedule-summary p {
    margin-bottom: 8px;
}

.schedule-summary .highlight {
    font-weight: 600;
    color: #2e7d32;
}

.schedule-summary .total-runtime {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #c8e6c9;
}

/* Warning Box */
.warning-box {
    background: #ffebee;
    border: 2px solid #ef5350;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.warning-box h4 {
    color: #c62828;
    margin-bottom: 8px;
}

.warning-box p {
    color: #b71c1c;
}

.warning-box .suggestion {
    margin-top: 10px;
    font-style: italic;
}

/* Instructions */
.instructions {
    margin-top: 10px;
}

.instruction-block {
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid #1565c0;
}

.instruction-intro {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.pin-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.pin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.9rem;
}

.pin.active {
    background: #ffd54f;
    color: #5d4037;
    border: 2px solid #ffc107;
}

.pin.inactive {
    background: #e0e0e0;
    color: #757575;
}

.zone-breakdown {
    margin-top: 16px;
}

.zone-item {
    background: white;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
}

.zone-item .zone-header {
    font-weight: 600;
    color: #1565c0;
    margin-bottom: 4px;
}

.zone-item .zone-detail {
    font-size: 0.9rem;
    color: #666;
}

.gap-note {
    background: #fff8e1;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #f57f17;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gap-note::before {
    content: "GAP";
    background: #ffc107;
    color: #5d4037;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: #757575;
    font-size: 0.9rem;
}

/* Responsive */
@media (min-width: 600px) {
    .container {
        padding: 40px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    .input-section,
    .results-section {
        padding: 35px;
    }
}
