/* 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(static/assets/default_100_percent/100-error-offline.png) 1x, url(static/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 {
  display: none;
}

@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;
}

        :root {
            --primary: #FFFF00;
            --primary-dark: #FFD700;
            --secondary: #1E90FF;
            --success: #06d6a0;
            --danger: #ef476f;
            --warning: #ffd166;
            --dark: #121212;
            --light: #1e1e1e;
            --gray: #2d2d2d;
            --text: #e0e0e0;
            --text-light: #a0a0a0;
            --card-bg: #1E1E1E;
            --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
            --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
            --transition: all 0.3s ease;
            --radius: 12px;
            --dark-card: #1E1E1E;
            --border: #36506b;
        }

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

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            line-height: 1.6;
            color: var(--text);
            background: var(--dark);
            min-height: 100vh;
            transition: var(--transition);
        }

        .page-container {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        .content-wrapper {
            flex: 1;
            padding: 20px;
            max-width: 900px;
            margin: 0 auto;
            width: 100%;
        }

        header {
            text-align: center;
            margin-bottom: 30px;
        }

        h1 {
            font-size: 2.5rem;
            margin-bottom: 10px;
            color: var(--primary);
            font-weight: 700;
        }

        .subtitle {
            font-size: 1.2rem;
            margin-bottom: 20px;
            max-width: 800px;
            margin-left: auto;
            margin-right: auto;
        }

        /* Game container with white background - FIXED */
        .game-native-container {
            margin: 20px 0;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: white;
            border-radius: 12px;
            padding: 15px;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
            overflow: hidden;
            min-height: 200px;
            position: relative;
        }

        /* Ensure game elements are contained properly */
        #main-frame-error {
            background: white !important;
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        .interstitial-wrapper {
            background: white !important;
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        /* Make sure game canvas has proper contrast and positioning */
        .runner-canvas {
            border-radius: 4px;
            margin: 0 auto;
            display: block;
        }

        /* Fix for the game container */
        #main-content {
            width: 100%;
            display: flex;
            justify-content: center;
        }

        .instructions {
            background: var(--card-bg);
            padding: 20px;
            border-radius: var(--radius);
            margin: 30px 0;
            box-shadow: var(--shadow);
            border: 1px solid var(--border);
        }

        .instructions h2 {
            color: var(--primary);
            margin-bottom: 15px;
            font-size: 1.5rem;
        }

        .instructions ul {
            padding-left: 20px;
            margin-bottom: 15px;
        }

        .instructions li {
            margin-bottom: 8px;
        }

        .seo-content {
            background: var(--card-bg);
            padding: 25px;
            border-radius: var(--radius);
            margin-bottom: 30px;
            box-shadow: var(--shadow);
            border: 1px solid var(--border);
        }

        .seo-content h2 {
            color: var(--primary);
            margin-bottom: 15px;
            font-size: 1.5rem;
        }

        .seo-content p {
            margin-bottom: 15px;
        }

        .attribution {
            background: var(--card-bg);
            padding: 15px;
            border-radius: var(--radius);
            margin-top: 20px;
            box-shadow: var(--shadow);
            border: 1px solid var(--border);
            display: inline-block;
            width: 100%!important;
            text-align: center;
        }

        @media (max-width: 768px) {
            .content-wrapper {
                padding: 15px;
            }
            
            h1 {
                font-size: 2rem;
            }
            
            .subtitle {
                font-size: 1rem;
            }
            
            .instructions, .seo-content {
                padding: 15px;
            }
            
            .game-native-container {
                padding: 10px;
            }
        }

#messageBox {
    position: absolute;
    inset: 0; /* shorthand for top:0; right:0; bottom:0; left:0 */
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7); /* dim background so white box is clear */
    z-index: 100;
    text-align: center;
}

.message-content {
    background: var(--card-bg);
    padding: 25px 20px;
    border-radius: 16px;
    max-width: 350px;      /* keeps content from overflowing */
    width: 90%;            /* responsive for mobile */
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.message-content h1 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 10px;
    word-wrap: break-word; /* ensures long text never overflows */
}

.message-content p {
    font-size: 1rem;
    margin-bottom: 15px;
}
        .niokbutton {
            width: 100px;
            height: 40px;
            background-color: var(--primary);
            border-radius: var(--radius);
            margin-top: 20px;
            cursor: pointer;
            display: flex;
            justify-content: center;
            align-items: center;
            color: var(--dark);
            font-weight: 600;
            transition: var(--transition);
            border: none;
            outline: none;
        }

        .niokbutton:hover {
            background-color: var(--primary-dark);
            transform: translateY(-2px);
        }

        .niokbutton:active {
            transform: translateY(0);
        }