/* ============================================================
   Period Tracker For My Love - style.css
   Pink + Black premium romantic theme
   ============================================================ */

/* ---------- Reset & Base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0d0a0f;
    --bg-dark-2: #16101a;
    --pink: #ff4d9d;
    --pink-light: #ff8ec4;
    --pink-soft: #ffc1e3;
    --black-card: rgba(20, 14, 24, 0.75);
    --glass-border: rgba(255, 141, 196, 0.25);
    --text: #f6e9f1;
    --text-dim: #c9b2c2;
    --shadow: 0 8px 30px rgba(255, 77, 157, 0.18);
}

body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle at 20% 0%, #2a1024 0%, var(--bg-dark) 55%),
                radial-gradient(circle at 80% 100%, #1a0a18 0%, var(--bg-dark-2) 60%);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* ---------- Header ---------- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 10, 15, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 20px;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.app-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    background: linear-gradient(90deg, var(--pink), var(--pink-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-clock {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--pink-light);
    background: rgba(255, 77, 157, 0.12);
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
}

/* ---------- Layout ---------- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 18px 60px;
}

.section {
    margin-bottom: 42px;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 18px;
    color: var(--pink-light);
    font-weight: 600;
}

/* ---------- Cards (Glassmorphism) ---------- */
.card {
    background: var(--black-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 26px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(255, 77, 157, 0.3);
}

.glow {
    border: 1px solid rgba(255, 141, 196, 0.4);
}

/* ---------- Dashboard ---------- */
#dashboardSection {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 22px;
}

.welcome-card {
    text-align: center;
}

.welcome-emoji {
    font-size: 3rem;
    animation: floaty 3s ease-in-out infinite;
}

.welcome-greeting {
    font-family: 'Dancing Script', cursive;
    font-size: 2.2rem;
    color: var(--pink-light);
    margin: 6px 0;
}

.welcome-date {
    color: var(--text-dim);
    margin-bottom: 18px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.mini-card {
    background: rgba(255, 77, 157, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.mini-label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.mini-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--pink-light);
}

/* ---------- Countdown ---------- */
.countdown-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.countdown-label {
    color: var(--text-dim);
    font-size: 1.1rem;
}

.countdown-number {
    font-size: 4.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--pink), var(--pink-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.countdown-unit {
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* ---------- Forms ---------- */
.form-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-dim);
    font-weight: 500;
}

input[type="date"],
input[type="number"] {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
    color-scheme: dark;
}

input:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(255, 77, 157, 0.2);
}

.btn {
    background: linear-gradient(90deg, var(--pink), var(--pink-light));
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 12px 26px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    box-shadow: 0 6px 18px rgba(255, 77, 157, 0.4);
}

.btn:hover {
    transform: scale(1.06);
    filter: brightness(1.1);
}

.btn:active {
    transform: scale(0.98);
}

.save-note {
    color: var(--pink-light);
    font-size: 0.85rem;
    min-height: 1em;
}

/* ---------- Relationship ---------- */
.rel-stats-card {
    margin-top: 20px;
}

.rel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.anniv-countdown {
    text-align: center;
    background: rgba(255, 77, 157, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 14px;
}

.anniv-countdown .mini-value {
    font-size: 1.6rem;
}

.celebration {
    text-align: center;
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: var(--pink-light);
    padding: 14px;
    margin-bottom: 16px;
    border-radius: 16px;
    background: rgba(255, 77, 157, 0.15);
    animation: celebrate 1s ease-in-out infinite;
}

.hidden {
    display: none;
}

/* ---------- Phase Cards ---------- */
.phase-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.phase-card {
    background: var(--black-card);
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    padding: 24px 14px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s, border 0.3s;
    backdrop-filter: blur(10px);
}

.phase-card:hover {
    transform: translateY(-6px) scale(1.03);
}

.phase-card.active-phase {
    border: 2px solid var(--pink);
    box-shadow: 0 0 25px rgba(255, 77, 157, 0.55);
    background: rgba(255, 77, 157, 0.12);
}

.phase-icon {
    font-size: 2.4rem;
    margin-bottom: 8px;
}

.phase-name {
    font-weight: 600;
    color: var(--pink-light);
}

/* ---------- Phase Details ---------- */
.phase-detail-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    color: var(--pink-light);
    margin-bottom: 14px;
    text-align: center;
}

.tips-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.tips-list li {
    background: rgba(255, 77, 157, 0.08);
    border-left: 3px solid var(--pink);
    border-radius: 12px;
    padding: 10px 14px;
}

.love-quote {
    text-align: center;
    font-family: 'Dancing Script', cursive;
    font-size: 1.4rem;
    color: var(--pink-soft);
}

/* ---------- Statistics ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.stat-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.stat-emoji {
    font-size: 2rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--pink-light);
}

/* ---------- Mood ---------- */
.mood-card {
    text-align: center;
}

.mood-emoji {
    font-size: 3.5rem;
    animation: floaty 3s ease-in-out infinite;
}

.mood-message {
    font-size: 1.3rem;
    color: var(--pink-soft);
    margin-top: 10px;
    font-family: 'Dancing Script', cursive;
}

/* ---------- Reminders ---------- */
.reminder-list {
    list-style: none;
    display: grid;
    gap: 12px;
}

.reminder-list li {
    background: rgba(255, 77, 157, 0.08);
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------- Love Section ---------- */
.love-section-card {
    text-align: center;
}

.love-quote-big {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: var(--pink-soft);
    margin-bottom: 20px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.love-section-card .btn {
    align-self: center;
    margin: 0 auto;
}

/* ---------- Calendar ---------- */
.legend-card {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    margin-bottom: 20px;
}

.legend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
}

.dot-today { background: #00e5ff; }
.dot-period { background: var(--pink); }
.dot-future { background: #b14d8c; }
.dot-ovulation { background: #8a6bff; }
.dot-anniv { background: #ffd24d; }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.month-card {
    background: var(--black-card);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 16px;
    backdrop-filter: blur(8px);
    transition: transform 0.3s;
}

.month-card:hover {
    transform: translateY(-4px);
}

.month-name {
    text-align: center;
    color: var(--pink-light);
    font-weight: 600;
    margin-bottom: 10px;
}

.month-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.weekday {
    font-size: 0.6rem;
    text-align: center;
    color: var(--text-dim);
    padding: 2px 0;
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    border-radius: 6px;
    color: var(--text);
}

.day-empty {
    background: transparent;
}

.cal-today {
    background: #00e5ff;
    color: #04222a;
    font-weight: 700;
    box-shadow: 0 0 8px #00e5ff;
}

.cal-period { background: var(--pink); color: #fff; }
.cal-future { background: #b14d8c; color: #fff; }
.cal-ovulation { background: #8a6bff; color: #fff; }
.cal-anniv { background: #ffd24d; color: #3a2e00; font-weight: 700; }

/* ---------- Footer ---------- */
.app-footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-dim);
    border-top: 1px solid var(--glass-border);
    font-size: 1rem;
}

/* ---------- Animations ---------- */
.fade-in {
    animation: fadeIn 0.8s ease both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes celebrate {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.85; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    #dashboardSection { grid-template-columns: 1fr; }
    .phase-cards { grid-template-columns: 1fr 1fr; }
    .rel-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .calendar-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
    .app-title { font-size: 1.5rem; }
    .countdown-number { font-size: 3.2rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .calendar-grid { grid-template-columns: 1fr; }
    .phase-cards { grid-template-columns: 1fr 1fr; }
}
