* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff6b9d;
    --primary-dark: #e55a8a;
    --secondary: #c44569;
    --bg: #fef6f9;
    --text: #4a4a4a;
    --happy: #4ade80;
    --full: #60a5fa;
    --warning: #fbbf24;
    --danger: #f87171;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #fef6f9 0%, #fff0f5 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--text);
}

.container {
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(255, 107, 157, 0.2);
    padding: 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

header h1 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 5px;
}

.subtitle {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Evolution Progress */
.evolution-section {
    margin-bottom: 15px;
}

.evolution-label {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 8px;
}

.evolution-stage {
    font-weight: bold;
    color: var(--primary);
}

.evolution-track {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    margin-bottom: 25px;
}

.evolution-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #eee;
    border: 2px solid #ddd;
    position: relative;
    transition: all 0.3s ease;
}

.evolution-dot.active {
    background: var(--primary);
    border-color: var(--primary-dark);
    box-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
}

.evolution-dot.completed {
    background: var(--happy);
    border-color: #22c55e;
}

.evolution-dot::after {
    content: attr(data-stage);
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: #999;
    white-space: nowrap;
}

.evolution-line {
    flex: 1;
    height: 3px;
    background: #eee;
    margin: 0 5px;
}

.evolution-line.completed {
    background: var(--happy);
}

.daily-checkins {
    font-size: 0.8rem;
    color: #888;
    margin-top: 5px;
}

.daily-checkins span {
    font-weight: bold;
    color: var(--primary);
}

/* Pet Container */
.pet-container {
    position: relative;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.pet {
    position: relative;
    animation: bounce 2s ease-in-out infinite;
    transition: transform 0.5s ease;
}

.pet.happy {
    animation: bounce 1s ease-in-out infinite, wiggle 0.3s ease-in-out;
}

.pet.sad {
    animation: none;
}

.pet.eating {
    animation: eat 0.5s ease-in-out;
}

.pet.evolving {
    animation: evolve 1s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

@keyframes eat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes evolve {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.3); filter: brightness(2); }
    100% { transform: scale(1); filter: brightness(1); }
}

@keyframes wobble {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Base Pet Body */
.pet-body {
    position: relative;
    transition: all 0.5s ease;
}

/* ===== EGG STAGE ===== */
.pet.stage-egg .pet-body {
    width: 60px;
    height: 80px;
    background: linear-gradient(145deg, #fff 0%, #f0f0f0 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow:
        inset -3px -3px 10px rgba(0,0,0,0.1),
        inset 3px 3px 10px rgba(255,255,255,0.8);
    animation: wobble 2s ease-in-out infinite;
}

.pet.stage-egg .pet-body::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 25px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 107, 157, 0.3) 20%,
        rgba(255, 107, 157, 0.3) 40%,
        transparent 50%,
        rgba(160, 200, 255, 0.3) 60%,
        rgba(160, 200, 255, 0.3) 80%,
        transparent 100%
    );
    border-radius: 50%;
}

.pet.stage-egg .eyes,
.pet.stage-egg .mouth,
.pet.stage-egg .blush,
.pet.stage-egg .accessory {
    display: none;
}

/* ===== BABY STAGE ===== */
.pet.stage-baby .pet-body {
    width: 70px;
    height: 70px;
    background: linear-gradient(145deg, #ffb6c1 0%, #ff69b4 100%);
    border-radius: 50%;
}

.pet.stage-baby .eyes {
    gap: 15px;
    padding-top: 22px;
}

.pet.stage-baby .eye {
    width: 12px;
    height: 14px;
}

.pet.stage-baby .eye::after {
    width: 4px;
    height: 4px;
    top: 3px;
    left: 3px;
}

.pet.stage-baby .mouth {
    width: 12px;
    height: 6px;
    margin-top: 8px;
}

.pet.stage-baby .blush {
    width: 10px;
    height: 5px;
    top: 38px;
}

.pet.stage-baby .blush.left { left: 5px; }
.pet.stage-baby .blush.right { right: 5px; }

/* ===== CHILD STAGE ===== */
.pet.stage-child .pet-body {
    width: 90px;
    height: 90px;
    background: linear-gradient(145deg, #ffb6c1 0%, #ff69b4 100%);
    border-radius: 50% 50% 45% 45%;
}

.pet.stage-child .eyes {
    gap: 20px;
    padding-top: 28px;
}

.pet.stage-child .eye {
    width: 14px;
    height: 18px;
}

.pet.stage-child .eye::after {
    width: 5px;
    height: 5px;
}

.pet.stage-child .mouth {
    width: 16px;
    height: 8px;
    margin-top: 12px;
}

.pet.stage-child .blush {
    width: 12px;
    height: 6px;
    top: 48px;
}

.pet.stage-child .blush.left { left: 8px; }
.pet.stage-child .blush.right { right: 8px; }

/* ===== TEEN STAGE ===== */
.pet.stage-teen .pet-body {
    width: 105px;
    height: 105px;
    background: linear-gradient(145deg, #ffb6c1 0%, #ff69b4 100%);
    border-radius: 50% 50% 45% 45%;
}

.pet.stage-teen .eyes {
    gap: 22px;
    padding-top: 32px;
}

.pet.stage-teen .eye {
    width: 16px;
    height: 20px;
}

.pet.stage-teen .mouth {
    width: 18px;
    height: 9px;
    margin-top: 14px;
}

.pet.stage-teen .blush {
    top: 55px;
}

.pet.stage-teen .blush.left { left: 10px; }
.pet.stage-teen .blush.right { right: 10px; }

/* ===== ADULT STAGE ===== */
.pet.stage-adult .pet-body {
    width: 120px;
    height: 120px;
    background: linear-gradient(145deg, #ffb6c1 0%, #ff69b4 100%);
    border-radius: 50% 50% 45% 45%;
    box-shadow:
        inset -5px -5px 15px rgba(0,0,0,0.1),
        inset 5px 5px 15px rgba(255,255,255,0.3);
}

.pet.stage-adult .eyes {
    gap: 25px;
    padding-top: 35px;
}

.pet.stage-adult .eye {
    width: 18px;
    height: 22px;
}

.pet.stage-adult .mouth {
    width: 20px;
    height: 10px;
    margin-top: 15px;
}

.pet.stage-adult .blush {
    top: 60px;
}

.pet.stage-adult .blush.left { left: 10px; }
.pet.stage-adult .blush.right { right: 10px; }

/* ===== COLOR VARIANTS ===== */
.pet.color-pink .pet-body {
    background: linear-gradient(145deg, #ffb6c1 0%, #ff69b4 100%);
}

.pet.color-blue .pet-body {
    background: linear-gradient(145deg, #a0d2ff 0%, #60a5fa 100%);
}

.pet.color-green .pet-body {
    background: linear-gradient(145deg, #a7f3d0 0%, #34d399 100%);
}

.pet.color-purple .pet-body {
    background: linear-gradient(145deg, #ddd6fe 0%, #a78bfa 100%);
}

.pet.color-orange .pet-body {
    background: linear-gradient(145deg, #fed7aa 0%, #fb923c 100%);
}

.pet.color-yellow .pet-body {
    background: linear-gradient(145deg, #fef08a 0%, #facc15 100%);
}

/* ===== ACCESSORIES ===== */
.accessory {
    position: absolute;
    pointer-events: none;
}

/* Horns */
.pet.has-horns .pet-body::before,
.pet.has-horns .pet-body::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 20px solid #ff69b4;
    top: -15px;
}

.pet.has-horns .pet-body::before {
    left: 15px;
    transform: rotate(-15deg);
}

.pet.has-horns .pet-body::after {
    right: 15px;
    transform: rotate(15deg);
}

.pet.has-horns.color-blue .pet-body::before,
.pet.has-horns.color-blue .pet-body::after {
    border-bottom-color: #60a5fa;
}

.pet.has-horns.color-green .pet-body::before,
.pet.has-horns.color-green .pet-body::after {
    border-bottom-color: #34d399;
}

.pet.has-horns.color-purple .pet-body::before,
.pet.has-horns.color-purple .pet-body::after {
    border-bottom-color: #a78bfa;
}

.pet.has-horns.color-orange .pet-body::before,
.pet.has-horns.color-orange .pet-body::after {
    border-bottom-color: #fb923c;
}

.pet.has-horns.color-yellow .pet-body::before,
.pet.has-horns.color-yellow .pet-body::after {
    border-bottom-color: #facc15;
}

/* Wings */
.wing {
    position: absolute;
    width: 30px;
    height: 45px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50% 50% 50% 50% / 80% 80% 20% 20%;
    top: 20px;
    animation: flutter 0.5s ease-in-out infinite alternate;
}

.wing.left {
    left: -25px;
    transform: rotate(-20deg);
}

.wing.right {
    right: -25px;
    transform: rotate(20deg);
    animation-delay: 0.25s;
}

@keyframes flutter {
    0% { transform: rotate(-20deg) scaleX(1); }
    100% { transform: rotate(-30deg) scaleX(0.9); }
}

.wing.right {
    animation-name: flutter-right;
}

@keyframes flutter-right {
    0% { transform: rotate(20deg) scaleX(1); }
    100% { transform: rotate(30deg) scaleX(0.9); }
}

/* Crown */
.crown {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 25px;
    background: linear-gradient(145deg, #ffd700 0%, #ffaa00 100%);
    clip-path: polygon(0% 100%, 15% 40%, 30% 100%, 50% 20%, 70% 100%, 85% 40%, 100% 100%);
}

/* Bow */
.bow {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 25px;
    height: 20px;
}

.bow::before,
.bow::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 12px;
    background: #ff4081;
    border-radius: 50% 50% 50% 50%;
}

.bow::before {
    top: 0;
    left: 0;
    transform: rotate(-30deg);
}

.bow::after {
    top: 0;
    right: 0;
    transform: rotate(30deg);
}

/* Halo */
.halo {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 15px;
    border: 4px solid #ffd700;
    border-radius: 50%;
    background: transparent;
    animation: halo-glow 2s ease-in-out infinite;
}

@keyframes halo-glow {
    0%, 100% { box-shadow: 0 0 5px #ffd700; }
    50% { box-shadow: 0 0 15px #ffd700; }
}

/* Spots */
.pet.has-spots .pet-body {
    overflow: hidden;
}

.spots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.spot {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
}

.spot:nth-child(1) { width: 15px; height: 15px; top: 20%; left: 15%; }
.spot:nth-child(2) { width: 10px; height: 10px; top: 60%; left: 25%; }
.spot:nth-child(3) { width: 12px; height: 12px; top: 35%; right: 20%; }

/* Star sparkles */
.sparkles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    font-size: 12px;
    animation: sparkle 1.5s ease-in-out infinite;
}

.sparkle:nth-child(1) { top: -10px; left: 10px; animation-delay: 0s; }
.sparkle:nth-child(2) { top: 20px; right: -15px; animation-delay: 0.5s; }
.sparkle:nth-child(3) { bottom: 10px; left: -10px; animation-delay: 1s; }

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1); }
}

/* Eyes base styles */
.eyes {
    display: flex;
    justify-content: center;
    gap: 25px;
    padding-top: 35px;
}

.eye {
    width: 18px;
    height: 22px;
    background: #333;
    border-radius: 50%;
    position: relative;
    animation: blink 4s infinite;
}

.eye::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    top: 4px;
    left: 4px;
}

.pet.sad .eye {
    height: 4px;
    border-radius: 0 0 50% 50%;
    margin-top: 10px;
}

.pet.happy .eye {
    height: 4px;
    border-radius: 50% 50% 0 0;
    margin-top: 10px;
}

@keyframes blink {
    0%, 96%, 100% { transform: scaleY(1); }
    98% { transform: scaleY(0.1); }
}

.mouth {
    width: 20px;
    height: 10px;
    border: 3px solid #333;
    border-top: none;
    border-radius: 0 0 20px 20px;
    margin: 15px auto 0;
}

.pet.sad .mouth {
    border: 3px solid #333;
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    margin-top: 20px;
}

.pet.happy .mouth {
    width: 30px;
    height: 15px;
}

.blush {
    width: 15px;
    height: 8px;
    background: rgba(255, 100, 100, 0.4);
    border-radius: 50%;
    position: absolute;
    top: 60px;
}

.blush.left { left: 10px; }
.blush.right { right: 10px; }

.pet-shadow {
    width: 80px;
    height: 15px;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
    margin: 10px auto 0;
    animation: shadow-bounce 2s ease-in-out infinite;
    transition: width 0.5s ease;
}

.pet.stage-egg .pet-shadow { width: 50px; }
.pet.stage-baby .pet-shadow { width: 55px; }
.pet.stage-child .pet-shadow { width: 65px; }
.pet.stage-teen .pet-shadow { width: 75px; }
.pet.stage-adult .pet-shadow { width: 85px; }

@keyframes shadow-bounce {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(0.8); opacity: 0.2; }
}

/* Speech Bubble */
.speech-bubble {
    position: absolute;
    top: 10px;
    right: -20px;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 15px;
    padding: 10px 15px;
    max-width: 150px;
    font-size: 0.85rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    z-index: 10;
}

.speech-bubble.show {
    opacity: 1;
    transform: scale(1);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    border: 10px solid transparent;
    border-top-color: var(--primary);
    border-bottom: none;
}

/* Stats */
.stats {
    margin-bottom: 20px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.stat label {
    width: 80px;
    text-align: left;
    font-size: 0.85rem;
    color: #666;
}

.stat-bar {
    flex: 1;
    height: 12px;
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease, background-color 0.3s ease;
}

.stat-fill.happiness {
    background: linear-gradient(90deg, var(--happy) 0%, #22c55e 100%);
}

.stat-fill.fullness {
    background: linear-gradient(90deg, var(--full) 0%, #3b82f6 100%);
}

.stat-fill.low {
    background: linear-gradient(90deg, var(--danger) 0%, #ef4444 100%);
}

.stat-fill.medium {
    background: linear-gradient(90deg, var(--warning) 0%, #f59e0b 100%);
}

.stat-value {
    width: 40px;
    font-size: 0.8rem;
    color: #888;
}

/* Timer */
.timer-section {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.timer-label {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
}

.timer {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.timer.urgent {
    color: var(--danger);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Actions */
.actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.action-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.action-btn:not(:disabled):active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.5rem;
}

.feed-btn {
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.feed-btn:not(:disabled) {
    animation: glow 2s infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 107, 157, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 107, 157, 0.8); }
}

.pet-btn {
    background: linear-gradient(145deg, #a78bfa 0%, #8b5cf6 100%);
    color: white;
}

/* Notification Prompt */
.notification-prompt {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    display: none;
}

.notification-prompt.show {
    display: block;
}

.notification-prompt p {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #856404;
}

.notification-prompt button {
    background: #ffc107;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.notification-prompt button:hover {
    background: #e0a800;
}

/* Footer */
footer {
    border-top: 1px solid #eee;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.streak {
    font-size: 0.9rem;
    color: #888;
}

.streak span {
    font-weight: bold;
    color: var(--primary);
}

.reset-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-btn:hover {
    border-color: var(--danger);
    color: var(--danger);
}

/* Responsive */
@media (max-width: 420px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .actions {
        flex-direction: column;
    }

    .evolution-dot::after {
        font-size: 0.55rem;
    }
}
