/* 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: relative;
  margin: 60px auto 20px auto;
  width: 44px;
}

.offline .runner-canvas {
  width: 100%;
  height: 100%;
  opacity: 1;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 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: auto;
  max-width: 100%;
  overflow: visible;
}

.arcade-mode .runner-container {
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  margin: 60px auto 20px auto !important; /* Raised position slightly */
  transform: none !important;
  width: 95% !important;
  max-width: 1400px !important; /* Fill screen dynamically up to 1400px */
  height: auto !important;
  aspect-ratio: 4 / 1 !important; /* Preserve aspect ratio of original game canvas */
  z-index: 2;
}

.arcade-mode .runner-canvas {
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
}

/* Background themes and transition settings */
body {
  transition: background 1.5s ease, color 1.5s ease;
}

#bg-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* 1. Default Background (0+) */
body.bg-default {
  background: #f7f7f7;
}

/* 2. Sunset Background (100+) */
body.bg-sunset {
  background: linear-gradient(180deg, #ff5e62, #ff9966, #ffafbd);
}
.sunset-sun {
  display: none;
  position: absolute;
  bottom: 25%;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, #fffc00 20%, #ff8500 70%, transparent 100%);
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0.85;
  animation: floatSun 8s ease-in-out infinite alternate;
}
body.bg-sunset .sunset-sun {
  display: block;
}
@keyframes floatSun {
  0% { transform: translate(-50%, 0px); }
  100% { transform: translate(-50%, -15px); }
}

/* 3. Night Background (200+) */
body.bg-night {
  background: linear-gradient(180deg, #0b132b, #1c2541, #3a506b);
}
.moon {
  display: none;
  position: absolute;
  top: 15%;
  right: 15%;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, #ffffd0 40%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255,255,240,0.5);
}
body.bg-night .moon {
  display: block;
}

/* Twinkling Stars (Night & Space) */
.stars {
  display: none;
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(white, rgba(255,255,255,.3) 1.5px, transparent 30px),
              radial-gradient(white, rgba(255,255,255,.2) 1px, transparent 20px),
              radial-gradient(white, rgba(255,255,255,.15) 2px, transparent 40px);
  background-size: 550px 550px, 350px 350px, 250px 250px;
  background-position: 0 0, 40px 60px, 130px 270px;
  opacity: 0.6;
  animation: twinkle 10s linear infinite;
}
body.bg-night .stars, body.bg-space .stars {
  display: block;
}
@keyframes twinkle {
  0% { opacity: 0.4; }
  50% { opacity: 0.8; }
  100% { opacity: 0.4; }
}

/* 4. City Background (300+) */
body.bg-city {
  background: linear-gradient(180deg, #09090e, #14142b, #2d1b4e);
}
.city-skyline {
  display: none;
  position: absolute;
  bottom: 0; left: 0; width: 100%; height: 100%;
}
body.bg-city .city-skyline {
  display: block;
}
.city-skyline .building {
  position: absolute;
  bottom: 0;
  background: #110e24;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  box-shadow: inset 0 20px 30px rgba(0,0,0,0.8);
}
.city-skyline .building::after {
  content: '';
  position: absolute;
  top: 15px; left: 10px; right: 10px; bottom: 10px;
  background-image: 
    radial-gradient(circle, #ffed4a 1.5px, transparent 2.5px),
    radial-gradient(circle, #ff72ca 1.5px, transparent 2.5px);
  background-size: 15px 25px;
  background-position: 0 0, 8px 12px;
  opacity: 0.75;
  animation: windowBlink 4s infinite alternate;
}
@keyframes windowBlink {
  0% { opacity: 0.4; }
  50% { opacity: 0.9; }
  100% { opacity: 0.5; }
}

/* 5. Desert Background (400+) */
body.bg-desert {
  background: linear-gradient(180deg, #f3a152, #e27d3b, #c35c37);
}
.desert-sun {
  display: none;
  position: absolute;
  top: 15%;
  left: 20%;
  width: 90px;
  height: 90px;
  background: #fff5e6;
  border-radius: 50%;
  box-shadow: 0 0 40px #f4a261, 0 0 80px #e76f51;
  opacity: 0.95;
}
body.bg-desert .desert-sun {
  display: block;
}

/* 6. Space Background (500+) */
body.bg-space {
  background: radial-gradient(circle at 30% 20%, #10002b, #240046, #3c096c, #03001e);
  background-size: 200% 200%;
  animation: spaceGlow 15s ease infinite alternate;
}
.space-nebula {
  display: none;
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at 70% 60%, rgba(255, 0, 128, 0.15) 0%, transparent 60%),
              radial-gradient(circle at 20% 40%, rgba(0, 242, 254, 0.15) 0%, transparent 50%);
}
body.bg-space .space-nebula {
  display: block;
}
@keyframes spaceGlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* 7. Rain Background (600+) */
body.bg-rain {
  background: linear-gradient(180deg, #1f2d3d, #121a24, #080b10);
}
.rain {
  display: none;
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
}
body.bg-rain .rain {
  display: block;
}
.rain::after {
  content: '';
  position: absolute;
  top: -120px; left: 0; width: 100%; height: 100%;
  background-image: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 80%, rgba(255,255,255,0) 100%);
  background-size: 2px 80px;
  background-repeat: repeat;
  animation: rainFall 0.8s linear infinite;
}
.rain::before {
  content: '';
  position: absolute;
  top: -120px; left: 0; width: 100%; height: 100%;
  background-image: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0) 100%);
  background-size: 1.5px 60px;
  background-repeat: repeat;
  animation: rainFallFast 0.6s linear infinite;
}
@keyframes rainFall {
  0% { transform: translateY(0) rotate(-10deg); }
  100% { transform: translateY(600px) rotate(-10deg); }
}
@keyframes rainFallFast {
  0% { transform: translateY(0) rotate(-8deg); }
  100% { transform: translateY(700px) rotate(-8deg); }
}

/* 8. Snow Background (700+) */
body.bg-snow {
  background: linear-gradient(180deg, #1b263b, #0d1b2a, #0b090a);
}
.snow {
  display: none;
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
}
body.bg-snow .snow {
  display: block;
}
.snow::after {
  content: '';
  position: absolute;
  top: -100px; left: 0; width: 100%; height: 100%;
  background-image: 
    radial-gradient(circle, #fff 1.5px, transparent 2px),
    radial-gradient(circle, #fff 2.5px, transparent 3px);
  background-size: 120px 120px, 200px 200px;
  background-position: 0 0, 40px 60px;
  animation: snowFall 6s linear infinite;
}
.snow::before {
  content: '';
  position: absolute;
  top: -150px; left: 0; width: 100%; height: 100%;
  background-image: 
    radial-gradient(circle, #fff 2px, transparent 2.5px),
    radial-gradient(circle, rgba(255,255,255,0.8) 3px, transparent 4px);
  background-size: 150px 150px, 250px 250px;
  background-position: 20px 30px, 80px 100px;
  animation: snowFallSlow 9s linear infinite;
}
@keyframes snowFall {
  0% { transform: translate(0, 0); }
  50% { transform: translate(15px, 250px); }
  100% { transform: translate(0, 500px); }
}
@keyframes snowFallSlow {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-10px, 200px); }
  100% { transform: translate(0, 400px); }
}

/* Invert Game elements on dark backgrounds */
body.bg-night .runner-canvas,
body.bg-city .runner-canvas,
body.bg-space .runner-canvas,
body.bg-rain .runner-canvas,
body.bg-snow .runner-canvas {
  filter: invert(1);
}

/* Invert Text colors on dark backgrounds */
body.bg-night, body.bg-city, body.bg-space, body.bg-rain, body.bg-snow {
  color: #f7f7f7;
}
body.bg-night h1, body.bg-city h1, body.bg-space h1, body.bg-rain h1, body.bg-snow h1 {
  color: #f7f7f7 !important;
}

/* Modern Typography and Layout centering */
.interstitial-wrapper {
  position: relative;
  z-index: 2;
}
#messageBox {
  position: absolute;
  top: 22px;
  left: 25px;
  z-index: 40;
}
#messageBox h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.1);
  color: #535353;
  transition: color 1s ease;
}
body.bg-night #messageBox h1, 
body.bg-city #messageBox h1, 
body.bg-space #messageBox h1, 
body.bg-rain #messageBox h1, 
body.bg-snow #messageBox h1 {
  text-shadow: 0 2px 10px rgba(255,255,255,0.2);
}

/* Hide game when not logged in */
body.not-logged-in .interstitial-wrapper,
body.not-logged-in #messageBox {
  display: none !important;
}

/* Auth screen container */
#auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  pointer-events: auto;
  font-family: 'Open Sans', sans-serif;
  background: radial-gradient(circle at center, rgba(30, 30, 47, 0.4) 0%, rgba(11, 19, 43, 0.85) 100%);
  transition: opacity 0.5s ease;
}
body:not(.not-logged-in) #auth-container {
  display: none !important;
}

/* Auth Cards General Styles */
.auth-card {
  width: 380px;
  padding: 40px;
  border-radius: 20px;
  box-sizing: border-box;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

/* Visually Distinct: Login Card (Sleek Dark Cyber Theme) */
#login-card {
  background: rgba(22, 22, 37, 0.85);
  border: 1px solid rgba(0, 242, 254, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 242, 254, 0.15);
  color: #ffffff;
}
#login-card h2 {
  color: #00f2fe;
  font-size: 26px;
  margin: 10px 0;
  font-weight: 600;
}
#login-card p {
  color: #a0aec0;
  font-size: 13px;
  margin-bottom: 30px;
}
#login-card .input-group {
  border: 1px solid rgba(0, 242, 254, 0.2);
  background: rgba(255, 255, 255, 0.05);
}
#login-card .input-group:focus-within {
  border-color: #00f2fe;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}
#login-card .input-icon {
  color: #00f2fe;
}
#login-card input {
  color: #ffffff;
}
#login-card input::placeholder {
  color: #718096;
}
#login-card .auth-btn {
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  color: #000000;
  font-weight: 600;
}
#login-card .auth-btn:hover {
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}
#login-card .auth-switch {
  color: #a0aec0;
}
#login-card .auth-switch a {
  color: #00f2fe;
}

/* Visually Distinct: Signup Card (Warm Frosted Sunset Theme) */
#signup-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 94, 98, 0.25);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 0 25px rgba(255, 94, 98, 0.12);
  color: #2d3748;
}
#signup-card h2 {
  color: #ff5e62;
  font-size: 26px;
  margin: 10px 0;
  font-weight: 600;
}
#signup-card p {
  color: #718096;
  font-size: 13px;
  margin-bottom: 30px;
}
#signup-card .input-group {
  border: 1px solid rgba(255, 94, 98, 0.2);
  background: rgba(0, 0, 0, 0.03);
}
#signup-card .input-group:focus-within {
  border-color: #ff5e62;
  box-shadow: 0 0 10px rgba(255, 94, 98, 0.2);
}
#signup-card .input-icon {
  color: #ff5e62;
}
#signup-card input {
  color: #2d3748;
}
#signup-card input::placeholder {
  color: #a0aec0;
}
#signup-card .auth-btn {
  background: linear-gradient(135deg, #ff5e62, #ff9966);
  color: #ffffff;
  font-weight: 600;
}
#signup-card .auth-btn:hover {
  box-shadow: 0 0 15px rgba(255, 94, 98, 0.4);
}
#signup-card .auth-switch {
  color: #718096;
}
#signup-card .auth-switch a {
  color: #ff5e62;
}

/* Card Header & Layout Components */
.auth-header {
  margin-bottom: 25px;
}
.auth-title-icon {
  width: 42px;
  height: 42px;
  stroke-width: 1.5;
  margin-bottom: 10px;
}
.input-group {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 12px;
  margin-bottom: 20px;
  padding: 0 15px;
  height: 48px;
  transition: all 0.3s ease;
}
.input-icon {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  flex-shrink: 0;
}
.input-group input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  height: 100%;
  font-size: 14px;
}
.auth-error {
  color: #fc8181;
  font-size: 12px;
  text-align: left;
  margin-top: -10px;
  margin-bottom: 15px;
  min-height: 18px;
  font-weight: 500;
}
.auth-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.3s ease;
  margin-top: 10px;
}
.auth-btn i {
  width: 16px;
  height: 16px;
  margin-left: 8px;
  transition: transform 0.3s ease;
}
.auth-btn:hover i {
  transform: translateX(4px);
}
.auth-switch {
  font-size: 13px;
  margin-top: 25px;
}
.auth-switch a {
  text-decoration: none;
  font-weight: 600;
}
.auth-switch a:hover {
  text-decoration: underline;
}

/* User Dashboard Styling */
#user-dashboard {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  padding: 8px 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  font-family: 'Open Sans', sans-serif;
  color: #333333;
  transition: all 0.3s ease;
}
body.bg-night #user-dashboard,
body.bg-city #user-dashboard,
body.bg-space #user-dashboard,
body.bg-rain #user-dashboard,
body.bg-snow #user-dashboard {
  background: rgba(22, 22, 37, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}
.user-info, .user-score {
  display: flex;
  align-items: center;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}
.dashboard-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}
.trophy-gold {
  color: #ecc94b;
}
#logout-btn {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #e53e3e;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 15px;
  transition: background 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
#logout-btn:hover {
  background: rgba(229, 62, 62, 0.1);
}
#logout-btn i {
  width: 14px;
  height: 14px;
}

#main-page-btn {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #a0aec0; /* slate gray */
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 15px;
  transition: background 0.3s ease, color 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
#main-page-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
#main-page-btn i {
  width: 14px;
  height: 14px;
}

.dashboard-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Leaderboard Panel Styling */
#leaderboard {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 15px 25px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  font-family: 'Open Sans', sans-serif;
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

body.bg-night #leaderboard,
body.bg-city #leaderboard,
body.bg-space #leaderboard,
body.bg-rain #leaderboard,
body.bg-snow #leaderboard {
  background: rgba(22, 22, 37, 0.45);
  border-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.leaderboard-title-icon {
  width: 18px;
  height: 18px;
  color: #f6ad55; /* Warm gold/orange tint */
}

.leaderboard-header h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
  color: inherit;
}

#leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 180px;
  overflow-y: auto;
}

#leaderboard-list::-webkit-scrollbar {
  width: 6px;
}
#leaderboard-list::-webkit-scrollbar-track {
  background: transparent;
}
#leaderboard-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
#leaderboard-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

#leaderboard-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.3s ease;
  color: inherit;
}

#leaderboard-list li:hover {
  background: rgba(255, 255, 255, 0.06);
}

.rank-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

/* Rank-specific styling */
.rank-1 .rank-badge {
  background: linear-gradient(135deg, #ecc94b, #d69e2e);
  box-shadow: 0 0 10px rgba(236, 201, 75, 0.4);
}
.rank-2 .rank-badge {
  background: linear-gradient(135deg, #a0aec0, #718096);
}
.rank-3 .rank-badge {
  background: linear-gradient(135deg, #ed8936, #dd6b20);
}

.rank-username {
  font-weight: 600;
}

.rank-score {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: #f6ad55;
}
.rank-1 .rank-score {
  color: #ecc94b;
  text-shadow: 0 0 8px rgba(236, 201, 75, 0.3);
}

/* User Premium Info & Checkout styling */
.user-premium-info {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  flex-shrink: 0;
}

.user-premium-info #premium-icon {
  color: #a855f7; /* purple glow */
  filter: drop-shadow(0 0 4px rgba(168, 85, 247, 0.6));
}

body.premium-user .user-premium-info #premium-icon {
  color: #ecc94b; /* gold sparkles */
  filter: drop-shadow(0 0 6px rgba(236, 201, 75, 0.8));
}

#buy-premium-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

#buy-premium-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.6);
}

/* Custom Payment Modal Overlay */
.payment-modal-overlay.hidden {
  display: none !important;
}

.payment-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 19, 43, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.payment-modal-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.payment-modal-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  font-family: 'Open Sans', sans-serif;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.payment-modal-overlay:not(.hidden) .payment-modal-card {
  transform: scale(1);
}

body.bg-night .payment-modal-card,
body.bg-city .payment-modal-card,
body.bg-space .payment-modal-card,
body.bg-rain .payment-modal-card,
body.bg-snow .payment-modal-card {
  background: rgba(22, 22, 37, 0.6);
  border-color: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.payment-modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.payment-modal-icon {
  width: 40px;
  height: 40px;
  color: #ec4899;
  filter: drop-shadow(0 0 8px rgba(236, 72, 153, 0.5));
}

.payment-modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: inherit;
}

.payment-modal-body p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 25px 0;
  color: rgba(255, 255, 255, 0.85);
}

.payment-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-pay-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
  transition: all 0.3s ease;
}

.btn-pay-modal:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.6);
}

.btn-close-modal {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 14px;
  font-weight: 600;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-close-modal:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}
