/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background-color: #f5f5f5;
    color: #2c3e50;
    line-height: 1.6;
}

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

/* Header */
header {
    text-align: center;
    padding: 30px 0;
}

header h1 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

header .subtitle {
    font-size: 1rem;
    color: #666;
    font-style: italic;
}

/* Main content layout */
.main-content {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.left-column {
    flex: 1;
    max-width: 400px;
}

.right-column {
    flex: 1.5;
}

/* Form section */
.form-section {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.form-section h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group .required {
    color: #dc3545;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #f8f9fa;
    color: #2c3e50;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.form-group input::placeholder {
    color: #999;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.85rem;
}

/* Submit button */
.submit-btn {
    width: 100%;
    padding: 14px 20px;
    background-color: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #1a252f;
}

.submit-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.submit-btn:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.3);
}

.submit-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* Help section */
.help-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.help-section details summary {
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    font-size: 0.95rem;
}

.help-content {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #555;
}

.help-content ul {
    margin: 8px 0 12px 20px;
}

.help-content li {
    margin-bottom: 4px;
}

/* Download section */
.download-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.download-section h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #5a6c7d;
    font-size: 1rem;
}

.download-btn {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 10px;
    background-color: #27ae60;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.download-btn:hover {
    background-color: #219a52;
}

.download-btn:focus {
    outline: 2px solid #1a252f;
    outline-offset: 2px;
}

.download-btn:focus-visible {
    outline: 2px solid #1a252f;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.3);
}

.download-btn:last-child {
    margin-bottom: 0;
}

/* Chart section */
.chart-section {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.chart-section h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.chart-placeholder {
    background: #f0f4f8;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    color: #666;
}

.chart-placeholder p {
    margin-bottom: 20px;
}

.features-list {
    text-align: left;
    max-width: 350px;
    margin: 0 auto;
}

.features-list ul {
    margin: 10px 0 0 20px;
}

.features-list li {
    margin-bottom: 6px;
}

/* Chart result */
.chart-result {
    text-align: center;
}

.chart-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
}

.chart-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.chart-header p {
    margin: 5px 0 0 0;
    color: #5a6c7d;
    font-size: 0.95rem;
}

#chart-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Error message */
.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

/* Interpretations section */
.interpretations-section {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.interpretations-section h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #2c3e50;
    text-align: center;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    font-size: 1rem;
    color: #666;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #f0f4f8;
    color: #2c3e50;
}

.tab-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.tab-btn:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.tab-btn.active {
    background: #2c3e50;
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

/* Planet/Aspect/House items */
.planet-item,
.aspect-item,
.house-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid #3498db;
}

.planet-item h4,
.aspect-item h4 {
    color: #2c3e50;
    margin-bottom: 8px;
}

.planet-item .interpretation,
.aspect-item .interpretation {
    color: #555;
    font-style: italic;
    font-size: 0.95rem;
}

.retrograde {
    color: #e74c3c;
    font-weight: 600;
}

/* Legend */
.legend-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.legend-column h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.symbol-list {
    list-style: none;
}

.symbol-list li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.symbol-list .symbol {
    display: inline-block;
    width: 30px;
    font-size: 1.2rem;
}

.symbol-list .fire { color: #D35400; }
.symbol-list .earth { color: #27AE60; }
.symbol-list .air { color: #9B59B6; }
.symbol-list .water { color: #3498DB; }

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

/* Responsive */
@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
    }

    .left-column {
        max-width: 100%;
    }

    .legend-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-wrap: wrap;
    }
}

@media (max-width: 500px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.6rem;
    }

    .form-section,
    .chart-section,
    .interpretations-section {
        padding: 18px;
    }
}
