@font-face {
    font-family: 'Minecraft';
    src: url('assets/Minecraft.ttf') format('truetype');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Minecraft', monospace;
    background: linear-gradient(135deg, 
        #87CEEB 0%, 
        #98FB98 25%, 
        #FFB6C1 50%, 
        #FFFFE0 75%, 
        #E6E6FA 100%);
    color: #2F4F2F;
    overflow: hidden;
    height: 100vh;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { 
        filter: hue-rotate(0deg) brightness(1) saturate(1);
    }
    25% {
        filter: hue-rotate(10deg) brightness(1.1) saturate(1.2);
    }
    50% {
        filter: hue-rotate(-5deg) brightness(0.9) saturate(1.1);
    }
    75% {
        filter: hue-rotate(15deg) brightness(1.05) saturate(1.3);
    }
}

.container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

/* Spring Background */
.spring-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/stardew valley.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    opacity: 0.6;
    z-index: -2;
    filter: blur(1px) saturate(1.3) hue-rotate(20deg);
}

.spring-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(135, 206, 235, 0.3) 0%, 
        rgba(152, 251, 152, 0.4) 30%, 
        rgba(255, 182, 193, 0.3) 60%, 
        rgba(255, 255, 224, 0.2) 100%);
    z-index: 1;
}

/* Switch View Button */
.switch-view {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.switch-btn {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.1);
}

.switch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    animation: glow 2s ease-in-out infinite alternate;
}

.title {
    font-size: 4rem;
    color: #228B22;
    text-shadow: 
        0 0 10px #98FB98,
        0 0 20px #98FB98,
        2px 2px 0px #006400;
    letter-spacing: 8px;
    margin-bottom: 10px;
    animation: springPulse 2s infinite;
}

.subtitle {
    font-size: 1.2rem;
    color: #FF69B4;
    text-shadow: 0 0 10px #FFB6C1;
    letter-spacing: 3px;
}

@keyframes glow {
    from { text-shadow: 0 0 10px #98FB98, 0 0 20px #98FB98, 2px 2px 0px #006400; }
    to { text-shadow: 0 0 20px #98FB98, 0 0 30px #98FB98, 2px 2px 0px #006400; }
}

@keyframes springPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Avatar Section */
.avatar-section {
    margin-bottom: 40px;
    animation: float 3s ease-in-out infinite;
}

.avatar {
    width: 120px;
    height: 120px;
    border: 3px solid #32CD32;
    border-radius: 50%;
    box-shadow: 
        0 0 20px #98FB98,
        inset 0 0 20px rgba(152, 251, 152, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    image-rendering: pixelated;
}

.avatar:hover {
    transform: scale(1.1);
    box-shadow: 
        0 0 30px #98FB98,
        inset 0 0 30px rgba(152, 251, 152, 0.3);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Arcade Menu */
.arcade-menu {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
    align-items: center;
}

.arcade-button {
    position: relative;
    width: 320px;
    height: 60px;
    background: linear-gradient(45deg, #2a2a2a, #4a4a4a);
    border: 4px solid #00ff00;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    transition: all 0.2s ease;
    overflow: hidden;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 2px 10px rgba(255, 255, 255, 0.1),
        inset 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.arcade-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 255, 0, 0.1) 45%, 
        rgba(0, 255, 0, 0.2) 50%, 
        rgba(0, 255, 0, 0.1) 55%, 
        transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.arcade-button:hover::before {
    transform: translateX(100%);
}

.arcade-button:hover {
    transform: translateY(-3px);
    border-color: #32cd32;
    box-shadow: 
        0 0 30px rgba(50, 205, 50, 0.6),
        inset 0 2px 15px rgba(255, 255, 255, 0.2),
        inset 0 -2px 15px rgba(0, 0, 0, 0.4);
}

.arcade-button:active {
    transform: translateY(-1px);
    border-color: #98fb98;
    box-shadow: 
        0 0 40px rgba(152, 251, 152, 0.8),
        inset 0 2px 20px rgba(255, 255, 255, 0.3);
}

.button-icon {
    font-size: 2rem;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
    animation: iconPulse 2s infinite;
}

.button-text {
    font-size: 1.4rem;
    color: #ffffff;
    font-weight: bold;
    letter-spacing: 3px;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    flex-grow: 1;
    text-align: center;
}

.button-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00ff00, #32cd32, #98fb98, #32cd32, #00ff00);
    border-radius: 12px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: glowRotate 3s linear infinite;
}

.arcade-button:hover .button-glow {
    opacity: 0.6;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes glowRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Music Control */
.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.mute-btn {
    font-family: 'Minecraft', monospace;
    font-size: 1rem;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.8);
    color: #228B22;
    border: 2px solid #228B22;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.mute-btn:hover {
    background: rgba(152, 251, 152, 0.3);
    box-shadow: 0 0 10px #98FB98;
}

.mute-btn.muted {
    color: #DC143C;
    border-color: #DC143C;
}

.mute-btn.muted:hover {
    background: rgba(255, 182, 193, 0.3);
    box-shadow: 0 0 10px #FFB6C1;
}

/* Spring Effects */
.spring-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-petal {
    position: absolute;
    width: 15px;
    height: 15px;
    background: #FFB6C1;
    border-radius: 50% 0 50% 50%;
    opacity: 0.7;
    animation: float-and-fall 8s infinite linear;
}

.petal-1 {
    left: 10%;
    animation-delay: 0s;
    background: #FFB6C1;
    transform: rotate(45deg);
}

.petal-2 {
    left: 20%;
    animation-delay: 1s;
    background: #FFC0CB;
    transform: rotate(90deg);
}

.petal-3 {
    left: 40%;
    animation-delay: 2s;
    background: #98FB98;
    transform: rotate(135deg);
}

.petal-4 {
    left: 60%;
    animation-delay: 3s;
    background: #FFFFE0;
    transform: rotate(180deg);
}

.petal-5 {
    left: 80%;
    animation-delay: 4s;
    background: #E6E6FA;
    transform: rotate(225deg);
}

.petal-6 {
    left: 90%;
    animation-delay: 5s;
    background: #F0E68C;
    transform: rotate(270deg);
}

@keyframes float-and-fall {
    0% {
        top: -20px;
        transform: rotate(0deg) translateX(0px);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    25% {
        transform: rotate(90deg) translateX(20px);
    }
    50% {
        transform: rotate(180deg) translateX(-10px);
    }
    75% {
        transform: rotate(270deg) translateX(15px);
    }
    90% {
        opacity: 0.7;
    }
    100% {
        top: 110vh;
        transform: rotate(360deg) translateX(0px);
        opacity: 0;
    }
}

/* Add floating butterflies */
.spring-effects::after {
    content: '🦋';
    position: absolute;
    font-size: 20px;
    animation: butterfly-float 15s infinite linear;
    left: 5%;
    top: 20%;
}

@keyframes butterfly-float {
    0% {
        left: -5%;
        top: 20%;
        transform: rotate(0deg);
    }
    25% {
        left: 25%;
        top: 60%;
        transform: rotate(90deg);
    }
    50% {
        left: 50%;
        top: 30%;
        transform: rotate(180deg);
    }
    75% {
        left: 75%;
        top: 70%;
        transform: rotate(270deg);
    }
    100% {
        left: 105%;
        top: 40%;
        transform: rotate(360deg);
    }
}

/* Footer */
.footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.footer-text {
    font-size: 1rem;
    color: #228B22;
    animation: springBlink 2s infinite;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

@keyframes springBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }
    
    .arcade-menu {
        gap: 15px;
    }
    
    .arcade-button {
        width: 280px;
        height: 55px;
        padding: 0 15px;
    }
    
    .button-icon {
        font-size: 1.8rem;
    }
    
    .button-text {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }
    
    .avatar {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
        letter-spacing: 2px;
    }
    
    .arcade-button {
        width: 240px;
        height: 50px;
        padding: 0 12px;
    }
    
    .button-icon {
        font-size: 1.5rem;
    }
    
    .button-text {
        font-size: 1rem;
        letter-spacing: 1px;
    }
    
    .music-control {
        top: 10px;
        right: 10px;
    }
    
    .mute-btn {
        font-size: 0.9rem;
        padding: 8px 15px;
    }
}
