html {
    height: 100%;
    margin: 0;
}

body {
    height: 100%;
    margin: 0;
    font-family: "Tiny5", monospace, sans-serif;
    /* More terminal-like/retro */

    /* Forest Textured Background (CSS Only) + Theme Image Layer */
    background-color: #05140a;
    background-image:
        radial-gradient(circle at 50% 50%, rgba(18, 59, 30, 0.7) 0%, rgba(5, 20, 10, 0.8) 60%),
        repeating-linear-gradient(45deg, rgba(10, 36, 17, 0.4) 0px, rgba(10, 36, 17, 0.4) 2px, transparent 2px, transparent 8px),
        var(--bg-image, url('https://filedn.com/l4FCPFbVosCQ0DysNslVsqk/LostInTheWoods/image/bg-p.png'));
    /* Fallback to pixel bg */
    background-size: 100% 100%, 20px 20px, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-attachment: fixed;

    color: #e0f0e3;
    /* Soft green-white text */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    /* Prevent scrollbars from full-height flex */
}

.landing-container {
    max-width: 800px;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

/* Styles for text-based landing (legacy support) */
h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

p {
    font-size: 1.2em;
    margin-bottom: 40px;
}

/* Styles for image-based landing */
#welcome-pixel,
#welcome-skeuo {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

/* Hero images container to ensure consistent sizing */
.hero-images-container {
    position: relative;
    width: 500px;
    max-width: 60%;
    margin: 0 auto 5px auto;
}

/* Hero images with consistent sizing to prevent layout shift when switching themes */
#hero-pixel,
#hero-skeuo {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.4));
    transition: opacity 0.3s ease;
    object-fit: contain;
}

/* Position hero-pixel relatively to reserve space, hero-skeuo absolutely to overlap */
#hero-pixel {
    position: relative;
}

#hero-skeuo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

/* When in skeuomorphic mode, swap the positioning */
body.skeuomorphic #hero-pixel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

body.skeuomorphic #hero-skeuo {
    position: relative;
}

#welcome-pixel,
#welcome-skeuo {
    margin-bottom: 10px;
}

/* Default (Pixel Art) state - use visibility so both images contribute to layout */
#hero-pixel {
    visibility: visible;
    opacity: 1;
}

#hero-skeuo {
    visibility: hidden;
    opacity: 0;
}

#welcome-pixel {
    display: block;
}

#welcome-skeuo {
    display: none;
}

/* Skeuomorphic state - use visibility so both images contribute to layout */
body.skeuomorphic #hero-pixel {
    visibility: hidden;
    opacity: 0;
}

body.skeuomorphic #hero-skeuo {
    visibility: visible;
    opacity: 1;
}

body.skeuomorphic #welcome-pixel {
    display: none;
}

body.skeuomorphic #welcome-skeuo {
    display: block;
}

/* Main Button - Pixel Art Style (Default) */
.enter-button {
    display: inline-block;
    padding: 10px;
    background: #333;
    color: #e4e4e4;
    text-decoration: none;
    font-size: 14px;
    font-weight: normal;
    font-family: inherit;
    border: 4px solid #333;
    border-color: #777 #333 #333 #777;
    box-shadow: 0 0 0 2px #000;
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
    text-align: center;
    margin: 0 auto 60px auto;
    width: auto;
    /* Allow auto width for Enter button, but keep styling similar */
    min-width: 150px;
}

.enter-button:hover {
    background: #444;
    border-color: #888 #444 #444 #888;
    transform: none;
    /* remove scale to match home.html behavior exactly if needed, or keep subtle */
}

.enter-button:active {
    background: #333;
    border-color: #333 #777 #777 #333;
    transform: none;
}


/* Theme Switcher - Pixel Art Style (Default) */
.theme-switch-container {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.landing-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 15px;
    pointer-events: none;
    /* Let clicks pass through if not on button */
    z-index: 100;
}

.landing-footer .theme-switch-container {
    position: static;
    margin: 0;
    pointer-events: auto;
}

.theme-btn {
    background: #333;
    border: 4px solid #333;
    border-color: #777 #333 #333 #777;
    box-shadow: 0 0 0 2px #000;
    color: #e4e4e4;
    /* Changed to #e4e4e4 to match style.min.css */
    padding: 8px 16px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    /* Matching .theme-switch button size in style.min.css lines 404 */
    transition: none;
    /* style.min.css has no transition for buttons usually */
}

.theme-btn:hover {
    background: #444;
    border-color: #888 #444 #444 #888;
}

.theme-btn:active {
    background: #333;
    border-color: #333 #777 #777 #333;
}

.theme-btn.active {
    background: linear-gradient(145deg, #35702c, #2b2b2b);
    border-color: #557766 #000e0f #000e0f #557766;
    color: #fff;
    box-shadow: 0 0 0 2px #000;
}

/* Skeuomorphic Overrides used when theme is active */
body.skeuomorphic {
    font-family: 'Inter', sans-serif;
    background-color: #2a2a2a;
    /* background-image: url('https://filedn.com/l4FCPFbVosCQ0DysNslVsqk/LostInTheWoods/image/bg-s.png'); - Handled by var(--bg-image) */
    /* background-blend-mode: overlay; */
    /* background-size: auto; */
    /* background-repeat: repeat; */
    /* background-attachment: fixed; */
    color: #ccc;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, .05), -1px -1px 2px rgba(0, 0, 0, .5);
}

body.skeuomorphic .enter-button {
    background: linear-gradient(145deg, #3a3a3a, #2b2b2b);
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 2px 2px 4px #1a1a1a, -2px -2px 4px #4a4a4a;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, .1), -1px -1px 1px rgba(0, 0, 0, .5);
    color: #ccc;
    text-decoration: none;
    /* Reset pixel button styles */
    letter-spacing: normal;
    text-transform: none;
}

body.skeuomorphic .enter-button:hover {
    background: linear-gradient(145deg, #2b2b2b, #3a3a3a);
    transform: none;
    /* Reset pixel transform */
    color: #fff;
}

body.skeuomorphic .enter-button:active {
    box-shadow: inset 2px 2px 4px #1a1a1a, inset -2px -2px 4px #4a4a4a;
}

body.skeuomorphic .theme-btn {
    border-radius: 8px;
    background: linear-gradient(145deg, #3a3a3a, #2b2b2b);
    box-shadow: 2px 2px 4px #1a1a1a, -2px -2px 4px #4a4a4a;
    border: 1px solid #444;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, .1), -1px -1px 1px rgba(0, 0, 0, .5);
    color: #6da37e;
    /* kept from original but maybe should be ccc? */
    font-family: 'Inter', sans-serif;
}

/* Force Pixel Art button to be white even in Skeuomorphic theme */
body.skeuomorphic #pixel-btn {
    color: #fff !important;
}

body.skeuomorphic .theme-btn:hover {
    background: linear-gradient(145deg, #2b2b2b, #3a3a3a);
    color: #fff;
}

body.skeuomorphic .theme-btn:active {
    box-shadow: inset 2px 2px 4px #1a1a1a, inset -2px -2px 4px #4a4a4a;
}

body.skeuomorphic .theme-btn.active {
    background: linear-gradient(145deg, #35702c, #2b2b2b);
    border-color: #000e0f;
    box-shadow: 0 0 10px rgba(0, 14, 15, .5);
    color: #fff;
}

/* Responsive adjustments for smaller devices */
@media (max-width: 768px) {
    .landing-container {
        padding: 15px;
    }

    .hero-images-container {
        width: 70%;
        max-width: 400px;
        margin-bottom: 15px;
    }

    #welcome-pixel,
    #welcome-skeuo {
        margin-bottom: 15px;
    }

    .enter-button {
        margin-bottom: 20px;
    }

    .landing-footer {
        padding: 15px 10px;
    }
}

@media (max-width: 480px) {
    .landing-container {
        padding: 10px;
    }

    .hero-images-container {
        width: 80%;
        max-width: 300px;
        margin-bottom: 10px;
    }

    #welcome-pixel,
    #welcome-skeuo {
        margin-bottom: 10px;
    }

    .enter-button {
        margin-bottom: 15px;
    }
}