/* Clean, Basic Stylesheet with Interactive Falling Animals */

:root {
    --text-color: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #e2e8f0;
    
    /* Solid, basic colors matching screenshot */
    --btn-play-bg: #ffb800; /* Yellow */
    --btn-play-text: #000000;
    --btn-apk-bg: #3bb75e; /* Grass green */
    --btn-apk-text: #ffffff;
    
    --font-primary: 'Nunito', sans-serif;
}

/* Reset and Base Rules */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    font-family: var(--font-primary);
    color: var(--text-color);
    overflow: hidden; /* Not scrollable */
}

/* Base Body settings - transparent since background elements handle images */
body {
    background-color: #070913;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Dual-Layer Background Setup (1 Viewport Height, Non-scrollable)
   ========================================================================== */
   
.bg-blurred {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('background.png'), url('background.jpg'), linear-gradient(180deg, #60c5f7 0%, #aae2ff 100%);
    background-size: cover;
    background-position: center;
    filter: blur(15px);
    transform: scale(1.02); /* Prevents blur artifacts at edges */
    opacity: 0.6;
    z-index: -2;
    pointer-events: none;
}

.bg-unblurred {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100vh;
    background-image: url('background.png'), url('background.jpg'), linear-gradient(180deg, #60c5f7 0%, #aae2ff 100%);
    background-size: auto 100vh; /* Fills exactly 1 viewport height, scaling width proportionally */
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
}

/* ==========================================================================
   Interactive Falling Animals Background
   ========================================================================== */
   
.falling-animals-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0; /* Placed behind main panels but above unblurred background */
}

.falling-animal {
    position: absolute;
    width: 105px;
    height: 105px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    cursor: grab;
    pointer-events: auto;
    touch-action: none;
    user-select: none;
    -webkit-user-drag: none;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
    will-change: top, transform;
}

.falling-animal:active {
    cursor: grabbing;
}

/* Dragging state */
.falling-animal.dragging {
    opacity: 1 !important;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6)) scale(1.15) !important;
    z-index: 1000;
    cursor: grabbing;
}

/* Green merge indicator when hovered over compatible target */
.falling-animal.merge-valid {
    filter: drop-shadow(0 0 10px #10b981) scale(1.1) !important;
}

/* Red indicator when hovered over incompatible target */
.falling-animal.drag-over {
    filter: drop-shadow(0 0 10px #ef4444) scale(1.05) !important;
}

/* Poof animation indicator */
.poof-effect {
    position: fixed;
    width: 126px;
    height: 126px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 999;
    animation: poofAnimation 0.4s ease-out forwards;
}

@keyframes poofAnimation {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.8) rotate(15deg);
        opacity: 0;
    }
}

/* ==========================================================================
   Main Container Layout (Hero Section - first viewport height)
   ========================================================================== */

.main-container {
    height: 100vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6%;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    padding-bottom: 90px; /* space for the footer socials */
    z-index: 1;
    position: relative;
    pointer-events: none; /* Let clicks pass through empty spaces to animals behind */
}

/* Left panel matching screenshot layout */
.left-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 450px;
    pointer-events: auto; /* Re-enable clicks on hero slogan and CTAs */
}

/* Logo image style */
.logo-box {
    margin-bottom: 16px;
}

.logo-image {
    max-width: 220px;
    max-height: 110px;
    display: block;
    object-fit: contain;
}

/* Slogan text styling */
.slogan-text {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    color: #ffffff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.85);
    margin-bottom: 20px;
}

/* Buttons Container */
.cta-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
}

/* Simple, Solid Action Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 800;
    padding: 10px 22px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35);
    transition: transform 0.1s, filter 0.2s;
}

.btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(1px);
}

.btn-play {
    background-color: var(--btn-play-bg);
    color: var(--btn-play-text);
}

.btn-apk {
    background-color: var(--btn-apk-bg);
    color: var(--btn-apk-text);
    gap: 8px;
}

.android-icon {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Right Panel: Video Screen (Taller container scaling proportionally)
   ========================================================================== */

.right-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    pointer-events: auto; /* Re-enable clicks on YouTube frame */
}

.video-container {
    height: 75vh; /* Exactly 75% of viewport height */
    aspect-ratio: 9 / 16; /* Scales width proportionally */
    width: auto;
    border-radius: 16px;
    overflow: hidden;
    background-color: #000000;
    border: 5px solid #1e293b;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ==========================================================================
   Footer Social Links (Absolute bottom of 1vh screen)
   ========================================================================== */

.app-footer {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    padding: 0;
    z-index: 5;
    pointer-events: auto; /* Re-enable clicks on footer social buttons */
}

.social-links-footer {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
    text-decoration: none;
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s, transform 0.1s;
}

.social-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
}

.social-icon {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Responsive Rules
   ========================================================================== */

@media (max-width: 768px) {
    html, body {
        overflow-y: auto; /* Fallback scroll for mobile stacking layout to avoid clipping */
        height: auto;
        min-height: 100vh;
    }

    .main-container {
        flex-direction: column;
        justify-content: center;
        gap: 32px;
        padding-top: 40px;
        height: auto;
        min-height: 100vh;
    }
    
    .left-panel {
        padding-left: 0;
        align-items: center;
        text-align: center;
        max-width: 100%;
    }
    
    .slogan-text {
        text-align: center;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .video-container {
        height: 60vh; /* Scaled slightly down on mobile heights to fit screen */
    }

    .app-footer {
        position: relative;
        bottom: 0;
        left: 0;
        transform: none;
        width: 100%;
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
    }
    
    .social-links-footer {
        flex-direction: row;
        width: 100%;
        justify-content: center;
    }
}

