/*
Theme Name: Nestabdyk PRO - Secure
Author: Mindaugas Bružas
Version: 14.0
*/

:root {
    --primary: #6750A4; --on-primary: #FFFFFF; --primary-container: #EADDFF; --on-primary-container: #21005D;
    --surface: #FEF7FF; --surface-bright: #FFFFFF; --outline-variant: #CAC4D0;
    --holiday-bg: #FFEBEE; --holiday-text: #c62828; --flag-bg: #FFF8E1; --flag-text: #F57F17;
    --radius-xl: 32px; --shadow-md: 0 12px 40px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
body { background-color: var(--surface); color: #1D1B20; font-family: 'Plus Jakarta Sans', sans-serif; margin: 0; padding: 0; line-height: 1.5; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* NAV */
.topbar { background: rgba(254, 247, 255, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); padding: 16px 0; position: sticky; top: 0; z-index: 500; border-bottom: 1px solid var(--outline-variant); }
.nav-pill-group { display: flex; background: #F3EDF7; padding: 6px; border-radius: 20px; width: fit-content; margin: 0 auto; }
.nav-item { text-decoration: none; color: #49454F; padding: 10px 28px; border-radius: 16px; font-weight: 700; font-size: 0.9rem; transition: 0.3s; }
.nav-item.active { background: #fff; color: var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

/* HERO */
header.hero { text-align: center; padding: 60px 0 30px; }
header.hero h1 { font-size: 3.5rem; margin: 10px 0; font-weight: 900; letter-spacing: -2px; color: #1D1B20; }
.date-subtitle { font-weight: 800; color: var(--primary); opacity: 0.6; font-size: 1.2rem; text-transform: capitalize; }
.hero-names { margin-top: 15px; background: rgba(255,255,255,0.7); display: inline-block; padding: 10px 25px; border-radius: 50px; border: 1px solid rgba(103, 80, 164, 0.15); backdrop-filter: blur(8px); box-shadow: 0 4px 15px rgba(0,0,0,0.03); max-width: 90%; }
.hn-label { font-weight: 800; color: var(--primary); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; margin-right: 8px; }
.hn-list { font-weight: 600; color: #1D1B20; font-size: 1rem; }

/* GRID */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 30px; margin-bottom: 80px; }
.card { background: var(--surface-bright); border-radius: var(--radius-xl); padding: 40px; border: 1px solid rgba(0,0,0,0.03); box-shadow: var(--shadow-md); position: relative; }
.card h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; color: var(--primary); margin: 0 0 30px 0; font-weight: 800; }

/* SEARCH */
.search-container { position: relative; width: 100%; margin-bottom: 30px; z-index: 100; }
.city-input { width: 100%; padding: 18px 25px; border-radius: 28px; border: 1px solid var(--outline-variant); background: #F7F2FA; font-size: 1rem; outline: none; transition: 0.3s; font-weight: 500; }
.city-input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(103, 80, 164, 0.1); }
.search-dropdown { position: absolute; top: 100%; left: 15px; right: 15px; background: #FFFFFF; border-radius: 0 0 16px 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); border: 1px solid rgba(0,0,0,0.05); z-index: 9999; display: none; overflow: hidden; margin-top: -10px; padding-top: 10px; }
.search-item { padding: 12px 20px; cursor: pointer; border-bottom: 1px solid #f0f0f0; font-size: 0.95rem; color: #1D1B20; transition: 0.2s; display: flex; justify-content: space-between; }
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--primary-container); color: var(--on-primary-container); font-weight: 600; }
.search-no-result { padding: 15px; text-align: center; color: #888; font-size: 0.9rem; font-style: italic; }

/* WEATHER */
.weather-display { text-align: center; cursor: pointer; transition: transform 0.2s; }
.weather-display:active { transform: scale(0.98); }
.w-main { display: flex; align-items: center; justify-content: center; gap: 25px; }
.w-icon { font-size: 5rem; }
.w-temp { font-size: 6.5rem; font-weight: 900; letter-spacing: -6px; color: #1D1B20; }
.w-hint { font-size: 0.85rem; opacity: 0.4; margin-top: 10px; font-weight: 700; }
.astro-card { background: linear-gradient(135deg, #F3EDF7 0%, #FEF7FF 100%); border-radius: 24px; padding: 25px; margin: 30px 0; border: 1px solid rgba(103,80,164,0.05); }
.astro-row { display: flex; justify-content: space-between; margin-bottom: 15px; font-size: 0.95rem; }
.astro-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(0,0,0,0.08); padding-top: 15px; font-weight: 800; color: var(--primary); gap: 15px; }
.btn-tonal { background: var(--primary-container); color: var(--on-primary-container); border: none; padding: 18px; border-radius: 100px; font-weight: 800; font-size: 1rem; cursor: pointer; width: 100%; transition: 0.2s; }
.btn-tonal:hover { background: #E2D4FF; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* CALENDAR */
.calendar-card { display: flex; flex-direction: column; justify-content: flex-start; }
.cal-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.cal-nav-btn { background: #F3EDF7; border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: var(--primary); font-weight: bold; font-size: 1rem; transition: 0.2s; display: flex; align-items: center; justify-content: center; }
.cal-nav-btn:hover { background: var(--primary-container); color: var(--on-primary-container); }
.cal-grid-header { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-weight: 700; font-size: 0.85rem; margin-bottom: 10px; color: #666; }
.cal-grid-header .red { color: #d32f2f; }
.cal-grid-body { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-day { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; border-radius: 12px; font-weight: 600; font-size: 0.9rem; cursor: default; transition: 0.2s; background: #fff; border: 1px solid transparent; position: relative; }
.cal-day.is-weekend { color: #d32f2f; background: #FFF8F8; }
.cal-day.is-holiday { background: var(--holiday-bg); color: var(--holiday-text); border-color: #ffcdd2; cursor: pointer; }
.cal-day.is-holiday:hover { transform: scale(1.1); background: #ef9a9a; color: #fff; }
.cal-day.is-flag { background: var(--flag-bg); color: var(--flag-text); border-color: #FFE082; cursor: pointer; }
.cal-day.is-flag:hover { transform: scale(1.1); background: #FFC107; color: #fff; }
.cal-day.is-today-real { background: var(--primary) !important; color: #fff !important; box-shadow: 0 4px 10px rgba(103, 80, 164, 0.3); border-color: var(--primary); }

/* HOROSCOPES */
.horos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 15px; }
.sign-btn { background: #fff; border: 1px solid var(--outline-variant); padding: 30px 15px; border-radius: 24px; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; align-items: center; }
.sign-btn:hover { border-color: var(--primary); background: var(--primary-container); transform: translateY(-4px); }
.s-icon { font-size: 2.8rem; margin-bottom: 10px; }
.s-name { font-weight: 800; font-size: 1rem; color: #1D1B20; }

/* MOON */
.moon-card { background: linear-gradient(180deg, #2D2A32 0%, #151419 100%); color: #F3EDF7; border: 1px solid #444; }
.moon-card h2 { color: #D0BCFF; }
.moon-header { text-align: center; margin-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; }
.mh-top { font-size: 1.1rem; font-weight: 700; color: #D0BCFF; margin-bottom: 5px; }
.mh-phase { font-size: 1.5rem; font-weight: 900; letter-spacing: -1px; }
.moon-grid-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin-bottom: 25px; }
.mg-item { background: rgba(255,255,255,0.05); padding: 12px; border-radius: 16px; text-align: center; font-size: 0.9rem; }
.mg-item span { display: block; font-size: 0.75rem; opacity: 0.7; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; }
.mg-item b { display: block; font-size: 1rem; color: #E8DEF8; }
.moon-desc { font-size: 1.05rem; line-height: 1.7; margin-bottom: 25px; text-align: justify; color: #E6E1E5; }
.moon-affirmation { text-align: center; font-weight: 800; color: #FFD8E4; background: rgba(255,216,228,0.1); padding: 20px; border-radius: 20px; font-style: italic; border: 1px solid rgba(255,216,228,0.2); }

/* GARDEN */
.garden-card { background: linear-gradient(180deg, #F1F8E9 0%, #DCEDC8 100%); border: 1px solid #C5E1A5; color: #33691E; }
.garden-card h2 { color: #2E7D32; }
.garden-list ul { list-style: none; padding: 0; margin: 0 0 20px 0; }
.garden-task { background: rgba(255,255,255,0.7); padding: 10px 15px; margin-bottom: 8px; border-radius: 12px; font-weight: 600; border-left: 4px solid #558B2F; font-size: 0.95rem; box-shadow: 0 2px 5px rgba(0,0,0,0.03); }
.garden-tip { background: #FFFFFF; padding: 15px; border-radius: 16px; font-style: italic; margin-bottom: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); font-size: 0.9rem; line-height: 1.5; color: #1B5E20; }
.garden-warning { color: #C62828; font-weight: 700; font-size: 0.9rem; text-align: center; background: rgba(255, 235, 238, 0.5); padding: 8px; border-radius: 8px; }

/* MODAL */
.modal { display: none; position: fixed; inset: 0; z-index: 9999; align-items: center; justify-content: center; padding: 20px; }
.modal.active { display: flex; }
.modal__overlay { position: absolute; inset: 0; background: rgba(29, 27, 32, 0.5); backdrop-filter: blur(12px); }
.modal__panel { position: relative; background: #FFFFFF; width: 100%; max-width: 600px; padding: 40px; border-radius: 36px; z-index: 10000; box-shadow: 0 30px 60px rgba(0,0,0,0.3); animation: modalSlide 0.3s cubic-bezier(0.2, 0, 0, 1); }
@keyframes modalSlide { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.modal-header h2 { margin: 0; font-weight: 900; font-size: 1.8rem; color: #1D1B20; }
.close-btn { border: none; background: #F3EDF7; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; color: var(--primary); transition: 0.2s; }
.close-btn:hover { background: var(--primary-container); transform: rotate(90deg); }
.modal-content-scroll { max-height: 65vh; overflow-y: auto; padding-right: 10px; }
::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: #E0E0E0; border-radius: 10px; }

/* MOBILE */
@media (max-width: 600px) {
    header.hero h1 { font-size: 2.5rem; }
    .w-temp { font-size: 4.5rem; }
    .horos-grid { grid-template-columns: repeat(2, 1fr); }
    .astro-footer { flex-direction: column; text-align: center; gap: 8px; }
    .hero-names { display: block; margin: 15px auto; width: fit-content; padding: 10px 15px; text-align: center; }
    .hn-label { display: block; margin: 0 0 4px 0; }
    .hn-list { display: block; font-size: 0.95rem; line-height: 1.4; }
    .cal-grid-body { gap: 4px; }
    .cal-day { font-size: 0.8rem; border-radius: 8px; }
}