/* ===================================
   HOME PAGE - PET DISPLAY
   =================================== */

/* Star and snowflake backgrounds */
.star-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.1;
    }
    50% {
        opacity: 1;
    }
}

/* Snowflakes - static like stars but bigger */
.snowflake {
    position: absolute;
    font-size: 1.2rem;
    opacity: 0.8;
    pointer-events: none;
    z-index: 0;
}

/* Falling snowflakes animation */
.falling-snowflake {
    position: absolute;
    pointer-events: none;
    animation-name: falling-snow;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-duration: var(--duration, 10s);
    animation-delay: var(--delay, 0s);
}

/* Scattered snowflakes for desktop */
.scattered-snowflake {
    position: absolute;
    pointer-events: none;
}

@keyframes falling-snow {
    from {
        transform: translateY(0) translateX(0);
        opacity: 0.8;
    }
    to {
        transform: translateY(110vh) translateX(var(--drift, 0));
        opacity: 0;
    }
}

.home-page {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-large);
}

.pet-container {
    display: flex;
    gap: var(--spacing-large);
    align-items: flex-start;
}

.pet-display {
    flex: 2;
    background-color: var(--background-white);
    border: 2px solid var(--border-purple);
    border-radius: 15px;
    padding: var(--spacing-large);
    min-height: 400px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Weather-based backgrounds */
.pet-display.sunny {
    background: linear-gradient(to bottom, #FFE5B4, #FFEFC1);
}

.pet-display.rainy {
    background: linear-gradient(to bottom, #B0E0E6, #D4E8F0);
}

.pet-display.cloudy {
    background: linear-gradient(to bottom, #D3D3D3, #E8E8E8);
}

/* Weather effects container */
.weather-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Raindrops */
.rainy .weather-effects::before,
.rainy .weather-effects::after {
    content: '💧';
    position: absolute;
    font-size: 2rem;
    animation: rain 3s linear infinite;
}

/* Speech Bubble */
.speech-bubble {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: white;
    border: 2px solid #000;
    border-radius: 15px;
    padding: var(--spacing-medium);
    max-width: 200px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 3;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 20px solid white;
}

.speech-bubble p {
    margin: 0;
    font-size: 0.9rem;
    color: #000000;
}

/* Pet Info Section */
.pet-info {
    flex: 1;
    background-color: var(--background-white);
    border: 2px solid var(--border-purple);
    border-radius: 15px;
    padding: var(--spacing-large);
}

.pet-info h2 {
    margin-bottom: var(--spacing-medium);
}

.pet-info p {
    margin-bottom: var(--spacing-small);
    font-size: 1.1rem;
}

.pet-info span {
    font-weight: bold;
}

/* ===================================
   RESPONSIVE DESIGN - MOBILE
   =================================== */

@media (max-width: 768px) {
    /* Pet container switches from row to column layout */
    .pet-container {
        flex-direction: column;
    }
    
    .pet-display {
        min-height: 300px;
    }
    
    /* Speech bubble adjustments */
    .speech-bubble {
        position: static;
        margin-top: var(--spacing-medium);
        max-width: 100%;
    }
    
    .speech-bubble::after {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pet-display,
    .pet-info {
        border-width: 3px;
    }
}
