/* Basic Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #0f2027;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

h1 {
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
    margin: 1em 0 0.5em;
}

p {
    font-size: 1.2rem;
    margin-bottom: 1em;
}

/* Scene and Animations */
#scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 9999;
}

.squirrel {
    position: absolute;
    width: 150px;
    animation: float 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.speech-bubble {
    position: absolute;
    background: white;
    color: black;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 10001;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
}

.acorn {
    position: absolute;
    width: 50px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 9998;
}

/* Counter Styles */
#counter {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1.5rem;
    color: white;
    z-index: 100;
}

/* Notification Styles */
.notification {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffcc00;
    color: #1a1a3d;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 4;
    animation: fade-in-out 5s ease-in-out forwards;
}

@keyframes fade-in-out {
    0% {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    10%, 90% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
}

/* Golden Acorn Animations */
@keyframes goldenacorn-appear {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.7;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

@keyframes goldenacorn-shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.goldenAcorn {
    position: absolute;
    width: 50px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 9998;
    animation: goldenacorn-appear 1s ease-out, goldenacorn-shake 1s infinite ease-in-out;
}

.reverseAcorn {
    position: absolute;
    width: 50px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 9998;
    animation: goldenacorn-appear 1s ease-out, goldenacorn-shake 10s infinite ease-in-out;
}

/* Falling Acorn Animation */
@keyframes acorn-fall {
    0% {
        transform: translateY(-100%);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh);
        opacity: 0;
    }
}

.fallingAcorn {
    position: absolute;
    width: 50px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    animation: acorn-fall 4s linear;
    z-index: 9999;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    body {
        flex-direction: column;
        text-align: center;
    }
    h1 {
        font-size: 1.8rem;
    }
    p {
        font-size: 1rem;
    }
    .squirrel {
        width: 100px;
    }
    .speech-bubble {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    p {
        font-size: 0.8rem;
    }
    #cta-button {
        padding: 8px 16px;
        font-size: 0.8em;
    }
}

/* Sidekick Styles */
.sidekick {
    left: -100px;
    top: 50%;
    transform: translateY(-50%);
    transition: left 2s ease-out;
    display: none;
    position: absolute;
    width: 100px;
    height: 100px;
    z-index: 8888;
}

/* Footer Styles */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 5px 0;
    font-size: 0.8em;
    z-index: 15000;
}

/* Footer Link Styles */
.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.footer-links a {
    color: #ffcc00;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
    pointer-events: auto;
}

.footer-links a:hover {
    color: #ffd633;
    text-decoration: underline;
}

.footer-links svg {
    width: 30px;
    height: auto;
    fill: #1DA1F2;
    transition: fill 0.3s ease;
}

.footer-links svg:hover {
    transform: scale(1.2);
}

/* Panel Styles */
#panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: 50%;
    z-index: 25000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#panel.hidden {
    display: none;
}

.panel-content {
    background: rgba(255, 255, 255, 0.8);
    color: #333333;
    max-height: calc(100% - 50px);
    width: 100%;
    padding: 20px;
    overflow-y: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.close-button {
    margin-top: 10px;
    padding: 10px 20px;
    background: rgba(255, 111, 97, 0.8);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s ease;
}

.close-button:hover {
    background: rgba(255, 138, 117, 0.5);
}

/* Ad Container Styles */
#ad-container {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 300px;
    height: 250px;
    z-index: 50000;
    background: rgba(15, 32, 19, 0.5);
}

/* Call to Action Button */
#cta-button {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffcc00;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

#cta-button:hover {
    background-color: #ffd633;
}