.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* SEO-friendly heading styles */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
}

/* Schema.org semantic markup styles */
[itemtype="https://schema.org/WebPage"] {
    display: block;
}

[itemtype="https://schema.org/Game"] {
    display: block;
    width: 100%;
    height: 100%;
}

/* Game UI and Layout Styles (migrated from index.html) */
body {
    margin: 0;
    padding: 0;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Courier New', monospace;
    overflow: hidden;
}
#game-container {
    border: 2px solid #333;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    position: relative;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #001122;
    overflow: hidden;
}
#game {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
#orientation-message {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    color: #00ffff;
    font-size: 1.2em;
    text-align: center;
    padding: 20px;
}
#mobile-controls {
    display: none !important; /* Hide by default and override other display rules */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10002;
    touch-action: none;
    width: 180px;
    height: 180px;
}

/* Only show mobile controls when game is running and virtual controls are enabled */
body.game-running #mobile-controls.virtual-controls {
    display: flex !important;
}

/* Hide mobile controls in portrait mode even if game is running */
body.portrait #mobile-controls {
    display: none !important;
}
.control-button {
    width: 50px;
    height: 50px;
    background: rgba(0, 255, 255, 0.2);
    border: 2px solid #00ffff;
    border-radius: 50%;
    position: absolute;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: #00ffff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    transition: all 0.15s ease-out;
}
/* Control button positions */
#leftBtn {
    left: 10px;
    top: 65px;
}
#rightBtn {
    left: 120px;
    top: 65px;
}
#upBtn {
    left: 65px;
    top: 10px;
}
#downBtn {
    left: 65px;
    top: 120px;
}
#dashBtn {
    left: 120px;
    top: 120px;
    background: rgba(255, 0, 255, 0.2);
    border-color: #ff00ff;
}
#dashBtn::before {
    content: "⚡";
    font-size: 24px;
    color: #ff00ff;
}
.cooldown-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: rgba(0, 0, 0, 0.5);
    transition: height 0.1s linear;
    border-radius: 0 0 25px 25px;
    pointer-events: none;
}
.dash-button[data-cooldown="true"] {
    opacity: 0.6;
}
.dash-button[data-cooldown="true"] .cooldown-overlay {
    height: 100%;
}
/* Arrow icons */
.control-button::after {
    content: '';
    width: 0;
    height: 0;
    border: 8px solid transparent;
    position: absolute;
    transition: all 0.15s ease-out;
}

/* Arrow color transition on hover/focus */
#leftBtn:hover::after,
#leftBtn:focus::after {
    border-right-color: #00ffff;
    opacity: 0.8;
}
#rightBtn:hover::after,
#rightBtn:focus::after {
    border-left-color: #00ffff;
    opacity: 0.8;
}
#upBtn:hover::after,
#upBtn:focus::after {
    border-bottom-color: #00ffff;
    opacity: 0.8;
}
#downBtn:hover::after,
#downBtn:focus::after {
    border-top-color: #00ffff;
    opacity: 0.8;
}

/* Pressed state arrow colors */
.control-button[aria-pressed="true"]::after {
    opacity: 1;
    filter: brightness(1.2);
}
#leftBtn::after {
    border-right-color: #00ffff;
    right: 55%;
}
#rightBtn::after {
    border-left-color: #00ffff;
    left: 55%;
}
#upBtn::after {
    border-bottom-color: #00ffff;
    bottom: 55%;
}
#downBtn::after {
    border-top-color: #00ffff;
    top: 55%;
    transition: border-color 0.15s ease-out;
}
/* Button press effect */
.control-button:hover, .control-button:focus {
    background: rgba(0, 255, 255, 0.3);
    outline: 2px solid #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}
.control-button:active {
    background: rgba(0, 255, 255, 0.4);
    transform: scale(0.95);
}
.control-button[aria-pressed="true"] {
    background: rgba(0, 255, 255, 0.4);
    transform: scale(0.95);
    box-shadow: inset 0 0 15px rgba(0, 255, 255, 0.6);
    transition: all 0.1s ease-out;
}
/* We will enforce these styles via JavaScript based on device detection */
.mobile-device .menu-overlay {
    padding: 15px;
    font-size: 14px;
}
.mobile-device .menu-button {
    min-width: 120px;
    padding: 10px;
    margin: 4px;
    font-size: 14px;
}
.mobile-device .ui-overlay {
    font-size: 12px;
}
.mobile-device #mobile-controls.virtual-controls {
    display: flex;
}
.mobile-device.portrait #orientation-message {
    display: flex;
}
.mobile-device.portrait #game-container {
    display: none;
}
.ui-overlay {
    position: fixed;
    top: 10px;
    left: 10px;
    color: #00ffff;
    font-size: 14px;
    z-index: 10001;
    pointer-events: none;
}

.dash-indicator {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dash-indicator-icon {
    width: 20px;
    height: 20px;
    background: rgba(0, 255, 255, 0.2);
    border: 2px solid #00ffff;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.dash-indicator-icon::before {
    content: "⚡";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #00ffff;
    font-size: 12px;
}

.dash-indicator-icon[data-cooldown="true"] {
    border-color: rgba(0, 255, 255, 0.3);
    opacity: 0.6;
}

.dash-indicator-icon[data-cooldown="true"]::before {
    opacity: 0.3;
}

/* Combo System Styles */
#combo-count {
    font-weight: bold;
    color: #ffff00;
    transition: transform 0.2s ease, font-size 0.2s ease;
}

#combo-multiplier {
    font-weight: bold;
    color: #ff00ff;
    margin-left: 5px;
    transition: transform 0.2s ease, font-size 0.2s ease;
}

.combo-timer {
    width: 100px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: 5px;
    position: relative;
    overflow: hidden;
}

.combo-timer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: #ffff00;
    transform-origin: left;
    transform: scaleX(var(--progress, 1));
    transition: transform 0.1s linear;
}

/* New combo animation classes */
.combo-pulse {
    animation: combo-pulse 0.3s ease;
}

.combo-milestone {
    animation: combo-milestone 0.5s ease;
}

.combo-container {
    position: relative;
}

.combo-popup {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffff00;
    font-weight: bold;
    font-size: 16px;
    opacity: 0;
    pointer-events: none;
    text-shadow: 0 0 5px #ff00ff;
    animation: combo-popup 1s ease-out forwards;
}

@keyframes combo-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

@keyframes combo-milestone {
    0% { transform: scale(1); color: #ffff00; }
    25% { transform: scale(1.8); color: #ff00ff; }
    50% { transform: scale(1.5); color: #00ffff; }
    75% { transform: scale(1.3); color: #ff00ff; }
    100% { transform: scale(1); color: #ffff00; }
}

@keyframes combo-popup {
    0% { opacity: 0; transform: translate(-50%, 0); }
    20% { opacity: 1; transform: translate(-50%, -20px); }
    80% { opacity: 1; transform: translate(-50%, -30px); }
    100% { opacity: 0; transform: translate(-50%, -40px); }
}
.menu-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border: 2px solid #00ffff;
    border-radius: 10px;
    color: #00ffff;
    text-align: center;
    z-index: 10001;
    display: none;
    max-width: 80%;
    max-height: 80vh;
    overflow-y: auto;
}

.menu-overlay p {
    margin: 10px 0;
    line-height: 1.4;
}

.menu-button {
    min-width: 150px;
    margin: 8px;
}
.menu-button {
    background: #003333;
    border: 1px solid #00ffff;
    color: #00ffff;
    padding: 8px 16px;
    margin: 5px;
    cursor: pointer;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
}
.menu-button:hover {
    background: #006666;
}
.game-buttons {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 10000;
}
#fullscreenBtn {
    display: none;
}
.mobile-device #fullscreenBtn {
    display: inline-block;
}
.game-buttons button {
    background: #003333;
    border: 1px solid #00ffff;
    color: #00ffff;
    padding: 6px 12px;
    margin: 2px;
    cursor: pointer;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}
.game-buttons button:hover {
    background: #006666;
}

/* Splash Screen Styles */
#splash-screen {
    background: rgba(0, 0, 0, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20000;
    margin: 0;
    padding: 0;
    opacity: 1;
    transition: all 0.8s ease-in-out;
    pointer-events: all;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: opacity, transform;
}

#splash-screen.fade-out {
    opacity: 0;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(90%, 600px);
    padding: clamp(20px, 5vw, 40px);
    border: 2px solid #00ffff;
    border-radius: 20px;
    background: rgba(0, 17, 34, 0.9);
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.2);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(0);
    -webkit-transform: translate(-50%, -50%) translateZ(0);
}

.splash-logo {
    display: block;
    width: min(300px, 80%);
    height: auto;
    margin: 0 auto clamp(20px, 5vh, 40px);
    animation: pulse 2s infinite;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.5));
}

.press-start {
    color: #00ffff;
    font-size: clamp(18px, 4vw, 28px);
    font-weight: bold;
    letter-spacing: 2px;
    animation: blink 2s infinite;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    margin-bottom: clamp(10px, 3vh, 20px);
    padding: clamp(5px, 2vw, 10px);
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
    text-align: center;
    width: 100%;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Native Banner Ad Styling */
.ad-container {
    margin: 15px 0;
    padding: 10px;
    background: rgba(0, 17, 34, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    width: 100%;
    max-width: 300px;
    min-height: 100px; /* 3:1 aspect ratio container */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.ad-container:hover {
    border-color: rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

/* Responsive ad container */
@media (max-width: 480px) {
    .ad-container {
        max-width: 90%;
        margin: 10px auto;
        padding: 8px;
    }
}

/* Ensure ad content fits properly */
#container-f269c33291e97cef8a362ec6cb2676a7 {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}
