/* style.css */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Light Theme (Default) */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f0f8ff;
    --text-primary: #0a1a2f;
    --text-secondary: #1e3a5f;
    --blue-primary: #1976d2;
    --blue-secondary: #64b5f6;
    --blue-light: #bbdefb;
    --blue-dark: #0d47a1;
    --card-bg: #ffffff;
    --border-color: #90caf9;
    --shadow-color: rgba(25, 118, 210, 0.15);
    --nav-bg: linear-gradient(135deg, #1976d2, #0d47a1);
    --snow-color: rgba(25, 118, 210, 0.3);
    --hover-bg: rgba(25, 118, 210, 0.1);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0a1929;
    --bg-secondary: #102a43;
    --text-primary: #e3f2fd;
    --text-secondary: #bbdefb;
    --blue-primary: #42a5f5;
    --blue-secondary: #1e88e5;
    --blue-light: #1e3a5f;
    --blue-dark: #0d47a1;
    --card-bg: #1e2a3a;
    --border-color: #2d4b6e;
    --shadow-color: rgba(66, 165, 245, 0.2);
    --nav-bg: linear-gradient(135deg, #0d2135, #051220);
    --snow-color: rgba(66, 165, 245, 0.4);
    --hover-bg: rgba(66, 165, 245, 0.15);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Snow Effect */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.snowflake {
    position: absolute;
    color: var(--blue-primary);
    font-size: 1.5rem;
    opacity: 0.5;
    animation: fall linear infinite;
    text-shadow: 0 0 5px var(--blue-light);
}

@keyframes fall {
    from {
        transform: translateY(-100vh) rotate(0deg);
    }

    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Header Styles */
.header {
    background: var(--nav-bg);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.company-name {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.3rem;
}

.company-tagline {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    text-align: center;
    font-style: italic;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}


.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    z-index: 101;
    transition: transform 0.3s ease;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

/* Navigation Icons */
.nav-icons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    min-width: 70px;
}

.nav-item span:first-child {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.nav-text {
    font-size: 0.8rem;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--hover-bg);
    transform: translateY(-2px);
}

.nav-item.active {
    background: var(--blue-light);
    color: var(--blue-dark);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Page Visibility */
.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hosting Section - Desktop Only */
.hosting-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--blue-light), var(--bg-secondary));
    border-radius: 20px;
    border: 2px solid var(--blue-primary);
}

.section-title {
    color: var(--blue-primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: bold;
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow-color);
    border: 2px solid var(--border-color);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--blue-primary);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    color: var(--blue-primary);
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* Quick Access */
.quick-access {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.quick-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.quick-item:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--blue-primary);
    box-shadow: 0 8px 20px var(--blue-primary);
}

.quick-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.quick-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.content-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.content-card:hover {
    transform: translateY(-5px);
    border-color: var(--blue-primary);
    box-shadow: 0 8px 25px var(--blue-primary);
}

.content-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-bottom: 2px solid var(--border-color);
}

.content-card h3 {
    padding: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* Settings Page */
.settings-container {
    max-width: 600px;
    margin: 2rem auto;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    border: 2px solid var(--border-color);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    border-bottom: 2px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.setting-icon {
    font-size: 1.8rem;
}

.setting-label {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--blue-primary);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* Language Select */
.language-select {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    outline: none;
}

.language-select:hover {
    border-color: var(--blue-primary);
}

/* Page Title */
.page-title {
    color: var(--blue-primary);
    font-size: 2rem;
    text-align: center;
    margin: 2rem 0;
    position: relative;
    padding-bottom: 1rem;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--blue-primary), transparent);
}

/* Desktop Only Class */
.desktop-only {
    display: block;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-icons {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--nav-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 100;
        animation: slideIn 0.4s ease-out;
    }

    .nav-icons.active {
        display: flex;
    }

    .nav-item {
        width: 80%;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(5px);
    }

    .nav-item span:first-child {
        font-size: 2.2rem;
    }

    .nav-text {
        font-size: 1.1rem;
    }

    @keyframes slideIn {
        from {
            transform: translateX(100%);
        }

        to {
            transform: translateX(0);
        }
    }

    .company-name {
        font-size: 1.5rem;
    }

    .nav-item {
        min-width: 50px;
        padding: 0.3rem 0.5rem;
    }

    .nav-item span:first-child {
        font-size: 1.5rem;
    }

    .nav-text {
        font-size: 0.7rem;
    }

    .quick-access {
        gap: 0.5rem;
    }

    .quick-icon {
        font-size: 2rem;
    }

    .quick-label {
        font-size: 0.8rem;
    }

    .settings-container {
        padding: 1rem;
    }

    .setting-label {
        font-size: 1rem;
    }

    /* Hide hosting section on mobile */
    .desktop-only {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .nav-icons {
        gap: 0.1rem;
        justify-content: space-between;
    }

    .nav-item {
        min-width: unset;
        flex: 1;
        padding: 0.3rem;
    }

    .nav-item span:first-child {
        font-size: 1.3rem;
    }

    .nav-text {
        font-size: 0.65rem;
    }

    .quick-access {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-card {
        padding: 1rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .game-container {
        padding: 15px;
        border-radius: 20px;
    }

    .ttt-cell {
        font-size: 2rem;
        border-radius: 10px;
    }
}

/* Very Small Devices */
@media screen and (max-width: 360px) {
    .company-name {
        font-size: 1.2rem;
    }

    .nav-text {
        display: none;
    }

    .nav-item span:first-child {
        font-size: 1.5rem;
        margin-bottom: 0;
    }
}

/* Loading Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--blue-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--blue-dark);
}

/* --- Game Container Visibility --- */
.game-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.game-view.active {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* --- Premium Tic Tac Toe Game Styles --- */

.game-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
}

.game-container {
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    border-radius: 30px;
    padding: 25px;
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.game-container:hover {
    transform: translateY(-5px);
    border-color: var(--blue-primary);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.game-header {
    text-align: center;
    margin-bottom: 25px;
}

.game-header h2 {
    font-size: 1.8rem;
    color: var(--blue-primary);
    margin-bottom: 15px;
    font-weight: 800;
}

.score-board {
    display: flex;
    justify-content: space-around;
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 20px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.player-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.score-item span:last-child {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--blue-primary);
}

.ttt-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
    aspect-ratio: 1;
}

.ttt-cell {
    background: var(--bg-secondary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    box-shadow: 0 4px 10px var(--shadow-color);
}

.ttt-cell:hover {
    transform: scale(1.05);
    border-color: var(--blue-secondary);
}

.ttt-cell.x {
    color: #ff4757;
    text-shadow: 0 0 10px rgba(255, 71, 87, 0.2);
}

.ttt-cell.o {
    color: #2ed573;
    text-shadow: 0 0 10px rgba(46, 213, 115, 0.2);
}

.ttt-cell.win {
    background: var(--blue-primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--blue-primary);
}

.game-controls {
    text-align: center;
    margin-top: 15px;
}

.game-status {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.btn-primary {
    background: var(--blue-primary);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.btn-primary:hover {
    background: var(--blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-color);
}

/* --- Game Selection Styles --- */
.game-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.selector-btn {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.selector-btn.active {
    background: var(--blue-primary);
    color: white;
    border-color: var(--blue-primary);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.game-view {
    display: none;
}

.game-view.active {
    display: block;
}

/* --- Balloon Pop Game Styles --- */
.balloon-game-box {
    width: 100%;
    max-width: 450px;
    height: 600px;
    background: #87CEEB;
    /* Sky Blue */
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 15px 40px var(--shadow-color);
}

.sky-background {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #1E90FF, #87CEEB);
    position: relative;
}

.clouds {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/clouds.png');
    opacity: 0.3;
    pointer-events: none;
}

.balloon-area {
    width: 100%;
    height: 100%;
    position: relative;
}

.balloon {
    position: absolute;
    width: 60px;
    height: 75px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    cursor: pointer;
    bottom: -100px;
    transition: transform 0.1s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.balloon::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 50px;
    background: rgba(255, 255, 255, 0.6);
    bottom: -45px;
    left: 50%;
}

/* Balloon Colors */
.balloon.red {
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #c0392b);
}

.balloon.blue {
    background: radial-gradient(circle at 30% 30%, #54a0ff, #2980b9);
}

.balloon.green {
    background: radial-gradient(circle at 30% 30%, #1dd1a1, #27ae60);
}

.balloon.yellow {
    background: radial-gradient(circle at 30% 30%, #feca57, #f39c12);
}

.balloon.danger {
    background: radial-gradient(circle at 30% 30%, #2f3640, #000);
    border: 2px solid red;
}

.balloon.pop {
    animation: pop 0.2s forwards;
    pointer-events: none;
}

@keyframes pop {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.balloon-hud {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.balloon-score {
    background: rgba(255, 255, 255, 0.8);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    color: #2c3e50;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 20px;
    z-index: 20;
    transition: opacity 0.3s ease;
}

.game-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.game-overlay h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 0 10px var(--blue-primary);
}

.game-overlay p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.difficulty-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.diff-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 8px 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.diff-btn.active {
    background: var(--blue-primary);
    border-color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--blue-primary);
}

/* Explosion Effects */
.explosion-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 15;
}

.fire-particle {
    background: radial-gradient(circle, #ff9f43, #ee5253);
    animation: fireOut 0.6s ease-out forwards;
}

@keyframes fireOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

.game-container.shake,
.balloon-game-box.shake {
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Audio Card Styles */
.audio-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
}

.audio-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.audio-icon {
    font-size: 2.5rem;
}

.audio-text h3 {
    margin: 0;
    font-size: 1.1rem;
}

.audio-text p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    opacity: 0.7;
}

.audio-player {
    width: 100%;
    height: 35px;
    border-radius: 10px;
}

/* Theme adjustments for audio players */
[data-theme="dark"] .audio-player {
    filter: invert(100%) hue-rotate(180deg) brightness(1.5);
}

/* Mobile adjustments for balloon game */
@media screen and (max-width: 480px) {
    .balloon-game-box {
        height: 500px;
    }

    .game-overlay h2 {
        font-size: 1.8rem;
    }
}

/* Premium Game Overlays */
.game-overlay {
    background: rgba(13, 17, 23, 0.7) !important;
    backdrop-filter: blur(8px) saturate(150%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-overlay h2 {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #fff, #4ec0ca);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

/* Flappy Bird Pixel Art Styles */
.flappy-game-box {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 500px;
    background: linear-gradient(to bottom, #4ec0ca 0%, #d2f1f4 100%);
    border-radius: 20px;
    overflow: hidden;
    margin: 0 auto;
    border: 4px solid #543847;
    image-rendering: pixelated;
    box-shadow: 0 0 50px rgba(78, 192, 202, 0.3), inset 0 0 100px rgba(0, 0, 0, 0.5);
}

.flappy-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    pointer-events: none;
}

.flappy-bg div {
    position: absolute;
    width: 200%;
    height: 100%;
    background-repeat: repeat-x;
}

.flappy-clouds-far {
    background: radial-gradient(circle at 20% 40%, rgba(255, 255, 255, 0.4) 30px, transparent 30px);
    background-size: 600px 100%;
    opacity: 0.4;
    z-index: 1;
}

.flappy-clouds-near {
    background: radial-gradient(circle at 60% 30%, rgba(255, 255, 255, 0.6) 40px, transparent 40px);
    background-size: 400px 100%;
    opacity: 0.7;
    z-index: 2;
}

.flappy-city {
    position: absolute;
    bottom: 50px;
    left: 0;
    width: 100%;
    height: 120px !important;
    background: repeating-linear-gradient(to right,
            rgba(39, 174, 96, 0.3) 0,
            rgba(39, 174, 96, 0.3) 30px,
            transparent 30px,
            transparent 100px);
    /* Matching sky to keep it clean */
    opacity: 1;
    z-index: 3;
}

.flappy-bushes {
    position: absolute;
    width: 100%;
    background: radial-gradient(circle at 50% 100%, #2ecc71 40px, transparent 40px);
    background-size: 150px 60px;
    height: 60px !important;
    bottom: -10px;
    opacity: 0.8;
    bottom: 0px;
    z-index: 4;
}

.flappy-pixel-overlay {
    background: rgba(78, 192, 202, 0.4);
    backdrop-filter: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.flappy-logo {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 4px 4px 0 #543847,
        -2px -2px 0 #543847,
        2px -2px 0 #543847,
        -2px 2px 0 #543847,
        0 4px 0 #543847;
    letter-spacing: 2px;
    font-family: 'Courier New', Courier, monospace;
}

.flappy-start-btn {
    padding: 15px 40px;
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    background: #e67e22;
    border: 4px solid #fff;
    border-radius: 10px;
    box-shadow: 0 6px 0 #d35400, 0 10px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    font-family: 'Courier New', Courier, monospace;
}

.flappy-start-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #d35400;
}

.flappy-game-box canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
}

/* Balloon Pop Polish */
.balloon {
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.3));
}

.balloon::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 15%;
    width: 20%;
    height: 30%;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    filter: blur(2px);
}

.balloon.danger {
    box-shadow: 0 0 15px #f85149;
    animation: danger-pulse 1s infinite alternate;
}

@keyframes danger-pulse {
    from {
        transform: scale(1);
        filter: brightness(1);
    }

    to {
        transform: scale(1.1);
        filter: brightness(1.3);
    }
}

/* Tic Tac Toe Polish */
.ttt-cell.win {
    background: rgba(46, 204, 113, 0.2);
    box-shadow: inset 0 0 15px rgba(46, 204, 113, 0.4);
    animation: win-pulse 1s infinite alternate;
}

@keyframes win-pulse {
    from {
        opacity: 0.7;
    }

    to {
        opacity: 1;
        transform: scale(1.02);
    }
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* --- Snow Effect --- */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: var(--snow-color);
    user-select: none;
    pointer-events: none;
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes fall {
    0% {
        transform: translateY(-20px) translateX(0);
    }

    50% {
        transform: translateY(50vh) translateX(20px);
    }

    100% {
        transform: translateY(100vh) translateX(-20px);
    }
}

/* Flappy Pipe Premium Caps */
.flappy-pipe-cap {
    background: #27ae60;
    border: 4px solid #1a5a25;
    position: absolute;
    width: calc(100% + 10px);
    left: -5px;
    height: 25px;
}

/* Invincibility Flicker */
@keyframes flicker {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
    }
}

.invincible-flicker {
    animation: flicker 0.2s infinite;
}

@keyframes victory-flash {
    0% {
        background-color: transparent;
    }

    50% {
        background-color: rgba(255, 215, 0, 0.5);
    }

    100% {
        background-color: transparent;
    }
}

.ttt-cell.win-flash {
    animation: victory-flash 0.5s 4;
}

/* New Games Styling */
.game-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

#dino-canvas {
    background: linear-gradient(to bottom, #f7f7f7 0%, #e0e0e0 100%);
    border-bottom: 4px solid #543847;
}

/* Ensure HUD works for all games */
.game-hud {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 5;
}

.game-hud .score-item {
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    backdrop-filter: blur(5px);
}

/* Whack-A-Mole / Snake Shared Box Styling */
.whack-game-box {
    background-color: #8B4513;
    /* Mud/Dirt background */
    width: 400px;
    height: 400px;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1;
    /* Maintain square shape */
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

#snake-canvas {
    background-color: #000;
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.mole-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
    height: 100%;
}

.mole-hole {
    background-color: #3e2723;
    /* Darker dirt for hole */
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 10px 15px rgba(0, 0, 0, 0.8);
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="orange" d="M3 14l5-5 5 5-5 5-5-5zm16-8l-8 8 2 2 8-8-2-2z"/></svg>') 16 16, pointer;
    /* Basic hammer cursor */
}

/* Base mole style - hidden */
.mole {
    background-color: #6d4c41;
    /* Brown mole */
    width: 60%;
    height: 80%;
    position: absolute;
    bottom: -100%;
    /* Hidden below hole */
    left: 20%;
    border-radius: 50% 50% 0 0;
    transition: bottom 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Simple face */
    background-image:
        radial-gradient(circle at 35% 30%, #000 4px, transparent 4px),
        /* Left eye */
        radial-gradient(circle at 65% 30%, #000 4px, transparent 4px),
        /* Right eye */
        radial-gradient(circle at 50% 50%, pink 6px, transparent 6px);
    /* Nose */
}

/* Active mole style - shown */
.mole.up {
    bottom: 0;
}

/* Hit mole visual feedback */
.mole.hit {
    background-color: #e53935;
    /* Red flash when hit */
    background-image:
        linear-gradient(45deg, transparent 45%, #000 45%, #000 55%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, #000 45%, #000 55%, transparent 55%);
    background-position: center 30%;
    background-size: 20px 20px;
    background-repeat: no-repeat;
}

/* Snake Game Styling */
.snake-game-box {
    background-color: #222;
    /* Dark background */
    width: 400px;
    height: 400px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    transform: none !important;
}

#snake-canvas {
    background: #000;
    /* Black canvas for snake */
    border: 2px solid #333;
}