:root {
    --primary-color: #90ee90; /* Light Green */
    --secondary-color: rgba(255, 255, 255, 0.1); /* Translucent white for glass effect */
    --text-color: #ffffff;
    --accent-color: #3e8e41; /* Green */
    --text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#maintenance-banner {
    display: none;
}

body {
    font-family: 'Roboto', sans-serif;
    background-image: url("https://images.unsplash.com/photo-1553356084-58ef4a67b2a7?q=80&w=2787&auto=format&fit=crop");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    text-align: center;
}

#main-content > main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
}

.content-container {
    background: var(--secondary-color);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px); /* For Safari */
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2em;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    width: 100%;
    max-width: 900px;
}

h1 {
    font-family: 'Press Start 2P', cursive;
    color: var(--text-color);
    text-shadow: var(--text-shadow);
    margin-bottom: 1em;
}

h2 {
    font-family: 'Press Start 2P', cursive;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5em;
    margin-bottom: 1em;
    text-align: left;
    text-shadow: var(--text-shadow);
}

#profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    cursor: pointer;
    transition: transform 0.2s ease;
}

#profile-pic:hover {
    transform: scale(1.1);
}

#social-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
    margin-top: 1em;
}

.youtube-link {
    display: inline-block;
    padding: 12px 24px;
    background-color: #FF0000; /* YouTube Red */
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 25px;
    font-family: 'Roboto', sans-serif;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: none;
}

.youtube-link:hover {
    background-color: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.stats {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--text-color);
    margin: 0;
    text-shadow: var(--text-shadow);
}

#secret-game-info {
    margin-top: 1em;
    padding: 1em;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#hint {
    margin-top: 0;
    font-style: italic;
    color: #eee;
}

.instructions {
    margin-top: 0.5em;
    font-size: 0.9em;
    color: #ccc;
}

section {
    width: 100%;
    margin-top: 3em;
}

.card-container {
    display: flex;
    flex-direction: column; /* Stack cards vertically by default for mobile */
    gap: 1.5em;
    text-align: left;
}

.card {
    display: block;
    text-decoration: none;
    color: inherit;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 1.5em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0; /* Prevent cards from shrinking in a flex container */
    color: #333;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.card h3 {
    margin-top: 0;
    color: var(--accent-color);
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    text-shadow: none;
}

.card p {
    margin-bottom: 0;
    text-shadow: none;
}

.video-card img.video-thumbnail {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1em;
    object-fit: cover;
    aspect-ratio: 16 / 9;
}

/* Horizontal scrolling for desktop */
@media screen and (min-width: 768px) {
    body {
        padding: 40px 20px;
    }
    
    .card-container.scrollable {
        flex-direction: row;
        overflow-x: auto;
        padding: 1em; /* Add padding for scrollbar and aesthetics */
        margin: 0 -1em; /* Counteract padding on parent */
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) rgba(0,0,0,0.2);
    }

    .card-container.scrollable::-webkit-scrollbar {
        height: 8px;
    }

    .card-container.scrollable::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.2);
        border-radius: 4px;
    }

    .card-container.scrollable::-webkit-scrollbar-thumb {
        background-color: var(--primary-color);
        border-radius: 4px;
    }
    
    .card-container.scrollable .card {
        width: 280px; /* Give cards a fixed width */
    }
}

/* Game Styles */
#game-container {
    transform: scale(0.9);
    opacity: 0;
}

#game-area {
    display: flex;
    flex-direction: column;
    gap: 2em;
}

@media screen and (min-width: 768px) {
    #game-area {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
    }

    #game-area > main {
        flex: 2;
    }
    #shop-container {
        flex: 1;
        margin-left: 2em;
    }
}

#score-display {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5em;
    margin-bottom: 1em;
    color: var(--text-color);
    text-shadow: var(--text-shadow);
}

/* New styling for game action buttons (including reset and save) */
.game-action-button {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6em;
    padding: 10px 15px;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    margin: 0.5em 0.5em; /* Adjust margin for spacing between buttons */
}

#reset-button {
    background-color: #ff4d4d;
}

#reset-button:hover {
    background-color: #cc0000;
    transform: translateY(-2px);
}

#save-button {
    background-color: #4CAF50; /* Green for save button */
}

#save-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

#clicker-area-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 2em auto; /* Add margin to give space for orbiting hedgehogs */
}

#clicker-target {
    width: 250px;
    cursor: pointer;
    transition: transform 0.1s ease;
}

#clicker-target:active {
    transform: scale(0.9);
}

.orbit-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: orbit linear infinite;
    pointer-events: none; /* Make sure they don't block clicks on the main target */
}

.orbiting-hedgehog {
    position: absolute;
    /* Positioned on the orbit path, offset by half its size */
    top: -25px; 
    left: 50%;
    margin-left: -25px;
    width: 50px;
    height: 50px;
    background-image: url('/1000015114-removebg-preview.png');
    background-size: contain;
    background-repeat: no-repeat;
    animation: self-spin linear infinite 4s; /* Default self-rotation */
}

@keyframes orbit {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes self-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

#shop-container {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 1.5em;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

#shop-container h2 {
    margin-top: 0;
    text-align: center;
}

.shop-item {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 1em;
    border-radius: 8px;
    margin-bottom: 1em;
    border: 1px solid #ddd;
}

.shop-item h3 {
    margin: 0 0 0.5em 0;
    font-family: 'Roboto', sans-serif;
    color: var(--primary-color);
    color: #2E8B57; /* SeaGreen */
}

.shop-item p {
    margin: 0 0 1em 0;
    font-size: 0.9em;
    color: #666;
}

.shop-item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    font-weight: bold;
}

.shop-item button {
    padding: 8px 16px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7em;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.shop-item button:hover:not(:disabled) {
    background-color: #4CAF50;
}

.shop-item button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.hidden {
    display: none !important;
}