/* 1. GLOBAL VARIABLES */
:root {
    --bg-creamy: #fff0f3;
    --soft-pink: #ffccd5;
    --hot-pink: #ff758f;
    --deep-coquette: #594145;
    --accent-pink: #ffb3c1;
    --white-glass: rgba(255, 255, 255, 0.96);
    --shadow-glow: rgba(255, 117, 143, 0.15);
}

/* 2. BASE STYLES */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle, var(--bg-creamy), #ffe5ec);
    color: var(--deep-coquette);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
}

.screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    transition: opacity 0.4s ease-in-out;
}

.hidden { display: none !important; }

/* 3. ANIMATIONS */
#heartContainer {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: -1;
}

.floating-heart {
    position: absolute; bottom: -50px; font-size: 24px; opacity: 0.6;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
    100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* 4. CARDS */
.welcome-card, .glass-card {
    background: var(--white-glass);
    border-radius: 40px;
    padding: 35px;
    width: 100%;
    box-shadow: 0 15px 40px var(--shadow-glow);
    border: 2px solid #ffffff;
    box-sizing: border-box;
    text-align: center;
    backdrop-filter: blur(10px);
}

.aesthetic-title {
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    color: var(--hot-pink);
    margin: 0 0 10px 0;
}

.streak-badge {
    background: var(--soft-pink);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 10px;
}

/* 5. BUTTONS */
.main-btn {
    background-color: var(--soft-pink);
    border: none; color: #ffffff;
    padding: 18px 30px; border-radius: 50px;
    font-weight: 700; margin: 12px 0;
    width: 260px; cursor: pointer;
    box-shadow: 0 8px 0px var(--accent-pink);
    transition: all 0.2s ease;
}

.main-btn:hover { transform: translateY(4px); box-shadow: 0 4px 0px var(--accent-pink); }

.share-btn {
    background: linear-gradient(45deg, #f09433, #bc1888);
    border: none; color: white; padding: 15px;
    border-radius: 50px; width: 240px; cursor: pointer;
}

.pixel-btn, .backup-btn {
    background: white; border: 1px solid var(--soft-pink);
    padding: 8px 15px; border-radius: 15px; font-size: 0.8rem; cursor: pointer;
}

.back-btn {
    background: none; border: none; color: var(--hot-pink);
    font-weight: bold; cursor: pointer; align-self: flex-start;
}

/* 6. COMPONENTS */
.calendar-grid {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 8px; margin: 20px 0; width: 100%;
}

.calendar-day {
    aspect-ratio: 1; display: flex; align-items: center;
    justify-content: center; background: #fff;
    border-radius: 50%; font-size: 0.8rem; cursor: pointer;
    border: 1px solid #fff5f7;
}

.calendar-day.has-data { background: var(--hot-pink); color: white; }

.donut-chart {
    width: 100px; height: 100px; border-radius: 50%;
    position: relative; flex-shrink: 0;
}

.donut-chart::after {
    content: ""; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); width: 70%; height: 70%;
    background: white; border-radius: 50%;
}

#donutText {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 2; font-weight: 800; color: var(--hot-pink);
}

.pixel-grid {
    display: grid; grid-template-columns: repeat(31, 1fr);
    gap: 3px; background: white; padding: 10px; border-radius: 15px;
    overflow-x: auto; margin: 10px 0;
}

.pixel-cell { width: 10px; height: 10px; background: #eee; border-radius: 2px; }

/* RESPONSIVENESS */
@media (max-width: 400px) {
    .aesthetic-title { font-size: 3rem; }
    .main-btn { width: 100%; }
    .glass-card { padding: 20px; border-radius: 25px; }
}
