:root {
    --bg-dark: #09090b;
    --bg-panel: #18181b;
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.5);
    --accent-hover: #7c3aed;
    --text-main: #f8fafc;
    --text-muted: #a1a1aa;
    --border: #27272a;
    --glass-bg: rgba(24, 24, 27, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    /* Subtle cosmic background */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.1) 0%, transparent 50%);
}

.app-container {
    display: flex;
    height: 100%;
    width: 100%;
}

/* --- Sidebar Controls --- */
.sidebar {
    width: 380px;
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    gap: 32px;
    z-index: 10;
    box-shadow: 4px 0 20px rgba(0,0,0,0.4);
}

header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    color: var(--accent);
}

header svg {
    width: 32px;
    height: 32px;
}

header h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="date"],
input[type="time"] {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    background-color: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

input[type="date"]:focus,
input[type="time"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.checkbox-group label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Actions */
.actions {
    margin-top: auto;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover:not(:disabled) {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.action-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.action-btn:disabled {
    background-color: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.action-btn svg {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    text-align: center;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
}

#zodiac-display {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
}

/* --- Main Dashboard --- */
.dashboard {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    opacity: 0.6;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    stroke-width: 1px;
}

.empty-state h2 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.results-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Glass Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.card-header {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

/* Main Age Display */
.main-age-card {
    text-align: center;
    background: linear-gradient(145deg, rgba(24,24,27,0.8), rgba(9,9,11,0.9));
    border-top: 1px solid rgba(139, 92, 246, 0.3);
}

.main-age-card h2 {
    font-size: 1rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
}

.age-primary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.age-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.age-block span {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.age-block small {
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 8px;
    font-weight: 600;
}

.age-divider {
    font-size: 3rem;
    font-weight: 300;
    color: var(--border);
    margin-top: -30px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Live Stats */
.live-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
}

.live-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.live-block span {
    font-size: 2.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.live-block small {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.pulse span {
    color: var(--accent);
}

/* Next Birthday */
.birthday-card {
    text-align: center;
}

.countdown-val {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.target-date-display {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 500;
}

/* Milestones Grid */
.milestones-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    padding: 20px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-val {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Responsive constraints */
@media (max-width: 1024px) {
    .milestones-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        overflow-y: auto;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 24px;
    }
    .dashboard {
        padding: 24px 16px;
    }
    body {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .age-primary {
        gap: 10px;
    }
    .age-block span {
        font-size: 3rem;
    }
    .age-divider {
        font-size: 2rem;
        margin-top: -20px;
    }
}