﻿/* Import the pixel font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

html, body {
    overflow-x: hidden;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Press Start 2P', cursive;
    color: #FFF;
    text-align: center;
    background-image: url('images/background.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center bottom;
    min-height: 100vh;
    box-sizing: border-box;
    /* --- NEW FLEXBOX RULES --- */
    display: flex;
    flex-direction: column;
}

img {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

h1, h2 {
    text-shadow: 4px 4px #000;
    letter-spacing: 2px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* MODIFIED: Was 'center' */
    padding: 20px;
    position: relative;
    z-index: 800; /* Ensure nav is high */
}

    .top-nav h1 {
        position: absolute;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }

/* === MODIFIED: Top-Left Container (KEEPS THE BOX) === */
.nav-links-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    z-index: 801;
    /* --- COHESION BOX --- */
    background-color: #444;
    border-style: outset;
    border-width: 4px;
    border-color: #888 #333 #333 #888;
    padding: 10px;
}

/* === MODIFIED: Top-Right Container (BOX REMOVED) === */
.nav-links {
    display: flex;
    flex-direction: row; /* Make buttons horizontal */
    align-items: center; /* Vertically center buttons and settings icon */
    gap: 15px;
    z-index: 801;
}

/* --- NEW: Style for Gallery Link (to position the "!") --- */
.top-nav .nav-links a[href="gallery.html"],
.mobile-nav-centered a[href="gallery.html"] {
    position: relative; /* Allows the "!" to be positioned inside it */
}

/* --- NEW: Style for the notification "!" icon --- */
.nav-notify-icon {
    position: absolute;
    top: -5px;
    right: -5px;
    color: #FF3333; /* Bright RED */
    text-shadow: 2px 2px #000;
    font-weight: bold;
    font-size: 20px;
    display: inline-block;
    animation: pulse-red 1.2s infinite;
    pointer-events: none; /* So it doesn't block clicks */
}

/* Keyframes for pulsing (copied from gallery.css) */
@keyframes pulse-red {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}
/* --- END NOTIFICATION STYLES --- */


/* Base settings button style */
#settings-btn {
    width: 48px;
    height: 48px;
    cursor: pointer;
    transition: transform 0.4s ease-in-out;
    z-index: 900;
}

    #settings-btn.is-rotated {
        transform: rotate(180deg);
    }

.mobile-nav-centered {
    display: none;
}

#show-bounty-btn-mobile {
    display: none;
}

#game-area {
    background-color: transparent;
    width: 100%;
    height: 100px;
    position: absolute;
    top: 55vh;
    left: 0;
    overflow: hidden;
    z-index: 10;
}

.marching-duck {
    position: absolute;
    width: 250px;
    cursor: pointer;
    /* z-index is set dynamically in script.js (100) */
}

#my-duck-area {
    margin-top: calc(51.58vh - 120px); /* This is our fix from last time */
    position: relative;
    z-index: 500; /* Duck display container should be high */
}

#my-duck-display {
    width: 400px;
    height: 300px;
    border: none;
    margin: auto;
    position: relative;
    background-color: transparent;
}

#duck-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

    #duck-image-container.is-flipped {
        transform: scaleX(-1);
    }

    #duck-image-container.is-flipped-vertical {
    transform: scaleY(-1);
}

.base-duck-image, .accessory-image {
    position: absolute;
    top: 0;
    /* Desktop styles */
    width: 300px;
    left: 50px;
    /* z-index is set dynamically in script.js (0-80) */
}

/* === MODIFIED: Renamed to #duck-name-display === */
#duck-name-display {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    margin: 0;
    z-index: 10;
    user-select: none; /* NEW: Prevent text selection */
}

/* === NEW: Styles for the main page name input === */
/* === NEW: Styles for the main page name input === */
#duck-name-input-main {
    /* Copy styles from h2 */
    font-family: 'Press Start 2P', cursive;
    text-shadow: 4px 4px #000;
    letter-spacing: 2px;
    font-size: 1.5em; /* Matches h2 */
    /* Copy styles from other inputs */
    background-color: transparent;
    border: none;
    outline: none;
    color: #FFF; /* <--- ADD THIS LINE */
    text-align: center;
    /* Positioning */
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%; /* Make it wide */
    z-index: 10; /* Above duck */
}

button, .nav-button {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px; /* <-- THIS IS THE FIX */
    background-color: #555;
    color: #FFF;
    border-style: outset;
    border-width: 4px;
    border-color: #888 #333 #333 #888;
    padding: 10px 15px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    z-index: 900; /* Ensure all buttons are clickable */
}

    button:active, .nav-button:active {
        border-style: inset;
        border-color: #333 #888 #888 #333;
    }

    /* === NEW: Custom disabled style === */
    button.is-disabled, .nav-button.is-disabled {
        background-color: #333; /* Darker grey */
        color: #888; /* Lighter grey text */
        border-style: outset; /* Keep the outset style */
        border-color: #555 #222 #222 #555; /* Darker grey border */
    }

        button.is-disabled:active, .nav-button.is-disabled:active {
            border-style: outset; /* Don't "press" */
            border-color: #555 #222 #222 #555; /* Don't change border */
        }


/* --- NEW: Coin Display Styles --- */
#coin-display {
    display: flex;
    align-items: center;
    gap: 8px; /* Space between coin and number */
    padding-left: 10px;
    padding-right: 10px;
    background-color: #333; /* Darker, non-interactive look */
    border-color: #555 #222 #222 #555;
    cursor: default; /* Not a button */
}

    #coin-display img {
        width: 24px;
        height: 24px;
    }

    /* Override the :active state it inherits from .nav-button */
    #coin-display:active {
        border-style: outset;
        border-color: #555 #222 #222 #555;
    }
/* --- END: Coin Display Styles --- */


/* --- NEW: Container for Duck Buttons --- */
#duck-controls {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    display: flex; /* Arrange buttons side-by-side */
    gap: 15px; /* Space between them */
    align-items: flex-start; /* Align tops of buttons */
}

/* --- MODIFIED: Removed absolute positioning --- */
#save-to-pond-btn {
    position: relative; /* WAS: absolute */
    bottom: auto; /* WAS: 10px */
    left: auto; /* WAS: 50% */
    transform: none; /* WAS: translateX(-50%) */
    z-index: auto; /* WAS: 900 */
}

/* --- NEW: Style for Sell Button --- */
#sell-duck-btn {
    background-color: #008000; /* Green */
    border-color: #00CC00 #004D00 #004D00 #00CC00;
}

    #sell-duck-btn:active {
        border-color: #004D00 #00CC00 #00CC00 #004D00;
    }
/* --- END: Button Styles --- */

/* === NEW: Wrapper for Sell Button + Value === */
.sell-control {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#sell-value-display {
    font-size: 12px;
    color: #ffd700;
    text-shadow: 2px 2px #000;
    margin-top: 5px; /* Space from button */
    /* Add height so it doesn't jump layout */
    height: 12px;
}


/* --- body.mobile-view block removed --- */


.hidden {
    display: none !important;
}

/* --- REMOVED THE VISIBLE STYLE FOR #content-description --- */


/* Styles for Welcome Popup */
#welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000; /* Ensure popups are highest */
}

#welcome-menu {
    background-color: #444;
    padding: 30px;
    border: 4px double #FFF;
    width: 90%;
    max-width: 600px;
    text-align: center;
}

    #welcome-menu h3 {
        text-shadow: 3px 3px #000;
        margin-top: 0;
    }

    #welcome-menu p {
        font-size: 14px;
        line-height: 1.6;
        margin: 15px 0;
    }

#close-welcome-btn {
    margin-top: 20px;
}
/* END: Styles for Welcome Popup */

#settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* CHANGED: Was center */
    padding-top: 20px;       /* ADDED: Push it down slightly from the very top */
    z-index: 1000; 
}

#settings-menu {
    background-color: #444;
    padding: 20px;
    border: 4px double #FFF;
    width: 450px;
    text-align: center;
    position: relative;
    z-index: 1001;
}

    #settings-menu h3, #settings-menu h4 {
        text-shadow: 2px 2px #000;
    }

#close-settings-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 0 8px;
    font-size: 20px;
}

#reset-section p {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 20px;
}

#reset-section button {
    margin: 5px;
}

#reset-game-btn {
    background-color: #990000;
    border-color: #CC0000 #660000 #660000 #CC0000;
}

    #reset-game-btn:active {
        border-color: #660000 #CC0000 #CC0000 #660000;
    }

#settings-main-view {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.settings-menu-button {
    width: 100%;
    padding: 10px 15px; /* <-- ADDED */
    box-sizing: border-box; /* <-- ADDED (THE FIX) */
}

/* --- NEW: Style for Blog link in settings --- */
#settings-main-view a.settings-menu-button[href="privacy.html"],
#settings-main-view a.settings-menu-button[href="terms.html"],
#settings-main-view a.settings-menu-button[href="blog.html"] {
    color: #1E90FF; /* Bright blue color (Dodger Blue) */
}

    /* Optional: Add a hover effect */
    #settings-main-view a.settings-menu-button[href="privacy.html"]:hover,
    #settings-main-view a.settings-menu-button[href="terms.html"]:hover,
    #settings-main-view a.settings-menu-button[href="blog.html"]:hover {
        color: #87CEFA; /* Lighter blue on hover (Light Sky Blue) */
    }

    /* Optional: Keep the active (pressed) style consistent */
    #settings-main-view a.settings-menu-button[href="privacy.html"]:active,
    #settings-main-view a.settings-menu-button[href="terms.html"]:active,
    #settings-main-view a.settings-menu-button[href="blog.html"]:active {
        color: #FFF; /* Match the regular button active color */
        border-style: inset;
        border-color: #333 #888 #888 #333;
    }
    /* --- END: Style for Privacy Policy link --- */

    /* Optional: Add a hover effect */
    #settings-main-view a.settings-menu-button[href="privacy.html"]:hover {
        color: #87CEFA; /* Lighter blue on hover (Light Sky Blue) */
    }

    /* Optional: Keep the active (pressed) style consistent */
    #settings-main-view a.settings-menu-button[href="privacy.html"]:active {
        color: #FFF; /* Match the regular button active color */
        border-style: inset;
        border-color: #333 #888 #888 #333;
    }
/* --- END: Style for Privacy Policy link --- */


/* --- MODIFIED: REMOVED #upgrades-section --- */
#how-to-play-section, #about-section {
    text-align: left;
    font-size: 11px;
    line-height: 1.6;
}

    /* --- MODIFIED: REMOVED #upgrades-section --- */
    #how-to-play-section h4, #about-section h4 {
        text-align: center;
    }

    #how-to-play-section ul {
        list-style-type: '▸ ';
        padding-left: 20px;
        margin-bottom: 20px;
    }

    /* --- NEW: Style for about section paragraph --- */
    #about-section p {
        margin-bottom: 15px;
    }


/* NEW: Styles for the Contact section */
#contact-section {
    text-align: center;
    font-size: 12px;
    line-height: 1.6;
}

    #contact-section h4 {
        text-align: center;
    }

    #contact-section p {
        margin-bottom: 20px;
    }

.settings-back-btn {
    display: block;
    margin: 20px auto 0;
}

#settings-menu hr {
    border: none;
    border-top: 2px solid #FFF;
    margin: 20px 0;
}

#password-section {
    display: flex;
    justify-content: center;
    gap: 10px;
}

input[type="password"], input[type="number"] {
    font-family: 'Press Start 2P', cursive;
    background-color: #222;
    color: #FFF;
    border-style: inset;
    border-width: 4px;
    border-color: #333 #888 #888 #333;
    padding: 8px;
    text-align: center;
}

#dev-settings-section h4 {
    text-shadow: 2px 2px #000;
    margin-top: 0;
}

.dev-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 12px;
}

    .dev-control button {
        font-size: 10px;
        padding: 8px;
    }

    .dev-control span {
        font-weight: bold;
    }

    .dev-control input {
        width: 80px;
    }

#dev-mode-trigger {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 9999;
}

@keyframes pan-off-right {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(200%);
    }
}

/* --- pan-off-left-flipped REMOVED --- */

@keyframes pan-on-left {
    from {
        transform: translateX(-200%);
    }

    to {
        transform: translateX(0);
    }
}

#duck-image-container.is-leaving {
    animation: pan-off-right 0.6s ease-in forwards;
}

/* --- .is-ponding REMOVED --- */

#duck-image-container.is-entering {
    animation: pan-on-left 0.6s ease-out;
}

/* --- MOBILE STYLES (Native) --- */
/* --- @media (max-width: 600px) block removed --- */


/* --- DEV MOBILE VIEW STYLES (Dev Setting Only) --- */
/* This block explicitly targets ONLY the dev setting toggle */
/* --- THIS BLOCK WAS DUPLICATED AND HAS BEEN REMOVED --- */


/* --- NEW: STYLES FOR COOKIE CONSENT BANNER --- */
/* --- NEW: STYLES FOR COOKIE CONSENT BANNER --- */
#cookie-consent-banner {
    position: fixed;
    bottom: 20px; /* Moved up from bottom */
    left: 20px; /* Moved in from left */
    width: auto; /* Changed from 100% */
    max-width: 450px; /* Added max width */
    background-color: rgba(0, 0, 0, 0.9);
    border: 4px double #FFF; /* Changed from border-top */
    border-radius: 5px; /* Added for corner style */
    padding: 20px;
    z-index: 3000; /* Highest z-index */
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: flex-start; /* Align to the left */
    box-sizing: border-box; /* Include padding in width */
}

    #cookie-consent-banner p {
        font-size: 12px;
        line-height: 1.5;
        margin: 0;
        margin-bottom: 15px; /* Changed from margin-right */
    }

    /* --- ADD THIS NEW RULE --- */
    #cookie-consent-banner #cookie-consent-accept-btn {
        align-self: center; /* Centers the button in the flex column */
    }
    /* --- END NEW RULE --- */
    /* --- END: STYLES FOR COOKIE CONSENT BANNER --- */
    /* --- END: STYLES FOR COOKIE CONSENT BANNER --- */

    #cookie-consent-banner a {
        color: #3399FF;
        text-decoration: underline;
    }
/* --- END: STYLES FOR COOKIE CONSENT BANNER --- */


/* --- STYLES FOR PACK SHOP POPUP --- */

/* The main "Duck Packs" button in the nav */
#show-packs-btn {
    background-color: #ffd700; /* Gold */
    color: #333; /* Dark text */
    border-color: #ffec8b #c5a100 #c5a100 #ffec8b;
}

    #show-packs-btn:active {
        border-color: #c5a100 #ffec8b #ffec8b #c5a100;
    }

/* --- "pack-overlay" and "pack-menu" styles REMOVED --- */


/* --- STYLES FOR PACK *RESULT* POPUP --- */

/* The overlay (copied from pack-overlay) */
#pack-result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Darker */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Higher than the pack menu */
}

/* The menu (copied from pack-menu) */
#pack-result-menu {
    background-color: #444;
    padding: 20px;
    border: 4px double #FFF;
    width: 450px;
    text-align: center;
    position: relative;
    z-index: 2001;
}

    #pack-result-menu h3 {
        text-shadow: 2px 2px #000;
        margin-top: 0;
    }

/* The square box that will hold the duck preview */
#result-image-wrapper {
    width: 250px;
    height: 250px;
    background-color: #222;
    border: 4px solid #888;
    margin: 20px auto;
    padding: 10px;
}

/* The container for the images */
#result-image-container {
    width: 100%;
    height: 100%;
    position: relative;
}
    /* Images inside the result preview */
    #result-image-container img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

/* The text "A Top Hat!" */
#result-item-name {
    font-size: 18px;
    color: #ffd700; /* Gold */
    margin-bottom: 20px;
    text-shadow: 2px 2px #000;
}

/* --- "pack-menu" mobile style REMOVED --- */
/* --- @media (max-width: 600px) block removed --- */

/* --- STYLES FOR SHOP BUTTON --- */
#show-shop-btn {
    background-color: #004070; /* Dodger Blue */
    color: #FFF;
    border-color: #87CEFA #104E8B #104E8B #87CEFA;
}

    #show-shop-btn:active {
        border-color: #104E8B #87CEFA #87CEFA #104E8B;
    }

/* Mobile style for the new Shop button */
.mobile-nav-centered #show-shop-btn {
    background-color: #1E90FF;
    color: #FFF;
    border-color: #87CEFA #104E8B #104E8B #87CEFA;
    padding: 8px 12px; /* Match other mobile buttons */
    font-size: 12px; /* Match other mobile buttons */
}

    .mobile-nav-centered #show-shop-btn:active {
        border-color: #104E8B #87CEFA #87CEFA #104E8B;
    }


/* --- STYLES FOR CONSOLIDATED SHOP POPUP --- */

/* The overlay (copied from pack-overlay) */
#shop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* The popup menu (copied from pack-menu) */
#shop-menu {
    background-color: #444;
    padding: 20px;
    border: 4px double #FFF;
    width: 90%;
    max-width: 1000px; /* User's custom width */
    text-align: center;
    position: relative;
    z-index: 1001;
    /* NEW: Flex column to handle scrolling on mobile */
    display: flex;
    flex-direction: column;
    max-height: 80vh; /* Set max height */
}

    #shop-menu h3 {
        text-shadow: 2px 2px #000;
        margin-top: 0;
        margin-bottom: 5px;
        flex-shrink: 0; /* Don't shrink title */
    }

/* The close button (copied from close-pack-btn) */
#close-shop-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 0 8px;
    font-size: 20px;
}

/* Timer text */
#shop-timer {
    font-size: 12px;
    color: #ffd700;
    display: block;
    margin-bottom: 15px;
    flex-shrink: 0; /* Don't shrink timer */
}

/* --- NEW: SHOP TAB STYLES --- */
.shop-tabs {
    display: grid; /* <-- CHANGED */
    grid-template-columns: 1fr 1fr 1fr; /* <-- ADDED */
    gap: 10px;
    margin-bottom: 15px;
}

.shop-tab-button {
    /* flex: 1; <-- REMOVED */
    background-color: #333; /* Inactive color */
    border-color: #555 #222 #222 #555;
    font-size: 12px;
    white-space: nowrap;
}

    .shop-tab-button.active {
        background-color: #555; /* Active color */
        border-style: outset;
        border-color: #888 #333 #333 #888;
    }
/* --- END SHOP TAB STYLES --- */

/* --- NEW: SHOP VIEW CONTAINERS --- */
#shop-daily-view,
#shop-packs-view,
#shop-upgrades-view {
    /* NEW: Make containers scrollable */
    flex-grow: 1; /* Fill remaining space */
    overflow-y: auto; /* Add scrollbar if content overflows */
    min-height: 0; /* Flexbox scroll fix */
    /* Styles for the "box" */
    background-color: #222;
    border: 4px inset #333;
    padding: 15px;
}

/* === MODIFIED: Daily Shop container (was #shop-items-container) === */
#shop-items-container {
    display: flex;
    flex-direction: row; /* Horizontal row */
    flex-wrap: wrap; /* Allow wrapping */
    justify-content: space-around; /* Space them out */
    gap: 20px; /* Gap between cards */
    /* REMOVED max-height, overflow, padding, bg, border */
}

/* === MODIFIED: Shop Card styles (no change, just confirming) === */
.shop-card {
    width: 280px;
    background-color: #333;
    border: 4px solid #888;
    padding: 15px 15px 10px 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}
    /* ... (rarity border styles for .shop-card remain the same) ... */
    .shop-card.rarity-common {
        border-color: #00A3FF;
    }

    .shop-card.rarity-uncommon {
        border-color: #33CC33;
    }

    .shop-card.rarity-rare {
        border-color: #FF3333;
    }

    .shop-card.rarity-very-rare {
        border-color: #B233FF;
    }

    .shop-card.rarity-legendary {
        border-color: #FF9900;
    }

    .shop-card.rarity-mythical {
        border-width: 4px;
        border-style: solid;
        border-image: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000) 1;
        animation: rainbow-border 2s linear infinite;
    }

.shop-card-preview {
    width: 250px;
    height: 250px;
    background-color: transparent;
    position: relative;
    flex-shrink: 0;
}

    .shop-card-preview img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

.shop-card-info {
    text-align: center;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px #000, -2px -2px #000, 2px -2px #000, -2px 2px #000;
    margin-top: -60px;
}

    .shop-card-info span {
        font-size: 16px;
        display: block;
    }

    .shop-card-info small {
        font-size: 10px;
    }

.shop-card-buy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.shop-item-price {
    font-size: 14px;
    color: #ffd700;
    text-shadow: 2px 2px #000, -2px -2px #000, 2px -2px #000, -2px 2px #000;
}

.shop-buy-btn {
    font-size: 12px;
    padding: 8px 12px;
    background-color: #008000;
    border-color: #00CC00 #004D00 #004D00 #00CC00;
    width: 100%;
}

.shop-sold-out {
    font-size: 12px;
    padding: 8px 12px;
    background-color: #333;
    border-color: #555 #222 #222 #555;
    color: #888;
    width: 100%;
}
/* --- END DAILY SHOP STYLES --- */


/* --- STYLES FOR PACKS (MOVED INSIDE SHOP) --- */
/* This holds the 3 pack options */
#shop-packs-view #pack-options-container {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap; /* Allows stacking on mobile */
    /* REMOVED background/border/padding, now on parent */
}

/* This is the clickable card for each pack */
/* This is the clickable card for each pack */
/* This is the clickable card for each pack */
#shop-packs-view .pack-option {
    width: 270px; /* <-- THIS IS THE FIX */
    height: 280px; /* Give the card a fixed height */
    background-color: transparent; /* Container is now see-through */
    border: none; /* Container has no border */
    padding: 0; /* Container has no padding */
    cursor: pointer;
    perspective: 1000px; /* This enables the 3D space for the flip */
}
    /* Hover effect (REMOVED) - The hover is now on the inner card */
    #shop-packs-view .pack-option:hover {
        /* OLD STYLES REMOVED */
    }

    /* Styles for the pack images */
    #shop-packs-view .pack-option img {
        width: 100%;
        max-width: 150px;
    }

    /* The "Bronze Pack" text */
    #shop-packs-view .pack-option p {
        font-size: 16px;
        margin: 10px 0 5px 0;
    }

    /* The "100 Coins" text */
    #shop-packs-view .pack-option span {
        font-size: 14px;
        color: #ffd700; /* Gold */
    }

/* Specific border colors for each pack */
#shop-packs-view #buy-bronze-pack {
    border-color: #cd7f32;
}

#shop-packs-view #buy-silver-pack {
    border-color: #c0c0c0;
}

#shop-packs-view #buy-gold-pack {
    border-color: #ffd700;
}
/* --- END PACK STYLES --- */

/* --- NEW: DASHBOARD SETTINGS MENU --- */
#settings-overlay {
    align-items: center; /* Center vertically */
    padding-top: 0;
}
/* Force link buttons inside settings to be white */
#settings-main-view a.nav-button {
    color: #FFFFFF;
    text-decoration: none;
}

/* Ensure they stay white even after being clicked */
#settings-main-view a.nav-button:visited {
    color: #FFFFFF;
}

/* Keep the hover effect consistent */
#settings-main-view a.nav-button:hover {
    color: #FFFFFF;
}

#settings-menu {
    background-color: #222;
    padding: 0;
    border: 4px double #FFF;
    width: 90%;
    max-width: 850px;
    height: auto;
    max-height: 95vh; /* Increased to 95% of screen height */
    text-align: center;
    position: relative;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

/* Header Bar */
.settings-header {
    background-color: #444;
    padding: 15px;
    border-bottom: 4px double #FFF;
    display: flex;
    justify-content: center;
    align-items: center;
}

.settings-header h3 {
    margin: 0;
    color: #ffd700;
    text-shadow: 2px 2px #000;
    font-size: 20px;
}

#close-settings-btn {
    top: 12px;
    right: 15px;
    font-size: 24px;
    color: #FFF;
    background: none;
    border: none;
    cursor: pointer;
}
#close-settings-btn:hover {
    color: #FF3333;
}

/* Main Dashboard Grid */
#settings-main-view {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns */
    gap: 20px;
    overflow-y: auto; /* Scroll content if needed */
    max-height: 100%;
}

/* Groups (Cards) */
.settings-group {
    background-color: #333;
    border: 2px solid #555;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-group h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #87CEFA; /* Light Blue Title */
    text-transform: uppercase;
    border-bottom: 1px dashed #555;
    padding-bottom: 5px;
}

/* Volume Sliders inside the group */
.settings-volume-row {
    display: flex;
    flex-direction: column; /* Stack vertically */
    align-items: center;    /* Center align */
    justify-content: center;
    font-size: 12px;
    margin-bottom: 15px;    /* Space between Music and SFX rows */
    width: 100%;
}

.settings-volume-row label {
    width: 100%;
    text-align: center;     /* Center the text */
    margin-bottom: 19px;     /* Space between text and slider */
    font-weight: bold;
    color: #AAA;            /* Matching the aesthetic */
}

.settings-volume-row input {
    width: 90%;             /* Make slider almost full width */
    flex-grow: 0;
    margin: 0 auto;
}

/* Buttons inside groups */
.settings-group .nav-button {
    font-size: 12px;
    padding: 10px;
    text-align: center;
    background-color: #444;
    width: 100%;
    box-sizing: border-box;
}
.settings-group .nav-button:hover {
    background-color: #555;
}

/* Special Button Colors */
#reset-game-btn {
    background-color: #990000;
    border-color: #CC0000 #660000 #660000 #CC0000;
}
#export-save-btn, #import-save-btn {
    background-color: #004070;
    border-color: #1E90FF #002040 #002040 #1E90FF;
}
/* --- CUSTOM BUTTON STYLING (Support the Dev & Social Media) --- */

/* 1. Reset Ko-fi Button (Support the Dev) to default gray */
a.settings-menu-button[href*="ko-fi"] {
    background-color: #555 !important;
    border-color: #888 #333 #333 #888 !important;
    color: #FFF !important;
}

a.settings-menu-button[href*="ko-fi"]:active {
    border-style: inset !important;
    border-color: #333 #888 #888 #333 !important;
}

/* 2. Style Social Media (Instagram) Hot Pink */
a.settings-menu-button[href*="instagram"] {
    background-color: #E1306C; /* Hot Pink / Magenta */
    border-color: #FF69B4 #A32051 #A32051 #FF69B4; /* Lighter Pink / Dark Pink */
    color: #FFF;
}

/* FIX: Explicitly set the hover state to prevent gray override */
a.settings-menu-button[href*="instagram"]:hover {
    background-color: #B31E4D; /* Slightly darker pink on hover */
    border-color: #FF69B4 #A32051 #A32051 #FF69B4;
}

a.settings-menu-button[href*="instagram"]:active {
    border-style: inset;
    background-color: #B31E4D;
    border-color: #A32051 #FF69B4 #FF69B4 #A32051;
}
/* --- END CUSTOM BUTTON STYLING --- */

/* Sub-sections (Hidden by default, cover the grid when active) */
#how-to-play-section, #credits-section, #contact-section, #reset-section, #password-section, #dev-settings-section, #volume-section, #privacy-terms-section {
    padding: 20px;
    text-align: left;
    overflow-y: auto;
    height: 100%;
}

/* Mobile Adjustment for Settings */
@media (max-width: 600px) {
    #settings-main-view {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
    #settings-menu {
        width: 95%;
        max-height: 90vh;
    }
}
/* --- END DASHBOARD STYLES --- */

/* --- STYLES FOR UPGRADES (MOVED INSIDE SHOP) --- */
#shop-upgrades-view #upgrades-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap; /* Allows stacking on mobile */
    gap: 15px;
    /* REMOVED padding-top, now on parent */
}

#shop-upgrades-view .upgrade-card {
    width: 180px;
    background-color: #333;
    border: 4px solid #00A3FF; /* "Common" blue border */
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#shop-upgrades-view .upgrade-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 5px;
}

#shop-upgrades-view .upgrade-title {
    font-size: 14px;
    text-shadow: 2px 2px #000;
    color: #FFF;
    height: 14px;
}

#shop-upgrades-view .upgrade-info {
    font-size: 12px;
    color: #AAA;
    height: 12px;
}

#shop-upgrades-view .upgrade-buy-btn {
    font-size: 12px;
    padding: 8px 12px;
    width: 100%;
    background-color: #008000; /* Green */
    border-color: #00CC00 #004D00 #004D00 #00CC00;
}

    #shop-upgrades-view .upgrade-buy-btn:active {
        border-color: #004D00 #00CC00 #00CC00 #004D00;
    }
/* === END UPGRADE STYLES === */


/* === FIX: Disabled Sell Button Style === */
/* This is more specific, so it overrides the green */

#sell-duck-btn.is-disabled,
#sell-duck-btn-popup.is-disabled {
    background-color: #333; /* Darker grey */
    color: #888; /* Lighter grey text */
    border-color: #555 #222 #222 #555; /* Darker grey border */
}

    #sell-duck-btn.is-disabled:active,
    #sell-duck-btn-popup.is-disabled:active {
        border-style: outset; /* Don't "press" */
        border-color: #555 #222 #222 #555; /* Don't change border */
    }

/* --- STYLES FOR NOTICE POPUP --- */
#notice-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2500; /* Higher than other popups */
}

#notice-menu {
    background-color: #444;
    padding: 30px;
    border: 4px double #FFF;
    width: 90%;
    max-width: 500px;
    text-align: center;
}

    #notice-menu h3 {
        text-shadow: 3px 3px #000;
        margin-top: 0;
    }

    #notice-menu p {
        font-size: 14px;
        line-height: 1.6;
        margin: 15px 0 20px 0;
    }

/* --- @media (max-width: 600px) block removed --- */

/* --- NEW: Styles for Result Popup Buttons --- */
#pack-result-menu .popup-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
    margin-top: 15px;
}

#equip-result-btn {
    background-color: #008000; /* Green */
    border-color: #00CC00 #004D00 #004D00 #00CC00;
}

    #equip-result-btn:active {
        border-color: #004D00 #00CC00 #00CC00 #004D00;
    }

#send-result-to-pond-btn {
    background-color: #1E90FF; /* Blue */
    border-color: #87CEFA #104E8B #104E8B #87CEFA;
}

    #send-result-to-pond-btn:active {
        border-color: #104E8B #87CEFA #87CEFA #104E8B;
    }

/* --- NEW: Style for the sell value coin icon --- */
#sell-value-coin-icon {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-left: 4px;
    margin-bottom: 4px; /* Fine-tune vertical alignment */
}

/* --- MODIFIED: Renamed from #sell-value-display --- */
#sell-charge-display {
    z-index: 1000;
    font-size: 10px;
    color: #FFF; /* Changed from gold to grey */
    text-shadow: 2px 2px #000;
    margin-top: -15px; /* Space from button */
    height: 12px;
}

/* --- NEW: Style for the sell value coin icon (inside buttons) --- */
#sell-duck-btn img, #sell-duck-btn-popup img {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-left: 13px;
    margin-right: 4px;
    margin-bottom: 4px; /* Fine-tune vertical alignment */
}

/* --- NEW: Wrapper for pond sell button --- */
.sell-control-popup {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- NEW: Text below pond sell button --- */
#sell-charge-display-popup {
    font-size: 12px;
    color: #AAA; /* Grey, same as main page */
    text-shadow: 2px 2px #000;
    margin-top: 5px;
    height: 12px;
}


/* === STYLES FOR UPGRADE CARDS (REMOVED FROM GLOBAL) === */


/* --- ACHIEVEMENT TOAST STYLES --- */
#achievement-toast {
    position: fixed;
    bottom: 20px;
    right: 20px; /* MODIFIED: Start in final X position */
    width: 300px;
    background-color: #333;
    border: 4px double #ffd700; /* Gold border */
    padding: 15px;
    z-index: 5000; /* Highest priority */
    text-align: left;
    /* --- MODIFIED ANIMATION --- */
    opacity: 0;
    transform: translateX(calc(100% + 20px)); /* Fly in from right */
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
    pointer-events: none; /* Allow clicks through when hidden */
}

    #achievement-toast.is-visible {
        opacity: 1;
        transform: translateX(0); /* Slide to final position */
        pointer-events: auto; /* Allow clicks when visible */
    }

    #achievement-toast h3 {
        margin: 0 0 10px 0;
        font-size: 14px;
        color: #ffd700; /* Gold */
        text-shadow: 2px 2px #000;
    }

    #achievement-toast p {
        font-size: 12px;
        margin: 0;
        line-height: 1.4;
    }

/* --- @media (max-width: 600px) block removed --- */
/* --- END ACHIEVEMENT TOAST STYLES --- */

/* --- NEW: ACHIEVEMENT *POPUP* STYLES --- */

/* The main overlay (copied from shop-overlay) */
#achievements-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Same as other popups */
}

/* The popup menu itself (copied from shop-menu) */
#achievements-menu {
    background-color: #444;
    padding: 20px;
    border: 4px double #FFF;
    width: 90%;
    max-width: 900px; /* Nice and wide */
    min-height: 500px; /* Taller */
    max-height: 80vh; /* Max 80% of viewport height */
    text-align: center;
    position: relative;
    z-index: 1001;
    display: flex; /* NEW: Use flex to make list container grow */
    flex-direction: column; /* NEW: Stack title and list */
}

    #achievements-menu h3 {
        text-shadow: 2px 2px #000;
        margin-top: 0;
        margin-bottom: 15px; /* Space below title */
        flex-shrink: 0; /* Don't shrink the title */
    }

/* The close button (copied from close-shop-btn) */
#close-achievements-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 0 8px;
    font-size: 20px;
}

/* Container for the scrollable list */
#achievements-list-container {
    flex-grow: 1; /* NEW: Make this container fill the space */
    min-height: 0; /* NEW: Fix for flex scroll */
    max-height: none; /* REMOVED: No longer need a fixed max-height */
    overflow-y: auto;
    background-color: #222;
    border: 4px inset #333;
    padding: 10px;
    margin-bottom: 0; /* REMOVED: No longer need margin-bottom */
}

/* Individual achievement item */
.achievement-item {
    background-color: #333;
    padding: 10px;
    margin-bottom: 8px;
    border-left: 5px solid #555; /* Default "locked" border */
}

    .achievement-item.is-unlocked {
        border-left: 5px solid #ffd700; /* Gold "unlocked" border */
    }

    .achievement-item h5 {
        font-size: 14px;
        margin: 0 0 5px 0;
        text-shadow: 2px 2px #000;
        color: #FFF; /* Default title color */
    }

    .achievement-item.is-unlocked h5 {
        color: #ffd700; /* Gold title for unlocked */
    }

    .achievement-item p {
        font-size: 11px;
        margin: 0 0 5px 0;
        color: #AAA; /* Description color */
    }

    .achievement-item .achievement-progress {
        font-size: 10px;
        color: #FFF;
        font-weight: bold;
    }
/* --- END ACHIEVEMENT LIST STYLES --- */

/* --- NEW: ACHIEVEMENT CLAIM BUTTON STYLES --- */
.achievement-claim-btn {
    font-family: 'Press Start 2P', cursive;
    background-color: #008000; /* Green */
    color: #FFF;
    border-style: outset;
    border-width: 4px;
    border-color: #00CC00 #004D00 #004D00 #00CC00;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
}

    .achievement-claim-btn:active {
        border-style: inset;
        border-color: #004D00 #00CC00 #00CC00 #004D00;
    }

    .achievement-claim-btn img {
        width: 12px;
        height: 12px;
        vertical-align: middle;
        margin-left: 5px;
        margin-bottom: 2px;
    }

.achievement-claimed-text {
    font-size: 12px;
    color: #00CC00; /* Green */
    text-shadow: 2px 2px #000;
}
/* --- END ACHIEVEMENT STYLES --- */

/* --- NEW: ACHIEVEMENT TOAST CLAIM BUTTON --- */
#achievement-toast-claim-wrapper {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #777;
}

/* Re-use the existing claim button style for the toast */
#achievement-toast-claim-btn {
    font-family: 'Press Start 2P', cursive;
    background-color: #008000; /* Green */
    color: #FFF;
    border-style: outset;
    border-width: 4px;
    border-color: #00CC00 #004D00 #004D00 #00CC00;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    width: 100%; /* Make button fill the toast */
}

    #achievement-toast-claim-btn:active {
        border-style: inset;
        border-color: #004D00 #00CC00 #00CC00 #004D00;
    }

    #achievement-toast-claim-btn img {
        width: 12px;
        height: 12px;
        vertical-align: middle;
        margin-left: 5px;
        margin-bottom: 2px;
    }
/* --- END TOAST BUTTON STYLES --- */
/* --- NEW: ACHIEVEMENT TOAST DESCRIPTION --- */
#achievement-toast-desc {
    font-size: 11px;
    color: #AAA; /* Greyer text */
    margin: 5px 0 0 0; /* Add a little space above it */
    line-height: 1.4;
}
/* --- END TOAST DESCRIPTION STYLES --- */

/* --- NEW: SET COMPLETE TOAST STYLES --- */
#set-complete-toast {
    position: fixed;
    bottom: 20px;
    right: 20px; /* MODIFIED: Start in final X position */
    width: 300px;
    background-color: #333;
    border: 4px double #1E90FF; /* Blue border */
    padding: 15px;
    z-index: 4900; /* Just below achievement toast */
    text-align: left;
    /* --- MODIFIED ANIMATION --- */
    opacity: 0;
    transform: translateX(calc(100% + 20px)); /* Fly in from right */
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
    pointer-events: none; /* Allow clicks through when hidden */
}

    #set-complete-toast.is-visible {
        opacity: 1;
        transform: translateX(0); /* Slide to final position */
        pointer-events: auto; /* Allow clicks when visible */
    }

    #set-complete-toast h3 {
        margin: 0 0 5px 0;
        font-size: 14px;
        color: #87CEFA; /* Light Blue */
        text-shadow: 2px 2px #000;
    }

    #set-complete-toast p {
        font-size: 12px;
        margin: 0;
        line-height: 1.4;
        color: #FFF; /* White text */
    }

/* --- @media (max-width: 600px) block removed --- */
/* --- END SET COMPLETE TOAST STYLES --- */

/* --- NEW: CREDITS SECTION STYLES --- */
#credits-section {
    text-align: left;
    font-size: 12px;
    line-height: 1.6;
    max-height: 400px; /* Give it a max height */
    overflow-y: auto; /* Add scroll if content gets too long */
}

    #credits-section h4 {
        text-align: center;
        margin-bottom: 25px; /* More space below title */
    }

    #credits-section p {
        margin-bottom: 20px;
    }

    /* Style for the roles */
    #credits-section strong {
        color: #ffd700; /* Gold */
        display: block;
        font-size: 14px;
        margin-bottom: 5px;
        text-shadow: 2px 2px #000;
    }
/* --- END CREDITS STYLES --- */
/* --- NEW: Hidden Achievement Toast Theme --- */
#achievement-toast.is-hidden {
    border-color: #00A3FF; /* Blue border */
}

    #achievement-toast.is-hidden h3 {
        color: #87CEFA; /* Light blue title */
    }

/* --- NEW: Hidden Achievement List Theme (in Settings) --- */
.achievement-item.is-hidden {
    border-left: 5px solid #00A3FF; /* Blue border */
}

    .achievement-item.is-hidden h5 {
        color: #87CEFA; /* Light blue */
    }

/* =============================================================================
--- BEGIN CORRECTED CARD FLIP STYLES ---
=============================================================================
*/

/* The inner container that actually flips */
.pack-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    /* NOTE: backface-visibility is intentionally *NOT* here. 
       It goes on the faces.
    */
}

/* The hover effect that triggers the flip */
#shop-packs-view .pack-option:hover .pack-card-inner {
    transform: rotateY(180deg);
}

/* SHARED properties for both faces */
.pack-card-front,
.pack-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    /* THIS IS THE FIX: This hides the face that is turned away.
       The front face is hidden when it's > 90deg.
       The back face is hidden when it's < 90deg.
    */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* Re-apply the original styling from .pack-option */
    background-color: #222;
    padding: 15px;
    box-sizing: border-box; /* IMPORTANT: Include padding in height/width */
    border: 4px solid #888; /* Default border */
}

/* Specific layout for the FRONT face */
.pack-card-front {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Starts facing forward (transform: rotateY(0deg)) */
}

/* Specific layout for the BACK face */
.pack-card-back {
    transform: rotateY(180deg); /* Starts pre-flipped */

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* Pushes content to top and button to bottom */
}

/* Apply specific border colors to the faces */
#buy-bronze-pack .pack-card-front,
#buy-bronze-pack .pack-card-back {
    border-color: #cd7f32;
}

#buy-silver-pack .pack-card-front,
#buy-silver-pack .pack-card-back {
    border-color: #c0c0c0;
}

#buy-gold-pack .pack-card-front,
#buy-gold-pack .pack-card-back {
    border-color: #ffd700;
}

/* Styling for the new content on the back */
.pack-card-back h5 {
    font-size: 16px;
    text-shadow: 2px 2px #000;
    margin: 5px 0 15px 0;
    text-align: center;
    color: #FFF;
}

.pack-chances {
    list-style-type: '▸ ';
    padding-left: 20px;
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    text-align: left;
}

    .pack-chances li {
        color: #AAA;
    }
/* --- END CARD FLIP STYLES --- */


/* --- FIX: Set static height on shop menu when packs are active --- */
#shop-menu.packs-tab-active {
    height: 405px;
    max-height: 405px; /* This overrides the flexible 80vh/70vh */
}

/* --- NEW: Pack Buy Button (on back of card) --- */
.pack-buy-btn {
    font-family: 'Press Start 2P', cursive;
    background-color: #008000; /* Green */
    color: #FFF;
    border-style: outset;
    border-width: 4px;
    border-color: #00CC00 #004D00 #004D00 #00CC00;
    padding: 10px 15px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    z-index: 900;
    font-size: 14px;
    width: 100%; /* Make button fill width */
}

    .pack-buy-btn:active {
        border-style: inset;
        border-color: #004D00 #00CC00 #00CC00 #004D00;
    }

/* --- NEW: Style for Ko-fi link in settings --- */
#settings-main-view a.settings-menu-button[href*="ko-fi.com"] {
    color: #ffd700; /* Gold */
    background-color: #4e431f; /* Dark gold background */
    border-color: #ffec8b #c5a100 #c5a100 #ffec8b;
}

    #settings-main-view a.settings-menu-button[href*="ko-fi.com"]:hover {
        color: #FFF;
        background-color: #6a5c2a;
    }

    #settings-main-view a.settings-menu-button[href*="ko-fi.com"]:active {
        color: #FFF;
        border-style: inset;
        border-color: #c5a100 #ffec8b #ffec8b #c5a100;
    }
/* --- END: Style for Ko-fi link --- */

/* --- NEW: Site Footer Styles --- */
/* --- NEW: Site Footer Styles --- */
.site-footer {
    width: 100%;
    padding: 5px 15px; /* MODIFIED: Reduced padding */
    margin-top: auto; /* This is the flexbox sticky footer rule */
    background-color: rgba(0, 0, 0, 0.25); /* MODIFIED: Was 0.6 */
    /* border-top: 2px solid #555; <-- REMOVED */
    color: #AAA;
    font-size: 8px;
    text-shadow: 1px 1px #000;
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    justify-content: center;
    align-items: center;
    gap: 15px;
    box-sizing: border-box; /* Include padding in width */
}

    .site-footer a {
        color: #D3D3D3;
        text-decoration: underline;
    }

        .site-footer a:hover {
            color: #ffd700;
        }

    .site-footer span {
        white-space: nowrap;
    }

/* --- MODIFIED: Main Page Footer Override --- */
/* --- MODIFIED: Main Page & Pond Footer Override --- */
#footer-main,
#footer-pond {
    /* margin-top: 0; <-- THIS IS NOW REMOVED */
    padding-top: 10px; /* Reduce padding */
    padding-bottom: 10px; /* Reduce padding */
}

/* --- NEW: Gallery Footer Override --- */
/* This makes the footer text larger on sub-pages */
#footer-gallery {
    font-size: 10px; /* Larger than main page's 8px */
    padding: 15px 20px; /* More padding than main page's 10px */
}

/* --- NEW: VOLUME SETTINGS STYLES --- */
#volume-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px 0;
}

.volume-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    font-size: 14px;
}

    .volume-control label {
        white-space: nowrap;
    }


/* --- NEW: PIXELATED SLIDER STYLES --- */
input[type="range"] {
    -webkit-appearance: none; /* Hides the default slider */
    appearance: none;
    width: 70%; /* Slider width */
    height: 10px; /* Slider track height */
    background: #222; /* Slider track color */
    border: 2px outset #555;
    outline: none;
    cursor: pointer;
}

    /* --- Slider Thumb (Chrome/Safari) --- */
    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none; /* Hides the default thumb */
        appearance: none;
        width: 15px; /* Thumb width */
        height: 25px; /* Thumb height */
        background: #888; /* Thumb color */
        border: 2px outset #BBB;
        cursor: pointer;
    }

    input[type="range"]:active::-webkit-slider-thumb {
        border-style: inset;
    }

    /* --- Slider Thumb (Firefox) --- */
    input[type="range"]::-moz-range-thumb {
        width: 15px; /* Thumb width */
        height: 25px; /* Thumb height */
        background: #888; /* Thumb color */
        border: 2px outset #BBB;
        cursor: pointer;
    }

    input[type="range"]:active::-moz-range-thumb {
        border-style: inset;
    }


    /* Ensure this is in your style.css */
.marching-duck {
    position: absolute;
    width: 250px;
    height: 250px; /* This gives the element a height to flip around */
    cursor: pointer;
    /* z-index is set dynamically in script.js (100) */
}

/* --- IMPORT SAVE POPUP STYLES --- */
#import-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2600; /* Above notice popup */
}

#import-menu {
    background-color: #444;
    padding: 20px;
    border: 4px double #FFF;
    width: 90%;
    max-width: 500px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#import-menu h3 {
    text-shadow: 2px 2px #000;
    margin-top: 0;
    color: #FFF;
}

#import-save-input {
    font-family: 'Press Start 2P', cursive; /* Match game font */
    font-size: 10px; /* Keep it small so code fits */
    background-color: #222;
    color: #00CC00; /* Hacker green text */
    border: 4px inset #333;
    padding: 10px;
    width: 100%;
    height: 150px; /* Fixed height */
    box-sizing: border-box;
    resize: none; /* Disable resize handle */
    outline: none;
    line-height: 1.5;
}

#confirm-import-btn {
    background-color: #990000; /* Red warning color initially */
    border-color: #CC0000 #660000 #660000 #CC0000;
}
#confirm-import-btn:active {
     border-color: #660000 #CC0000 #CC0000 #660000;
}

/* ... existing css ... */

/* --- NEW: Instagram Popup Animation (Polished) --- */
#insta-popup {
    position: fixed;
    bottom: 20px;
    left: -350px; /* Start off-screen */
    width: 280px;
    
    /* MATCHING THE GAME UI */
    background-color: #444; 
    border: 4px double #FFF;
    box-shadow: 5px 5px 0px #000;
    
    padding: 20px;
    z-index: 3000;
    transition: left 0.5s ease-out;
    display: flex;
    flex-direction: column;
    gap: 15px; /* More space between text and button */
    text-align: center; /* Center the text like the Welcome menu */
}

#insta-popup.slide-in {
    left: 20px;
}

#insta-popup p {
    font-size: 10px; /* Match game text size */
    color: #FFF;
    line-height: 1.6; /* Better readability */
    margin: 0;
    text-shadow: 2px 2px #000; /* Standard game text shadow */
}

#insta-visit-btn {
    background-color: #E1306C; /* Keep Brand Color */
    color: #FFF;
    text-align: center;
    padding: 12px;
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    cursor: pointer;

    /* THE GAME'S 3D BUTTON STYLE */
    border-style: outset;
    border-width: 4px;
    /* Custom 3D shading for the Pink button */
    border-color: #ff99cc #8a1c42 #8a1c42 #ff99cc; 
}

#insta-visit-btn:active {
    /* Pressed state */
    border-style: inset;
    border-color: #8a1c42 #ff99cc #ff99cc #8a1c42;
}

#close-insta-popup {
    position: absolute;
    top: 5px;
    right: 8px;
    background: none;
    border: none;
    color: #AAA;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    text-shadow: 2px 2px #000;
}

#close-insta-popup:hover {
    color: #FFF;
}

/* --- PRIVACY & TERMS BUTTON FIX --- */
#privacy-terms-section .nav-button {
    padding: 8px 0 !important; /* Slimmer (removed side padding, reduced top/bottom) */
    text-align: center !important; /* Force text to center */
    display: block !important; /* Ensures the button fills the width so centering works */
    width: 100%;
    box-sizing: border-box;
}

/* --- SUPERSIZED BOUNTY BOARD --- */

/* --- BOUNTY BOARD (SCALED DOWN) --- */

/* 1. The Overlay */
#bounty-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 2. The Wooden Box */
.bounty-board-wrapper {
    background-color: #3e2723;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAIklEQVQIW2NkQAKrVq36zwjjgzjwqkJYhDAMANIlKBJwKQBUCBN38/1+7wAAAABJRU5ErkJggg==');
    padding: 25px; 
    border: 5px ridge #8d6e63;
    border-radius: 10px;
    width: 90%;
    max-width: 850px; /* Reduced from 1000px */
    text-align: center;
    color: white;
    box-shadow: 0 0 30px #000;
}

.bounty-board-wrapper h2 {
    font-size: 28px; /* Slightly smaller title */
    margin-bottom: 15px;
    text-shadow: 2px 2px 0 #000;
}

/* Subtitle Style */
.bounty-subtitle {
    color: #ffcc80;
    font-size: 14px;
    margin-top: -10px;
    margin-bottom: 20px;
    font-style: italic;
    opacity: 0.9;
    text-shadow: 1px 1px 2px #000;
}

/* --- BOUNTY BOARD VISUAL UPDATE --- */
#bounty-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ensure the title doesn't get cut off */
#bounty-overlay h2 {
    margin-top: 0;
    font-size: 2rem;
    color: inherit; /* Use the parent color */
}



/* --- 2. THE CONTAINER (Invisible Wrapper) --- */
#bounty-items-container {
    background: transparent !important; /* Invisible, so board shows through */
    
    /* Flex Layout: Put posters in a ROW */
    display: flex;
    flex-direction: row;
    justify-content: center; /* Center them */
    align-items: flex-end; /* Align bottom */
    gap: 15px; /* Space between posters */
    
    width: 100%;
    margin-top: 10px;
}

/* --- 3. THE POSTERS (Poster Sprites) --- */
.bounty-poster {
    /* Layout: 3 posters fit in a row */
    width: 30%;
    min-width: 150px; /* Prevent them from getting too small */
    aspect-ratio: 3 / 4; /* Keeps poster shape consistent */
    
    /* Remove default styles */
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    
    /* Background Image is set in JS (poster1, poster2, etc.) */
    background-size: 100% 100%;
    background-repeat: no-repeat;
    
    /* Text alignment inside the poster */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    text-align: center;
}


.bounty-poster:nth-child(2) { transform: rotate(1.5deg); }
.bounty-poster:nth-child(3) { transform: rotate(-1deg); }

.bounty-poster:hover {
    transform: scale(1.05) rotate(0deg) !important;
    z-index: 100;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    cursor: pointer;
}

/* 4. The Header Text */
.poster-header {
    font-family: 'Press Start 2P', cursive;
    font-size: 20px;
    font-weight: 900;
    /* Changed border and text to Very Dark Brown */
    border-bottom: 3px solid #261612; 
    color: #261612; 
    margin-bottom: 10px;
    width: 100%;
    text-align: center;
    letter-spacing: 1px;
}

/* 5. The Mugshot Area */
.poster-image-wrapper {
    position: relative;
    width: 150px; /* Reduced from 200px */
    height: 150px;
    background: #d5ab74;
    border: 3px solid #000000;
    margin-bottom: 5px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

.poster-image-wrapper img {
    position: absolute;
    top: -4vh; left: -5.5vh;
    width: 150%; height: 150%;
    object-fit: contain;
    image-rendering: auto;
}

/* 6. Info & Reward */
.poster-info {
    width: 100%;
    text-align: center;
    /* Added Very Dark Brown color for the duck Name/Description */
    color: #261612; 
}

.poster-info div:first-child {
    font-size: 0.75rem !important;
    font-weight: bold;
    margin-bottom: 5px;
}

.poster-reward {
    color: #c62828;
    font-weight: 900;
    font-size: 1.1rem; /* Reduced from 1.4rem */
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.0);
    padding: 3px;
    border-radius: 4px;
}

/* Mobile: Scale down slightly but keep them dominant */
@media (max-width: 800px) {
    .bounty-poster {
        width: 180px;
    }
    .poster-image-wrapper {
        width: 140px;
        height: 140px;
    }
    .poster-header { font-size: 18px; }
}

.bounty-subtitle {
    color: #ffcc80; /* Light wood color */
    font-size: 14px;
    margin-top: -15px; /* Pulls it closer to the H2 title */
    margin-bottom: 25px; /* Pushes the posters down slightly */
    font-style: italic;
    opacity: 0.9;
    text-shadow: 1px 1px 2px #000;
}

/* --- BOUNTY BUTTON STATE --- */
#sell-duck-btn.bounty-active {
    background-color: #D32F2F !important; /* Bright Red */
    border-bottom: 4px solid #B71C1C !important;
    animation: pulse-red 1.5s infinite;
    box-shadow: 0 0 15px #FF5252;
}

@keyframes pulse-red {
    0% { transform: scale(1); box-shadow: 0 0 10px #D32F2F; }
    50% { transform: scale(1.05); box-shadow: 0 0 20px #FF5252; }
    100% { transform: scale(1); box-shadow: 0 0 10px #D32F2F; }
}

/* --- VENATUS INTEGRATION --- */
/* We are using the Venatus TCF 2.0 CMP. 
   We must hide our custom banner to prevent double-popups. */
#cookie-consent-banner {
    display: none !important;
}

/* --- GOOGLE TRANSLATE FORCED OVERRIDES --- */

/* 1. HIDE THE TOP BANNER (Targeting all known IDs/Classes) */
iframe.goog-te-banner-frame {
    display: none !important;
    width: 0px !important;
    height: 0px !important;
    visibility: hidden !important;
}

.goog-te-banner-frame {
    display: none !important;
}


/* 3. HIDE POPUPS & TOOLTIPS (The "Original Text" hover) */
.goog-tooltip {
    display: none !important;
}

.goog-tooltip:hover {
    display: none !important;
}

.goog-text-highlight {
    background-color: transparent !important;
    border: none !important; 
    box-shadow: none !important;
}

/* 4. STYLE THE DROPDOWN (Targeting Generic + Simple classes) */
#google_translate_element {
    text-align: center;
    margin-bottom: 5px;
}

/* Target the generic container to ensure it looks like a button */
.goog-te-gadget-simple,
.goog-te-gadget-icon,
.goog-te-gadget {
    font-family: 'Press Start 2P', cursive !important;
    font-size: 10px !important;
    color: #FFF !important;
}

/* Hide the "Powered by Google" text */
.goog-te-gadget {
    color: transparent !important;
}

/* Force the inner text back to white */
.goog-te-gadget span,
.goog-te-gadget div {
    color: #FFF !important;
    display: inline-block !important;
}

/* Style the actual dropdown box */
.goog-te-gadget-simple {
    background-color: #555 !important;
    border: 4px outset #888 !important;
    padding: 8px !important;
    display: inline-block !important;
    cursor: pointer !important;
}

/* Hide Google Logo */
.goog-te-gadget img, 
.goog-te-gadget-simple img,
.goog-te-gadget-icon {
    display: none !important;
}

/* Style the actual dropdown box */
.goog-te-gadget-simple {
    /* Typography matching .nav-button */
    font-family: 'Press Start 2P', cursive !important;
    font-size: 12px !important; /* Matches Settings group buttons */
    color: #FFF !important;
    text-align: center !important;
    line-height: normal !important;

    /* Box Model - The "Robust" Responsive Logic */
    display: block !important;       /* Forces it to be a block element */
    width: 100% !important;          /* Fills the container width */
    box-sizing: border-box !important; /* Keeps padding inside the width */
    margin: -1.5vh !important;
    padding: 10px !important;        /* Matches your standard button padding */

    /* The 3D Button Look */
    background-color: #474747 !important;
    border-style: outset !important;
    border-width: 4px !important;
    border-color: #888 #333 #333 #888 !important;
    border-radius: 0 !important;     /* Removes any Google rounded corners */
    cursor: pointer !important;
}

/* Add the "pressed" effect on click */
.goog-te-gadget-simple:active {
    border-style: inset !important;
    border-color: #333 #888 #888 #333 !important;
}