:root {
    --primary: #ff9a9e;
    --secondary: #fad0c4;
    --accent: #ff8b94;
    --text: #2d3436;
    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--bg-gradient);
    line-height: 1.5;
}

/* Background Elements */
#bg-canvas,
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

#bg-canvas {
    filter: blur(60px);
    opacity: 0.3;
    will-change: transform;
}

.mesh-blob {
    position: absolute;
    width: clamp(300px, 50vw, 600px);
    height: clamp(300px, 50vw, 600px);
    border-radius: 50%;
    background: var(--primary);
    filter: blur(80px);
    animation: float 20s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
    transform: translate3d(0, 0, 0);
}

.mesh-blob:nth-child(2) {
    background: var(--secondary);
    right: -10%;
    top: -10%;
    animation-delay: -5s;
}

.mesh-blob:nth-child(3) {
    background: var(--accent);
    left: -10%;
    bottom: -10%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    33% {
        transform: translate3d(5vw, 10vh, 0) scale(1.1);
    }

    66% {
        transform: translate3d(-2vw, 5vh, 0) scale(0.9);
    }

    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.floating-particle {
    position: absolute;
    pointer-events: none;
    z-index: -2;
    will-change: transform;
}

/* Glassmorphism */
.glass {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

/* Layout */
#app,
#setup-screen {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: clamp(10px, 4vw, 30px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: clamp(20px, 8vh, 60px) 0;
}

.logo {
    font-family: 'Pacifico', cursive;
    font-size: clamp(2.5rem, 8vw, 4rem);
    color: var(--primary);
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.8), 4px 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5em;
    transition: color 0.5s ease;
}

#user-info {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    padding: 8px 20px;
    background: white;
    border-radius: 30px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

/* Week Selector */
#week-selector-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

input[type=range] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type=range]::-webkit-slider-runnable-track {
    height: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 28px;
    width: 28px;
    background: var(--primary);
    border-radius: 50%;
    margin-top: -9px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border: 3px solid white;
    transition: transform 0.2s;
}

.week-labels {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 600;
}

/* Hero Section */
#hero {
    padding: 3rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.baby-container {
    padding: 1.5rem 1rem;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-frame {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s ease;
    animation: floating 6s infinite ease-in-out;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    position: relative;
}

.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 4rem;
    display: none;
    z-index: 10;
    animation: bounceSpin 1.5s infinite ease-in-out;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
    pointer-events: none;
}

@keyframes bounceSpin {
    0% {
        transform: translate(-50%, -50%) rotate(-15deg) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) rotate(15deg) scale(1.4);
    }

    100% {
        transform: translate(-50%, -50%) rotate(-15deg) scale(1);
    }
}

#baby-size-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    border-radius: 20px;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.image-frame:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.size-label h2 {
    margin-top: 1rem;
    font-size: clamp(1.3rem, 4.5vw, 2rem);
    font-weight: 300;
    line-height: 1.3;
}

#fruit-name {
    font-weight: 600;
    color: var(--primary);
}

/* Cards Grid */
#info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    padding: clamp(20px, 4vw, 35px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.card-header h3 {
    font-size: 1.2rem;
    color: var(--primary);
}

.card-header .icon {
    font-size: 1.8rem;
}

/* Medical Grid */
.medical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 1rem;
}

.medical-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.medical-item .label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* Setup Mode */
.setup-card {
    max-width: 450px;
    width: 95%;
    padding: clamp(30px, 8vw, 60px) clamp(20px, 5vw, 40px);
    text-align: center;
}

.setup-card input {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.8);
    margin: 20px 0;
    font-size: 1.1rem;
    transition: border-color 0.3s;
}

.setup-card button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 139, 148, 0.3);
    transition: all 0.3s;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

footer {
    text-align: center;
    padding: 40px 0;
    opacity: 0.5;
}

#reset-due-date {
    background: white;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-left: 10px;
}

#reset-due-date:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background: #f8f9fa;
    /* Very subtle grey instead of primary */
    color: var(--primary);
}

#reset-due-date span {
    font-family: 'Outfit', sans-serif;
}

@media (max-width: 480px) {
    .logo {
        font-size: 2.2rem;
    }

    .card {
        padding: 20px;
    }

    .medical-grid {
        grid-template-columns: 1fr 1fr;
    }
}