/* ============================================================
   styles.css - Stiluri pentru aplicația Soare / Lună / Meteo
   Include: Teme, Glassmorphism, Animații și Layout Responsiv
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --scale: 1.0; /* Factor de scalare pentru întregul corp al paginii */
}

body {
    font-family: 'Inter', system_ui, sans-serif;
    transform: scale(var(--scale));
    transform-origin: center top;
}

/* ====================== Teme (Dark / Light) ====================== */

/* Tema Întunecată (Implicită) */
html.dark {
    --card-bg: #0f172a;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --border-color: rgba(255,255,255,0.12);
    background-color: #0a0a0a;
}

/* Tema Luminoasă */
html.light {
    --card-bg: rgba(255, 255, 255, 0.75);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: rgba(0, 0, 0, 0.1);
    background: radial-gradient(circle at top right, #f8fafc, #f1f5f9, #e2e8f0);
    background-attachment: fixed;
}

/* Ajustări specifice pentru elemente în tema luminoasă */
html.light .glass {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

html.light .time-label {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

html.light #city-input,
html.light #date-picker {
    background-color: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
    color: #0f172a;
}

html.light .bg-white\/5 {
    background-color: rgba(0, 0, 0, 0.03);
}

html.light .bg-emerald-500\/10 { background-color: #d1fae5; }
html.light .text-emerald-400 { color: #059669; }
html.light .text-amber-300 { color: #d97706; }

/* ====================== Componente UI & Glassmorphism ====================== */

.glass {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Font monospațiat pentru cifrele ceasului (previne tremuratul la schimbarea orei) */
.time-label {
    font-feature-settings: "tnum";
}

.forecast-day {
    transition: all 0.2s ease;
}

/* Reducerea dimensiunii rândurilor când prognoza este extinsă la 7 zile */
.forecast-expanded .forecast-day {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* Butonul triunghi pentru toggle prognoză */
.triangle-btn {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid #fbbf24;
    background: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 0;
    border-bottom: none;
}

/* Rotația triunghiului când este activ */
.triangle-btn.active {
    transform: rotate(180deg);
}

/* ====================== Lună fotorealistă ====================== */

.moon-phase-img {
    display: block;
    margin: 0 auto;
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(222, 216, 202, 0.4));
    transition: all 0.5s ease;
}

/* Ajustări pentru ecrane mici */
@media (max-width: 768px) {
    .moon-phase-img {
        width: 90px;
        height: 90px;
    }
}

/* ====================== Modal README ====================== */

#readme-modal .prose h3 { margin-top: 1.5em; }
#readme-modal .prose ul { list-style-type: disc; padding-left: 1.5rem; }
