* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Safe area insets for notched phones */
    --sat: env(safe-area-inset-top, 0px);
    --sar: env(safe-area-inset-right, 0px);
    --sab: env(safe-area-inset-bottom, 0px);
    --sal: env(safe-area-inset-left, 0px);
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #0a1628;
    /* Prevent text selection on mobile */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Prevent touch callout */
    -webkit-touch-callout: none;
    /* Prevent tap highlight */
    -webkit-tap-highlight-color: transparent;
}

#game-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Account for safe areas */
    padding: var(--sat) var(--sar) var(--sab) var(--sal);
}

#game-container canvas {
    display: block;
    margin: 0 auto;
    /* Prevent canvas from being selectable */
    -webkit-touch-callout: none;
    touch-action: none;
}

/* Touch device specific styles */
.touch-device #game-container canvas {
    /* Ensure touch events work properly */
    touch-action: none;
}

/* Mobile screen specific styles */
.mobile-screen #game-container {
    padding: 0;
}

/* Fullscreen mode */
#game-container:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    padding: 0;
}

#game-container:fullscreen {
    width: 100vw;
    height: 100vh;
    padding: 0;
}

/* Prevent pull-to-refresh on mobile */
body {
    overscroll-behavior-y: contain;
}

/* Fix for iOS Safari 100vh issue */
@supports (-webkit-touch-callout: none) {
    html, body, #game-container {
        height: -webkit-fill-available;
    }
}

/* No cookies banner */
#no-cookies-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 100%);
    color: #ffffff;
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    z-index: 10000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    border-top: 2px solid #ffd700;
}

#no-cookies-banner.hidden {
    display: none;
}

#no-cookies-banner span {
    display: flex;
    align-items: center;
    gap: 8px;
}

#no-cookies-banner button {
    background: #ffd700;
    color: #1a472a;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    transition: background 0.2s, transform 0.1s;
}

#no-cookies-banner button:hover {
    background: #ffec8b;
    transform: scale(1.05);
}
