.birthchart-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Birth Details Form */
.birth-form {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--background);
    color: var(--text);
}

.place-results {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    margin-top: 0.5rem;
    display: none;
    z-index: 100;
}

.place-results.active {
    display: block;
}

.place-item {
    padding: 0.8rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.place-item:hover {
    background: var(--background);
}

.generate-btn {
    width: 100%;
    padding: 1rem;
    background: var(--highlight);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.3s ease;
}

.generate-btn:hover {
    background: var(--primary);
}

/* Chart Section */
.chart-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .chart-container {
        grid-template-columns: 1.5fr 1fr;
    }
}

.chart-wheel {
    aspect-ratio: 1;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.chart-legend {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
}

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

.planet-position {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--background);
    border-radius: 5px;
}

/* Chart Interpretation */
.chart-interpretation {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: var(--background);
    border: none;
    border-radius: 25px;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

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

.tab-pane {
    display: none;
}

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

.aspect-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.aspect-card {
    background: var(--background);
    border-radius: 10px;
    padding: 1.5rem;
}

.aspect-card h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Chart Actions */
.chart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
    justify-content: center;
}

.action-btn {
    padding: 0.8rem 1.5rem;
    background: var(--highlight);
    color: var(--white);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

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

/* Saved Charts Section */
.saved-charts {
    margin: 3rem 0;
}

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

.chart-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.chart-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chart-card .date {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.chart-card .name {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.chart-card .details {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Loading State */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    color: var(--white);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--secondary);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--card-bg);
    color: var(--text);
    padding: 1rem 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .birthchart-container {
        margin: 1rem;
    }

    .birth-form {
        padding: 1.5rem;
    }

    .tabs {
        padding-bottom: 0.8rem;
    }

    .tab-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .chart-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Touch-friendly improvements */
@media (hover: none) {
    .tab-btn,
    .action-btn,
    .chart-card {
        transition: none;
    }

    .tab-btn:active,
    .action-btn:active {
        background: var(--primary);
    }

    .chart-card:active {
        transform: translateY(-2px);
    }
}
