/* Copyright 2013 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file. */

html, body {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
}

.icon {
  -webkit-user-select: none;
  user-select: none;
  display: inline-block;
}

.icon-offline {
  content: -webkit-image-set( url(assets/default_100_percent/100-error-offline.png) 1x, url(assets/default_200_percent/200-error-offline.png) 2x);
  position: relative;
}

.hidden {
  display: none;
}


/* Offline page */

.offline .interstitial-wrapper {
  color: #2b2b2b;
  font-size: 1em;
  line-height: 1.55;
  margin: 0 auto;
  max-width: 600px;
  padding-top: 100px;
  width: 100%;
}

.offline .runner-container {
  height: 150px;
  max-width: 600px;
  overflow: hidden;
  position: absolute;
  top: 35px;
  width: 44px;
}

.offline .runner-canvas {
  height: 150px;
  max-width: 600px;
  opacity: 1;
  overflow: hidden;
  position: absolute;
  top: 0;
  z-index: 2;
}

.offline .controller {
  background: rgba(247, 247, 247, .1);
  height: 100vh;
  left: 0;
  position: absolute;
  top: 0;
  width: 100vw;
  z-index: 1;
}

#offline-resources {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  left: -9999px;
}

@media (max-width: 420px) {
  .suggested-left > #control-buttons, .suggested-right > #control-buttons {
    float: none;
  }
  .snackbar {
    left: 0;
    bottom: 0;
    width: 100%;
    border-radius: 0;
  }
}

@media (max-height: 350px) {
  h1 {
    margin: 0 0 15px;
  }
  .icon-offline {
    margin: 0 0 10px;
  }
  .interstitial-wrapper {
    margin-top: 5%;
  }
  .nav-wrapper {
    margin-top: 30px;
  }
}

@media (min-width: 600px) and (max-width: 736px) and (orientation: landscape) {
  .offline .interstitial-wrapper {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (min-width: 420px) and (max-width: 736px) and (min-height: 240px) and (max-height: 420px) and (orientation:landscape) {
  .interstitial-wrapper {
    margin-bottom: 100px;
  }
}

@media (min-height: 240px) and (orientation: landscape) {
  .offline .interstitial-wrapper {
    margin-bottom: 90px;
  }
  .icon-offline {
    margin-bottom: 20px;
  }
}

@media (max-height: 320px) and (orientation: landscape) {
  .icon-offline {
    margin-bottom: 0;
  }
  .offline .runner-container {
    top: 10px;
  }
}

@media (max-width: 240px) {
  .interstitial-wrapper {
    overflow: inherit;
    padding: 0 8px;
  }
}

.arcade-mode,
.arcade-mode .runner-container,
.arcade-mode .runner-canvas {
  image-rendering: pixelated;
  max-width: 100%;
  overflow: hidden;
}

.arcade-mode #buttons,
.arcade-mode #main-content {
  opacity: 0;
  overflow: hidden;
}

.arcade-mode .interstitial-wrapper {
  height: 100vh;
  max-width: 100%;
  overflow: hidden;
}

.arcade-mode .runner-container {
  left: 0;
  margin: auto;
  right: 0;
  transform-origin: top center;
  transition: transform 250ms cubic-bezier(0.4, 0, 1, 1) 400ms;
  z-index: 2;
}

/* Fullscreen Dynamic Background Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.offline .interstitial-wrapper {
  position: relative;
  z-index: 5;
}

/* Home Button */
.home-btn {
  position: fixed;
  top: 18px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.75);
  color: #f8fafc;
  text-decoration: none;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.home-btn:hover {
  background: rgba(15, 23, 42, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  color: #00f2fe;
  border-color: rgba(0, 242, 254, 0.6);
}

/* Theme HUD Indicator (Top Right) */
.theme-indicator {
  position: fixed;
  top: 18px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 9999;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  transition: all 0.3s ease;
  user-select: none;
}

.theme-indicator-icon {
  font-size: 20px;
  line-height: 1;
}

.theme-indicator-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.theme-indicator-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.theme-indicator-sub {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
}

/* Milestone Celebratory Toast Banner */
.theme-banner {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-120px) scale(0.9);
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(0, 242, 254, 0.5);
  border-radius: 20px;
  padding: 14px 28px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 242, 254, 0.3);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  text-align: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #ffffff;
  min-width: 260px;
}

.theme-banner.show {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
}

.banner-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffd700;
  margin-bottom: 4px;
}

.banner-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.banner-desc {
  font-size: 12px;
  color: #cbd5e1;
}

/* Start Message Box */
#messageBox {
  margin-top: 25px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  position: relative;
  z-index: 10;
}

#messageBox h1 {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: color 0.5s ease;
}

/* Theme-Specific Sprite & Element Colors */
.theme-daylight #messageBox h1 { color: #334155; text-shadow: none; }
.theme-sunset #messageBox h1 { color: #2d0f3c; text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.theme-aurora #messageBox h1 { color: #e2e8f0; text-shadow: 0 0 15px rgba(0, 242, 254, 0.8); }
.theme-snow #messageBox h1 { color: #f8fafc; text-shadow: 0 0 12px rgba(255, 255, 255, 0.8); }
.theme-cyberpunk #messageBox h1 { color: #00f2fe; text-shadow: 0 0 15px #f72585; }
.theme-sakura #messageBox h1 { color: #831843; text-shadow: 0 0 8px rgba(255, 182, 193, 0.6); }
.theme-galaxy #messageBox h1 { color: #e0aaff; text-shadow: 0 0 15px #c77dff; }
.theme-emerald #messageBox h1 { color: #a7f3d0; text-shadow: 0 0 12px #10b981; }

/* Canvas Filters per Theme */
.theme-daylight .runner-canvas { filter: none; }
.theme-sunset .runner-canvas { filter: brightness(0.18) drop-shadow(0 0 6px rgba(255, 100, 0, 0.45)); }
.theme-aurora .runner-canvas { filter: invert(1) brightness(1.2) drop-shadow(0 0 10px rgba(0, 242, 254, 0.75)); }
.theme-snow .runner-canvas { filter: invert(1) brightness(1.25) drop-shadow(0 0 8px rgba(255, 255, 255, 0.9)); }
.theme-cyberpunk .runner-canvas { filter: invert(1) sepia(1) hue-rotate(130deg) saturate(3.5) drop-shadow(0 0 12px #00f2fe); }
.theme-sakura .runner-canvas { filter: brightness(0.25) drop-shadow(0 0 4px rgba(255, 105, 180, 0.4)); }
.theme-galaxy .runner-canvas { filter: invert(1) brightness(1.2) drop-shadow(0 0 10px rgba(192, 132, 252, 0.8)); }
.theme-emerald .runner-canvas { filter: invert(1) sepia(1) hue-rotate(75deg) saturate(3.5) drop-shadow(0 0 10px #34d399); }

@media (max-width: 600px) {
  .home-btn { top: 12px; left: 12px; padding: 7px 12px; font-size: 11px; }
  .theme-indicator { top: 12px; right: 12px; padding: 6px 10px; }
  .theme-indicator-sub { display: none; }
  .theme-banner { top: 60px; width: 85%; min-width: auto; padding: 10px 18px; }
}



