:root {
    --bg-color: #fbfaf8;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #cccccc;
    --btn-bg: #1a2c20;
    /* Dark green/black */
    --btn-text: #ffffff;
    --highlight: #b28a5d;
    /* Gold/brown for headers */
    --box-bg: #f5f3f0;
}

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

body {
    font-family: 'Crimson Text', serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 800px;
}

.card {
    background: #ffffff;
    padding: 3rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--highlight);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2rem;
}

.input-row {
    display: flex;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.input-row label {
    width: 150px;
    font-size: 1.2rem;
    color: var(--text-color);
    margin-right: 1rem;
}

.input-row input[type="text"] {
    flex: 1;
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
    font-family: 'Crimson Text', serif;
    font-size: 1.2rem;
    color: var(--text-light);
    outline: none;
    background: transparent;
}

.input-row input[type="text"]:focus {
    border-bottom-color: var(--highlight);
}

.date-inputs,
.time-inputs {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.date-inputs input,
.time-inputs input[type="number"],
.time-inputs select {
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem;
    font-family: 'Crimson Text', serif;
    font-size: 1.2rem;
    color: var(--text-light);
    outline: none;
    background: transparent;
    text-align: center;
    width: 60px;
}

.time-inputs select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    text-align-last: center;
    width: 70px;
}

.date-inputs input#year {
    width: 80px;
}

.date-inputs span,
.time-inputs span {
    font-size: 1.2rem;
    color: var(--text-light);
}

.am-pm-toggle {
    display: flex;
    gap: 1rem;
    margin-left: 1.5rem;
    font-family: 'Crimson Text', serif;
    font-size: 1.2rem;
}

.am-pm-toggle label {
    width: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-create {
    width: 100%;
    padding: 1.2rem;
    background-color: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s;
}

.btn-create:hover {
    background-color: #2a4431;
}

/* Autocomplete Styles */
.autocomplete-container {
    position: relative;
    flex: 1;
    display: flex;
}

.autocomplete-container input {
    width: 100%;
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 150px;
    /* Aligned with input */
    right: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-top: none;
    list-style: none;
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.suggestions-list li {
    padding: 10px;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
}

.suggestions-list li:hover {
    background-color: #f0f0f0;
}

/* Result Section Styles */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.user-info h2 {
    font-family: 'Crimson Text', serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.user-info p {
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.3rem;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon,
.btn-settings {
    background: var(--box-bg);
    border: none;
    padding: 0.6rem 1rem;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text-color);
    transition: background 0.3s;
}

.btn-icon:hover,
.btn-settings:hover {
    background: #e2e0dc;
}

/* Bölücü Çizgiler (Dividers) */
.section-divider-center {
    display: flex;
    align-items: center;
    text-align: center;
    color: #555;
    margin: 1.5rem 0;
}

.section-divider-center::before,
.section-divider-center::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.section-divider-center::before {
    margin-right: 1em;
}

.section-divider-center::after {
    margin-left: 1em;
}

.section-divider-center h4 {
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    font-weight: 700;
    margin: 0;
}

.section-divider-left {
    display: flex;
    align-items: center;
    color: #555;
    margin: 1.5rem 0 1rem 0;
}

.section-divider-left::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
    margin-left: 1em;
}

.section-divider-left h4 {
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    font-weight: 700;
    margin: 0;
}

/* Kullanıcı Bilgileri */
.user-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin: 0.5rem 0;
}

.user-name h2 {
    font-family: 'Crimson Text', serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    color: #2c3e50;
}

.user-meta {
    text-align: right;
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    color: #444;
}

.user-meta p {
    margin: 0 0 0.3rem 0;
}

.info-box {
    background: var(--box-bg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.5;
}

.chart-and-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 800px) {
    .chart-and-list {
        flex-direction: row;
    }
}

.planets-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
    row-gap: 1.2rem;
    flex: 1;
}

.planet-row {
    display: flex;
    align-items: center;
    font-family: 'Crimson Text', serif;
    font-size: 1.15rem;
}

.planet-symbol {
    font-size: 1.4rem;
    margin-right: 15px;
    width: 25px;
    text-align: center;
}

.astrochart-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.astrochart-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

#paper {
    width: 100%;
    max-width: 400px;
}

#paper svg {
    width: 100% !important;
    height: auto !important;
}

.btn-back {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.5rem;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.3s;
}

.btn-back:hover {
    background: var(--box-bg);
}

/* Hide arrows in number inputs */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.loader {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Aspekt Açıklaması (Legend) */
.aspect-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1.4rem;
    background: #f9f8f6;
    border: 1px solid #e8e5e0;
    padding: 0.8rem 1.2rem;
    margin-top: 0.5rem;
    font-family: 'Lato', sans-serif;
    font-size: 0.8rem;
}

.legend-title {
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--highlight);
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555;
}

.legend-dot {
    display: inline-block;
    width: 28px;
    height: 3px;
    border-radius: 2px;
}

#interp-section {
    margin-top: 1rem;
    padding-bottom: 3rem;
}

.interp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

@media (min-width: 600px) {
    .interp-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.interp-card {
    background: #f9f8f6;
    border: 1px solid #e8e4de;
    padding: 1.1rem 1.2rem;
    transition: box-shadow 0.2s;
}

.interp-card:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
}

.interp-card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.65rem;
}

.interp-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 1.2rem;
    background: #f0ece6;
    border: 1px solid #ddd8d0;
    border-radius: 50%;
    color: var(--highlight);
}

.interp-symbol.house-num {
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #555;
}

.interp-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.interp-title strong {
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.interp-position {
    font-family: 'Crimson Text', serif;
    font-size: 0.95rem;
    color: var(--highlight);
}

.interp-text {
    font-family: 'Crimson Text', serif;
    font-size: 1.05rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .input-row {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 1.5rem;
    }

    .input-row label {
        width: 100%;
        margin-bottom: 0.5rem;
        margin-right: 0;
        font-size: 1.1rem;
    }

    .input-row input[type="text"],
    .date-inputs,
    .time-inputs {
        width: 100%;
        flex-wrap: wrap;
    }

    .date-inputs input,
    .time-inputs input[type="number"],
    .time-inputs select,
    .date-inputs input#year {
        width: auto;
        flex: 1;
        min-width: 60px;
    }

    .am-pm-toggle {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
        justify-content: flex-start;
    }

    .suggestions-list {
        left: 0;
    }

    .result-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .actions button {
        width: 100%;
    }

    .user-details {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .user-meta {
        text-align: left;
    }

    .planets-container {
        grid-template-columns: 1fr;
    }

    .astrochart-container {
        padding-top: 2rem;
    }
}
