:root {
  --site-name: "HaoHub";
  --primary: #1e293b;
  --accent: #38bdf8;
  --bg: #0f172a;
  --sources-featured-bg: transparent;
  --blue: #2563eb;
  --green: #22c55e;
  --red: #ef4444;
  --purple: #a21caf;
  --pink: #ec4899;
  --violet: #7c3aed;
  --orange: #f59e42;
  --text: #f1f5f9;
  --shadow: #38bdf855;
}

html, body {
   /* Hide scrollbars but keep functionality */
      scrollbar-width: none; /* Firefox */
      -ms-overflow-style: none; /* Internet Explorer 10+ */
      /* Disable text selection */
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
      /* Disable right-click context menu */
      -webkit-touch-callout: none;
      -webkit-tap-highlight-color: transparent;
      /* Improve mobile scrolling performance */
      -webkit-overflow-scrolling: touch;
      /* Prevent zoom on form focus for mobile */
      touch-action: manipulation;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}
/* --- FONT THEME: Green --- */
body.font-green {
  --accent: #22c55e;
  --shadow: #22c55e55;
}
/* --- FONT THEME: Red --- */
body.font-red {
  --accent: #ef4444;
  --shadow: #ef444455;
}
/* --- FONT THEME: Purple --- */
body.font-purple {
  --accent: #a21caf;
  --shadow: #a21caf55;
}
/* --- FONT THEME: Pink --- */
body.font-pink {
  --accent: #ec4899;
  --shadow: #ec489955;
}
/* --- FONT THEME: Violet --- */
body.font-violet {
  --accent: #7c3aed;
  --shadow: #7c3aed55;
}
/* --- FONT THEME: Orange --- */
body.font-orange {
  --accent: #f59e42;
  --shadow: #f59e4255;
}
/* --- COLOR THEME: Light --- */
body.theme-light {
  --bg: #f1f5f9;
  --primary: #e2e8f0;
  --text: #1e293b;
}
/* --- COLOR THEME: Dark (default) --- */
body.theme-dark {
  --bg: #0f172a;
  --primary: #1e293b;
  --text: #f1f5f9;
}
/* --- END THEMES --- */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 3vw;
  background: rgba(15, 23, 42, 0.75);
  box-shadow: 0 4px 24px #0003;
  animation: slideDown 1s cubic-bezier(0.77, 0, 0.18, 1);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s;
  backdrop-filter: blur(8px);
}
header.scrolled {
  background: rgba(30, 41, 59, 0.92);
}
@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.logo {
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent);
  letter-spacing: 2px;
  user-select: none;
  transition: text-shadow 0.3s;
  text-shadow: 0 2px 12px var(--shadow);
  -webkit-app-region: no-drag;
}
nav {
  display: flex;
  align-items: center;
}
nav a {
  color: var(--text);
  text-decoration: none;
  margin-left: 2rem;
  font-size: 1.1rem;
  position: relative;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
nav a.active {
  color: var(--accent);
}
nav a::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
  position: absolute;
  left: 0;
  bottom: -4px;
}
nav a:hover {
  color: var(--accent);
}
nav a:hover::after,
nav a.active::after {
  width: 100%;
}
/* Settings icon style */
.settings-icon {
  width: 2em;
  height: 2em;
  fill: var(--accent);
  display: block;
}
/* CHANGED: Transparent, icon-only settings button */
.theme-toggle-btn {
  background: transparent !important;
  border: none;
  box-shadow: none;
  padding: 0.3em;
  margin-left: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.theme-toggle-btn:hover {
  background: rgba(56, 189, 248, 0.08);
}
.theme-toggle-btn:active {
  background: rgba(56, 189, 248, 0.18);
}
/* --- END SETTINGS BUTTON --- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  animation: fadeIn 1.2s 0.2s both;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
  letter-spacing: 1px;
  animation: popIn 1s 0.5s both;
}
@keyframes popIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.hero p {
  font-size: 1.3rem;
  color: #cbd5e1;
  margin-bottom: 2rem;
  max-width: 600px;
}
.timer {
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 2rem;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  padding: 2rem 5vw;
  animation: fadeIn 1.2s 0.5s both;
}
.video-card {
  background: var(--primary);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 6px 32px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  animation: cardPop 0.7s cubic-bezier(0.77, 0, 0.18, 1);
}
.video-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 12px 40px var(--shadow);
}
@keyframes cardPop {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #334155;
}
.video-info {
  padding: 1rem;
}
.video-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--accent);
}
.video-desc {
  font-size: 0.95rem;
  color: #cbd5e1;
}
.media-player {
  width: 100%;
  max-width: 720px;
  margin: 2rem auto;
  background: var(--primary);
  border-radius: 1rem;
  box-shadow: 0 6px 32px var(--shadow);
  padding: 1rem;
}
.media-player iframe,
.media-player video {
  width: 100%;
  aspect-ratio: 16/9;
  height: auto;
  border-radius: 0.7rem;
  background: #000;
  display: block;
}
@media (max-width: 900px) {
  .media-player {
    max-width: 100vw;
    padding: 0.5rem;
  }
}
@media (max-width: 600px) {
  .hero h1 {
    font-size: 2rem;
  }
  .video-grid {
    padding: 1rem 2vw;
  }
  .media-player iframe,
  .media-player video {
    height: 180px;
  }
}
.video-credits {
  margin-top: 1.2rem;
  font-size: 0.97rem;
  color: #94a3b8;
  background: var(--bg);
  border-radius: 0.5rem;
  padding: 0.7rem 1rem;
  text-align: left;
}
.video-credits strong {
  color: var(--accent);
}
.video-sources {
  margin-top: 0.7rem;
  font-size: 0.95rem;
  color: #a3e635;
  background: var(--primary);
  border-radius: 0.4rem;
  padding: 0.5rem 0.8rem;
  text-align: left;
}
.video-sources strong {
  color: #bef264;
}
.video-sources a {
  color: var(--accent);
  text-decoration: underline;
  margin-right: 0.7em;
}
.video-sources.no-bg {
  background: none !important;
  padding-left: 0;
  padding-right: 0;
}
.search-bar {
  display: flex;
  justify-content: center;
  margin: 0 0 0 2rem;
  align-items: center;
  position: relative;
}
/* CHANGED: Remove search icon from input */
.search-bar input[type="search"] {
  width: 100%;
  max-width: 400px;
  padding: 0.7em 2.5em 0.7em 1em; /* left padding reduced */
  border-radius: 2em;
  border: none;
  font-size: 1.1rem;
  background: var(--primary);
  color: var(--text);
  box-shadow: 0 2px 8px var(--shadow);
  outline: none;
  transition: box-shadow 0.2s;
}
.search-bar input[type="search"]:focus {
  box-shadow: 0 4px 16px var(--shadow);
}
.search-btn {
  margin-left: 1rem;
  padding: 0.7em 1.5em;
  border-radius: 2em;
  border: none;
  font-size: 1.1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--shadow);
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.search-btn:hover {
  background: #0ea5e9;
}
/* --- CHANGED: Search clear button --- */
.search-clear-btn {
  position: absolute;
  right: 5.5em;
  background: none;
  border: none;
  cursor: pointer;
  top: 50%;
  transform: translateY(-50%);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2em;
  height: 2em;
}
.search-clear-btn svg {
  width: 1.2em;
  height: 1.2em;
  fill: var(--accent);
}
/* CHANGED: Remove search icon from input */
.search-icon {
  display: none !important;
}
@media (max-width: 700px) {
  header {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 2vw;
  }
  nav {
    justify-content: center;
    margin-bottom: 0.5rem;
  }
  .search-bar {
    margin: 1rem 0 0 0;
  }
}
/* --- Make navbar lighter in light mode and fix nav link hover color --- */
body.theme-light header {
  background: rgba(241, 245, 249, 0.97) !important;
  box-shadow: 0 4px 24px #cbd5e1;
}
body.theme-light nav a {
  color: #1e293b;
}
body.theme-light nav a.active,
body.theme-light nav a:hover {
  color: var(--accent); /* Use accent color from font theme */
}
body.theme-light nav a::after {
  background: var(--accent); /* Use accent color from font theme */
}
/* --- EASTER EGG THEME --- */
body.font-easteregg {
  --accent: #ff9000;
  --shadow: #ff900055;
}
body.theme-easteregg {
  --bg: #181818 !important;
  --primary: #222 !important;
  --text: #fff !important;
  background: #181818 !important;
  color: #fff !important;
  font-family: Arial, Helvetica, sans-serif !important;
}
body.theme-easteregg header {
  background: #000 !important;
  border-bottom: 4px solid #ff9000;
  box-shadow: none !important;
  padding: 0.7rem 0 !important;
  min-height: 60px;
  display: flex;
  align-items: center;
}
body.theme-easteregg .logo {
  color: #fff !important;
  background: #ff9000;
  padding: 0.2em 0.7em;
  border-radius: 6px;
  font-size: 2.1rem;
  font-family: Arial Black, Arial, sans-serif;
  letter-spacing: 0;
  text-shadow: none;
  margin-right: 1.2em;
  -webkit-app-region: no-drag;
}
body.theme-easteregg nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
body.theme-easteregg nav a {
  color: #fff !important;
  background: #222;
  border-radius: 0;
  padding: 0.5em 1.2em;
  font-weight: bold;
  font-size: 1.1em;
  margin: 0 0.2em;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: background 0.2s, color 0.2s;
  border-bottom: 3px solid transparent;
  box-shadow: none;
}
body.theme-easteregg nav a.active,
body.theme-easteregg nav a:hover {
  color: #ff9000 !important;
  background: #111;
  border-bottom: 3px solid #ff9000;
}
body.theme-easteregg nav a::after {
  display: none !important;
}
body.theme-easteregg .search-bar input[type="search"] {
  background: #222 !important;
  color: #fff !important;
  border-radius: 0;
  border: 2px solid #ff9000;
  font-size: 1.1em;
  padding: 0.5em 1em;
  box-shadow: none;
  outline: none;
}
body.theme-easteregg .search-btn {
  background: #ff9000 !important;
  color: #181818 !important;
  border-radius: 0;
  font-weight: bold;
  border: none;
  box-shadow: none;
  padding: 0.5em 1.2em;
  margin-left: 0.5em;
  text-transform: uppercase;
}
body.theme-easteregg .search-btn:hover {
  background: #fff !important;
  color: #ff9000 !important;
}
body.theme-easteregg .search-clear-btn svg {
  fill: #ff9000 !important;
}
body.theme-easteregg .hero h1,
body.theme-easteregg .hero h2 {
  color: #ff9000 !important;
  font-family: Arial Black, Arial, sans-serif;
  text-shadow: none;
}
body.theme-easteregg .video-card {
  background: #222 !important;
  color: #fff !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: 2px solid #111;
  margin-bottom: 1.5em;
}
body.theme-easteregg .video-card:hover {
  background: #181818 !important;
  border-color: #ff9000;
}
body.theme-easteregg .video-title {
  color: #ff9000 !important;
  font-family: Arial Black, Arial, sans-serif;
  font-size: 1.15em;
  text-shadow: none;
}
body.theme-easteregg .media-player {
  background: #000 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: 2px solid #ff9000;
}
body.theme-easteregg .media-player iframe,
body.theme-easteregg .media-player video {
  border-radius: 0 !important;
  background: #000 !important;
  border: none;
}
body.theme-easteregg .video-credits,
body.theme-easteregg .video-sources {
  background: #181818 !important;
  color: #fff !important;
  border-radius: 0 !important;
  border: none;
}
body.theme-easteregg .video-credits strong,
body.theme-easteregg .video-sources strong {
  color: #ff9000 !important;
}
body.theme-easteregg .video-sources a {
  color: #ff9000 !important;
}
body.theme-easteregg .theme-btn-modern.theme-easteregg {
  background: #ff9000 !important;
  color: #181818 !important;
  border-radius: 0 !important;
  font-weight: bold;
  border: 2px solid #ff9000;
}
body.theme-easteregg .theme-btn-modern.theme-easteregg.selected {
  box-shadow: 0 0 0 3px #ff9000 !important;
}
body.theme-easteregg .theme-btn-modern {
  border-radius: 0 !important;
  background: #222 !important;
  color: #fff !important;
  border: 2px solid #111;
}
body.theme-easteregg .theme-btn-modern.selected {
  border: 2px solid #ff9000 !important;
  color: #ff9000 !important;
}
body.theme-easteregg .theme-dot {
  border-radius: 0 !important;
  border: 2px solid #ff9000 !important;
}
body.theme-easteregg .theme-label {
  color: #fff !important;
  font-weight: bold;
  text-transform: uppercase;
}
body.theme-easteregg .timer {
  color: #ff9000 !important;
}
body.theme-easteregg a {
  color: #ff9000 !important;
}
body.theme-easteregg ::selection {
  background: #ff9000;
  color: #fff;
}

.auth-container {
  background: rgba(25, 25, 40, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 450px;
  overflow: hidden;
  position: relative;
}

.twitch-header {
  background: #9147ff;
  padding: 25px 20px;
  text-align: center;
}

.twitch-logo {
  font-size: 3rem;
  margin-bottom: 15px;
  color: white;
}

.content {
  padding: 30px;
  text-align: center;
}

.user-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px;
  border: 3px solid #9147ff;
}

.btn {
  display: block;
  width: 100%;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 15px;
  border: none;
}

.btn-primary {
  background: #9147ff;
  color: white;
  box-shadow: 0 4px 15px rgba(145, 71, 255, 0.3);
}

.btn-primary:hover {
  background: #7d3ce0;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #2d2d4b;
  color: white;
}

.btn-secondary:hover {
  background: #3a3a5a;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: #ef4444;
  border: 1px solid #ef4444;
}

.btn-outline:hover {
  background: rgba(239, 68, 68, 0.1);
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 25px;
}

.follow-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #9147ff;
  text-decoration: none;
  margin-top: 20px;
  font-weight: 600;
}

.follow-link:hover {
  text-decoration: underline;
}

.debug-info {
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 0.85rem;
  color: #a0a0b0;
  text-align: left;
}

.debug-title {
  font-weight: 600;
  margin-bottom: 5px;
  color: #9147ff;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #9147ff;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.footer {
  margin-top: 25px;
  color: #777;
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .content {
    padding: 20px;
  }

  .twitch-header {
    padding: 20px 15px;
  }
}

.recipe-thumb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.18em;
  width: 100%;
  aspect-ratio: 16/9; /* Same as .video-thumb */
  margin-bottom: 0.7em;
  background: #222;
  border-radius: 0.7em;
  overflow: hidden;
  position: relative;
}
.recipe-grid-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  position: relative;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.18s, transform 0.18s;
}
.recipe-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
  background: #222;
  transition: transform 0.18s cubic-bezier(0.4, 1.6, 0.6, 1), box-shadow 0.18s;
}
.recipe-grid-img:hover .recipe-thumb,
.recipe-grid-img:focus-within .recipe-thumb {
  transform: scale(1.08);
  box-shadow: 0 6px 24px var(--shadow);
  z-index: 2;
}
.recipe-thumb-more img {
  filter: blur(3px) brightness(0.5);
}
.recipe-thumb-more-count {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  color: #fff;
  font-weight: bold;
  z-index: 2;
  pointer-events: none;
  backdrop-filter: blur(2px);
}
@media (max-width: 700px) {
  .recipe-thumb-grid {
    aspect-ratio: 16/10;
    border-radius: 0.4em;
  }
}
#recipe-gallery-overlay {
  animation: fadeIn 0.2s;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.community-filter-btn {
  background: transparent;
  border: 2px solid transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 1.05em;
  padding: 0.5em 1.3em;
  border-radius: 2em;
  margin: 0 0.3em;
  cursor: pointer;
  transition: border 0.2s, color 0.2s, background 0.2s;
  outline: none;
}
.community-filter-btn.active,
.community-filter-btn:focus-visible {
  border: 2px solid var(--accent);
  background: rgba(56, 189, 248, 0.08);
  color: var(--accent);
}
.community-filter-btn:hover {
  background: rgba(56, 189, 248, 0.13);
}

.logo img {
  height: 2.5em;
  max-width: 220px;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  -webkit-app-region: no-drag;
}

.submit-btn-transparent {
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--accent);
  font-weight: bold;
  padding: 0.7em 1.5em;
  margin-left: 0.5em;
  cursor: pointer;
  transition: color 0.2s;
}
.submit-btn-transparent:hover,
.submit-btn-transparent:focus {
  color: #0ea5e9;
  text-decoration: underline;
}

.form-input,
#ideaForm input,
#ideaForm textarea,
#ideaForm select {
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--accent);
  border-radius: 1em;
  padding: 0.8em 1em;
  font-size: 1.08em;
  margin-bottom: 0.5em;
  transition: border 0.2s, box-shadow 0.2s;
  width: 100%; /* <-- Add this line */
  box-sizing: border-box; /* <-- Add this line for consistency */
}
#ideaForm input:focus,
#ideaForm textarea:focus,
#ideaForm select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent) 33;
}
#ideaForm label {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.3em;
}

#profileDropdown {
  min-width: 120px;
  box-shadow: 0 4px 24px #0006;
  border-radius: 1em;
  background: var(--primary);
  padding: 0.7em 1.2em;
  z-index: 100;
}
#profileDropdown button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--accent);
  font-weight: bold;
  cursor: pointer;
  font-size: 1em;
  padding: 0.5em 0;
}
#profileDropdown button:hover {
  color: #ef4444;
}

.recipe-grid-img {
  cursor: pointer;
  position: relative;
  /* Remove animation/transform here */
}
.recipe-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
  background: #222;
  /* Remove transition/animation here */
}
.recipe-grid-img:hover .recipe-thumb,
.recipe-grid-img:focus-within .recipe-thumb {
  /* Only highlight with a border or shadow, no transform/rotate */
  box-shadow: 0 0 0 3px var(--accent);
  z-index: 2;
}
/* Removed empty .recipe-grid-img:active .recipe-thumb ruleset */

/* --- END EASTER EGG THEME --- */

#profileDropdown #logoutBtn,
#profileDropdown button#logoutBtn {
  color: #ef4444 !important;
}
#profileDropdown #logoutBtn:hover,
#profileDropdown button#logoutBtn:hover {
  color: #b91c1c !important;
}

#profileDropdown {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.4, 1.6, 0.6, 1),
    transform 0.22s cubic-bezier(0.4, 1.6, 0.6, 1);
}

#profileDropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.recipe-thumb-single {
  display: flex !important;
  aspect-ratio: 16/9;
  background: none !important;
}
.recipe-thumb-single .recipe-grid-img {
  flex: 1 1 100%;
  height: auto;
}
.recipe-thumb-two {
  display: flex !important;
  gap: 0.18em;
  aspect-ratio: 16/9;
  background: none !important;
}
.recipe-thumb-two .recipe-grid-img {
  flex: 1 1 50%;
  height: auto;
}
.recipe-thumb-three {
  display: grid !important;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.18em;
  aspect-ratio: 16/9;
  background: none !important;
}
.recipe-thumb-three .recipe-grid-img:nth-child(1) {
  grid-row: 1 / span 2;
  grid-column: 1 / span 1;
}
.recipe-thumb-three .recipe-grid-img:nth-child(2) {
  grid-row: 1 / span 1;
  grid-column: 2 / span 1;
}
.recipe-thumb-three .recipe-grid-img:nth-child(3) {
  grid-row: 2 / span 1;
  grid-column: 2 / span 1;
}

.download-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 2em;
  padding: 0.7em 1.5em;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  margin-left: 0.5em;
  box-shadow: 0 2px 8px var(--shadow);
  transition: background 0.2s, transform 0.2s;
}

.download-btn:hover {
  background: #0ea5e9;
  transform: translateY(-2px);
}

.download-btn:active {
  transform: translateY(0);
}

/* For mobile responsiveness */
@media (max-width: 700px) {
  .download-btn {
    width: 100%;
    margin-left: 0;
    margin-top: 0.5em;
    justify-content: center;
  }
}

header#mainHeader {
  -webkit-app-region: drag;
}
header#mainHeader button,
header#mainHeader a,
header#mainHeader input,
header#mainHeader select,
header#mainHeader .search-bar,
header#mainHeader #profileMenuContainer {
  -webkit-app-region: no-drag;
}

/* Confirmation Modal Styling */
#confirmationModal {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(20, 20, 30, 0.55);
  backdrop-filter: blur(8px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s;
}
#confirmationModal .modal-box {
  background: var(--primary);
  color: var(--text);
  border-radius: 1.2em;
  box-shadow: 0 8px 40px #000a;
  padding: 2em 2em 1.5em 2em;
  max-width: 90vw;
  min-width: 260px;
  text-align: center;
  position: relative;
  animation: popIn 0.18s;
}
#confirmationModal h2 {
  color: var(--accent);
  margin-bottom: 1em;
  font-size: 1.3em;
  font-weight: bold;
  letter-spacing: 0.01em;
}
#confirmationModal p {
  margin-bottom: 2em;
  color: #cbd5e1;
  font-size: 1.08em;
}
#confirmationModal button {
  border: none;
  border-radius: 1em;
  padding: 0.7em 2em;
  font-size: 1.08em;
  font-weight: bold;
  cursor: pointer;
  margin: 0 0.5em;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  box-shadow: 0 2px 8px var(--shadow);
}
#confirmationModal #confirmModalBtn {
  background: var(--accent);
  color: var(--bg);
}
#confirmationModal #confirmModalBtn:hover {
  background: #0ea5e9;
}
#confirmationModal #cancelModalBtn {
  background: var(--primary);
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
#confirmationModal #cancelModalBtn:hover {
  background: #222c;
  color: #fff;
}
@media (max-width: 480px) {
  #confirmationModal .modal-box {
    padding: 1em 0.5em 0.5em 0.5em;
    min-width: 0;
    max-width: 98vw;
  }
  #confirmationModal button {
    width: 100%;
    margin: 0.5em 0 0 0;
    font-size: 1em;
    padding: 0.7em 0;
  }
}

.download-iframe {
  margin-top: 20px;
  color: var(--accent);
}

/* Add this to your CSS file */
.big-submit-btn {
  color: var(--accent);
  font-size: 1.5rem;
  padding: 1rem 2.5rem;
}

#rouletteSpinBtn.spinning {
  background: #64748b !important;
  color: #bbb !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  filter: grayscale(0.7) brightness(0.7);
}

.horse-row .horse {
  transition: left 0.5s cubic-bezier(0.4, 1, 0.6, 1);
}

/* Add this to your CSS */
@keyframes horseWiggle {
  0% {
    transform: rotate(-8deg) scale(1.05);
  }
  50% {
    transform: rotate(8deg) scale(1.15);
  }
  100% {
    transform: rotate(-8deg) scale(1.05);
  }
}
.horse-row .horse {
  animation: horseWiggle 0.5s infinite;
}

@keyframes horseGallop {
  0% {
    transform: translateY(0) rotate(var(--lean, 0deg));
  }
  20% {
    transform: translateY(-6px) rotate(var(--lean, 0deg));
  }
  40% {
    transform: translateY(2px) rotate(var(--lean, 0deg));
  }
  60% {
    transform: translateY(-4px) rotate(var(--lean, 0deg));
  }
  80% {
    transform: translateY(1px) rotate(var(--lean, 0deg));
  }
  100% {
    transform: translateY(0) rotate(var(--lean, 0deg));
  }
}
.horse-row .horse {
  animation: horseGallop 0.5s infinite;
  will-change: transform;
  transition: left 0.18s cubic-bezier(0.4, 1.6, 0.6, 1);
}

@keyframes horseGallop {
  0% {
    transform: translateY(0) rotate(var(--lean, 0deg));
  }
  20% {
    transform: translateY(-6px) rotate(var(--lean, 0deg));
  }
  40% {
    transform: translateY(2px) rotate(var(--lean, 0deg));
  }
  60% {
    transform: translateY(-4px) rotate(var(--lean, 0deg));
  }
  80% {
    transform: translateY(1px) rotate(var(--lean, 0deg));
  }
  100% {
    transform: translateY(0) rotate(var(--lean, 0deg));
  }
}
.horse-row .horse {
  animation: horseGallop 0.5s infinite;
  will-change: transform;
  transition: left 0.18s cubic-bezier(0.4, 1.6, 0.6, 1);
}

/* Make sure this is in your CSS */
#realHorseRaceArea img {
  transition: left 0.5s cubic-bezier(0.4, 1, 0.6, 1), filter 0.18s;
}
@keyframes haofxLiveScroll {
  0% {
    right: -100vw;
  }
  100% {
    right: 100vw;
  }
}

@keyframes haoRollBounce {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.18);
  }
  60% {
    transform: scale(0.96);
  }
  80% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}
.hao-roll-bounce {
  animation: haoRollBounce 0.5s;
}

.card {
  display: inline-block;
  font-size: 2.5em;
  width: 1.3em;
  height: 1.8em;
  margin: 0 0.1em;
  border-radius: 0.3em;
  background: #222c;
  box-shadow: 0 2px 12px #000a;
  text-align: center;
  line-height: 1.8em;
  vertical-align: middle;
  transition: transform 0.3s cubic-bezier(0.4, 1.6, 0.6, 1), box-shadow 0.2s;
  animation: cardDeal 0.5s cubic-bezier(0.4, 1.6, 0.6, 1);
}
.card-back {
  background: repeating-linear-gradient(135deg, #64748b 0 8px, #222c 8px 16px);
  color: transparent;
  box-shadow: 0 2px 12px #000a, 0 0 0 2px #64748b;
}
.card-anim {
  animation: cardDeal 0.5s cubic-bezier(0.4, 1.6, 0.6, 1);
}
@keyframes cardDeal {
  from {
    transform: translateY(-40px) scale(0.7) rotate(-10deg);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.real-card {
  display: inline-block;
  background: #fff;
  color: #222;
  border-radius: 0.45em;
  border: 2px solid #e5e7eb;
  box-shadow: 0 2px 12px #0003;
  width: 2.2em;
  height: 3.2em;
  margin: 0 0.15em;
  font-family: "Segoe UI", Arial, sans-serif;
  position: relative;
  vertical-align: middle;
  text-align: center;
  transition: transform 0.3s cubic-bezier(0.4, 1.6, 0.6, 1), box-shadow 0.2s;
  animation: cardDeal 0.5s cubic-bezier(0.4, 1.6, 0.6, 1);
  font-size: 1.35em;
  overflow: hidden;
}
.real-card .card-corner {
  position: absolute;
  font-size: 0.65em;
  font-weight: bold;
  line-height: 1.1em;
  letter-spacing: 0.01em;
}
.real-card .card-corner-top {
  top: 0.18em;
  left: 0.22em;
  text-align: left;
}
.real-card .card-corner-bottom {
  bottom: 0.18em;
  right: 0.22em;
  text-align: right;
  transform: rotate(180deg);
}
.real-card .card-center {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 1.2em;
  transform: translate(-50%, -50%);
  opacity: 0.18;
  user-select: none;
}
.card-back {
  background: repeating-linear-gradient(135deg, #64748b 0 8px, #222c 8px 16px);
  color: transparent !important;
  border: 2px solid #64748b;
  box-shadow: 0 2px 12px #000a, 0 0 0 2px #64748b;
}
@keyframes cardDeal {
  from {
    transform: translateY(-40px) scale(0.7) rotate(-10deg);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.slide-counter {
  display: inline-flex;
  font-weight: bold;
  font-size: 1.18em;
  color: #ffd700;
  text-shadow: 0 0 8px #ffd700;
  overflow: hidden;
  vertical-align: middle;
  letter-spacing: 0.05em;
}
.slide-counter-digit {
  display: inline-block;
  height: 1.3em;
  width: 0.85em;
  position: relative;
  overflow: hidden;
}
.slide-counter-digit-inner {
  display: flex;
  flex-direction: column;
  transition: transform 0.32s cubic-bezier(0.4, 2, 0.6, 1);
  will-change: transform;
}
.slide-counter-digit-inner span {
  height: 1.3em;
  line-height: 1.3em;
  display: block;
  text-align: center;
}

#shopArea .shop-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5em;
  margin-bottom: 2em;
}

@media (max-width: 900px) {
  #shopArea .shop-category-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1em;
  }
}
@media (max-width: 600px) {
  #shopArea .shop-category-grid {
    grid-template-columns: 1fr;
    gap: 0.7em;
  }
}

.shop-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5em;
}
.shop-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5em;
  margin-bottom: 2em;
}
@media (max-width: 900px) {
  .shop-category-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1em;
  }
}
@media (max-width: 600px) {
  .shop-category-grid {
    grid-template-columns: 1fr;
    gap: 0.7em;
  }
}

.shop-hero {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.shop-title {
  color: var(--accent);
  margin-bottom: 0.5em;
  font-size: 2.2rem;
}

.shop-subtitle {
  margin-bottom: 2em;
  font-size: 1.15rem;
  color: #cbd5e1;
  line-height: 1.6;
}

.shop-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

.shop-cart-btn {
  font-size: 1.1rem;
  padding: 0.7em 2em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  background: var(--button-bg);
  color: var(--button-text);
  border: none;
  border-radius: 2em;
  cursor: pointer;
  transition: all 0.2s;
}

.shop-cart-btn:hover {
  background: var(--button-hover);
  transform: translateY(-2px);
}

.shop-cart-btn #shopCartCount {
  margin-left: 0.5em;
  background: #111;
  color: #fff;
  border-radius: 1em;
  padding: 0.1em 0.7em;
  font-size: 0.95em;
}

.shop-container {
  margin: 0 auto;
  max-width: 1200px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.shop-item {
  background: var(--primary);
  border-radius: 1em;
  box-shadow: 0 2px 16px var(--shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.shop-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 20px var(--shadow);
}

.item-icon {
  font-size: 2.2rem;
  margin-bottom: 0.4rem;
}

.item-name {
  font-size: 1.08rem;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 0.2rem;
  text-align: center;
}

.item-desc {
  color: #cbd5e1;
  font-size: 0.97rem;
  margin-bottom: 0.7rem;
  text-align: center;
  line-height: 1.4;
}

.item-price {
  font-size: 1rem;
  color: #ffd700;
  font-weight: bold;
  margin-bottom: 1rem;
}

.item-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.shop-btn {
  padding: 0.5em 1em;
  border: none;
  border-radius: 0.5em;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.3em;
}

.shop-btn:hover {
  transform: translateY(-2px);
}

.add-to-cart-btn {
  background: var(--button-bg);
  color: var(--button-text);
}

.buy-now-btn {
  background: var(--accent);
  color: #fff;
}

.in-cart-btn {
  background: #38bdf8;
  color: #fff;
  opacity: 0.7;
  pointer-events: none;
}

.bought-btn {
  background: #22c55e;
  color: #fff;
  opacity: 0.7;
  pointer-events: none;
}

/* Cart Modal */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: rgba(20, 20, 30, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-content {
  background: var(--primary);
  border-radius: 1.2em;
  box-shadow: 0 2px 16px var(--shadow);
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  margin: 0 auto;
}

.cart-title {
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 1.5rem;
}

.empty-cart {
  color: #94a3b8;
  text-align: center;
  padding: 1rem 0;
}

.cart-items {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  max-height: 50vh;
  overflow-y: auto;
}

.cart-item {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-item-icon {
  font-size: 1.5rem;
}

.cart-item-name {
  flex: 1 1 0;
}

.cart-item-price {
  color: #ffd700;
  font-weight: bold;
}

.cart-remove-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.5rem;
}

.cart-total {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  text-align: right;
}

.cart-total b {
  color: #ffd700;
}

.cart-buy-all-btn {
  width: 100%;
  font-size: 1.1rem;
  padding: 0.7em;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0.5em;
  cursor: pointer;
  transition: all 0.2s;
}

.cart-buy-all-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.cart-close-btn {
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.7em;
  background: var(--button-bg);
  color: var(--button-text);
  border: none;
  border-radius: 0.5em;
  cursor: pointer;
  transition: all 0.2s;
}

.cart-close-btn:hover {
  background: var(--button-hover);
}

/* Cart button pointer on hover */
#communityCartBtn,
.shop-cart-btn,
.add-to-cart-btn {
  cursor: pointer;
}

/* Add to Cart button uses accent color */
.add-to-cart-btn {
  background: var(--accent) !important;
  color: var(--bg) !important;
  border: none;
  transition: background 0.18s, color 0.18s;
}
.add-to-cart-btn:hover,
.add-to-cart-btn:focus {
  background: #0ea5e9 !important; /* Optional: slightly lighter on hover */
  color: var(--bg) !important;
}

.add-to-cart-btn {
  background: var(--accent) !important;
  color: var(--bg) !important;
  border: none;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.add-to-cart-btn:hover,
.add-to-cart-btn:focus {
  background: #0ea5e9 !important;
  color: var(--bg) !important;
}

.theme-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.2rem;
  margin: 2rem 0 0 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.theme-btn-modern {
  border: none;
  outline: none;
  border-radius: 1.2em;
  padding: 1.2em 0.5em 1em 0.5em;
  font-size: 1.08em;
  font-weight: 600;
  color: #fff;
  background: #334155;
  box-shadow: 0 2px 12px #0002;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7em;
  transition: transform 0.13s, box-shadow 0.13s, background 0.2s, color 0.2s;
  position: relative;
  min-width: 0;
  min-height: 90px;
}
.theme-btn-modern.selected,
.theme-btn-modern:focus-visible {
  box-shadow: 0 4px 24px var(--shadow), 0 0 0 3px var(--accent);
  z-index: 1;
  outline: none;
  transform: scale(1.04);
}
.theme-btn-modern .theme-dot {
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  margin-bottom: 0.2em;
  border: 2.5px solid #fff4;
  box-shadow: 0 2px 8px #0002;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
}
.theme-btn-modern .theme-dot svg {
  width: 1.3em;
  height: 1.3em;
  display: block;
}
.theme-btn-modern .theme-label {
  font-size: 1em;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: inherit;
  text-shadow: 0 1px 6px #0002;
}
/* Theme-specific colors */
.theme-btn-modern.theme-blue {
  background: #2563eb;
  color: #fff;
}
.theme-btn-modern.theme-green {
  background: #22c55e;
  color: #fff;
}
.theme-btn-modern.theme-red {
  background: #ef4444;
  color: #fff;
}
.theme-btn-modern.theme-purple {
  background: #a21caf;
  color: #fff;
}
.theme-btn-modern.theme-pink {
  background: #ec4899;
  color: #fff;
}
.theme-btn-modern.theme-violet {
  background: #7c3aed;
  color: #fff;
}
.theme-btn-modern.theme-orange {
  background: #f59e42;
  color: #fff;
}
.theme-btn-modern.theme-dark {
  background: #0f172a;
  color: #f1f5f9;
}
.theme-btn-modern.theme-light {
  background: #f1f5f9;
  color: #1e293b;
  border: 1.5px solid #cbd5e1;
}
.theme-btn-modern.theme-light .theme-dot {
  border: 2.5px solid #cbd5e1;
}
.theme-btn-modern:hover,
.theme-btn-modern:active {
  filter: brightness(1.08) saturate(1.1);
  transform: scale(1.045);
  box-shadow: 0 6px 32px var(--shadow), 0 0 0 2px var(--accent);
}
@media (max-width: 700px) {
  .theme-options-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.7rem;
  }
  .theme-btn-modern {
    font-size: 0.98em;
    padding: 1em 0.2em 0.8em 0.2em;
  }
}

@media (max-width: 700px) {
  header {
    flex-direction: column;
    align-items: stretch;
    padding: 0.7rem 2vw;
  }
  .logo {
    font-size: 1.4rem;
    margin-bottom: 0.5em;
    text-align: center;
  }
  nav {
    justify-content: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5em;
  }
  .search-bar {
    margin: 1rem 0 0 0;
    flex-direction: column;
    gap: 0.5em;
    width: 100%;
  }
  .search-bar input[type="search"] {
    max-width: 100vw;
    font-size: 1em;
    padding: 0.7em 1em;
  }
  .search-btn,
  .submit-btn-transparent {
    width: 100%;
    margin-left: 0;
    margin-top: 0.5em;
    font-size: 1em;
    padding: 0.7em 0;
  }
  .search-clear-btn {
    right: 1.5em;
    top: 1.2em;
  }

  @media (max-width: 480px) {
    .search-clear-btn {
      right: 0.8em;
      top: 0.8em;
    }
  }
  .video-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 1rem 2vw;
  }
  .video-card {
    min-width: 0;
    font-size: 0.98em;
  }
  .media-player iframe,
  .media-player video {
    height: 180px;
    min-height: 120px;
    aspect-ratio: 16/9;
  }
  .hero h1 {
    font-size: 1.6rem;
  }
  .hero p {
    font-size: 1.05rem;
    padding: 0 0.5em;
  }
  #profileMenuContainer {
    margin-top: 0.7em;
  }
  #profileDropdown {
    right: 0.5em;
    left: auto;
    min-width: 140px;
    font-size: 0.98em;
  }
  .recipe-thumb-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 16/12;
    border-radius: 0.4em;
  }
}

/* Even smaller screens */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.2rem;
  }
  .video-grid {
    gap: 0.7rem;
    padding: 0.5rem 1vw;
  }
  .video-card {
    padding: 0.5em;
  }
  .media-player iframe,
  .media-player video {
    height: 120px;
  }
  #profileDropdown {
    min-width: 110px;
    font-size: 0.93em;
    padding: 0.5em 0.7em;
  }
}

@media (max-width: 700px) {
  header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 2vw 0.7rem 2vw;
    position: static;
  }
  .logo {
    order: 1;
    margin: 0;
    font-size: 1.3rem;
    text-align: left;
    flex: 1 0 auto;
  }
  #profileMenuContainer {
    order: 3;
    margin: 0;
    flex: 0 0 auto;
  }
  nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    box-shadow: 0 -2px 16px #0003;
    z-index: 100;
    justify-content: space-around;
    align-items: center;
    padding: 0.3em 0;
    margin: 0;
    width: 100vw;
    border-top-left-radius: 1em;
    border-top-right-radius: 1em;
    gap: 0;
  }
  nav a {
    margin: 0;
    padding: 0.7em 0.5em;
    font-size: 1.1em;
    flex: 1 1 0;
    text-align: center;
    border-radius: 0.7em;
    transition: background 0.2s, color 0.2s;
  }
  nav a.active,
  nav a:active {
    background: var(--accent);
    color: var(--bg);
  }
  .search-bar {
    margin: 1em 0 0 0;
    flex-direction: row;
    gap: 0.5em;
    width: 100%;
    justify-content: flex-start;
  }
  .search-btn {
    display: none !important;
  }
  #navbarSubmitBtn {
    display: inline-block !important;
    margin-left: 0.5em;
    margin-top: 0;
    background: var(--accent);
    color: var(--bg);
    border-radius: 1em;
    font-weight: bold;
    padding: 0.7em 1.2em;
    border: none;
    box-shadow: 0 2px 8px var(--shadow);
  }
  #navbarDownloadBtn {
    display: none !important;
  }
}
@media (max-width: 700px) {
  header {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 2vw;
  }
  .logo,
  .logo img {
    font-size: 1.1rem;
    margin-bottom: 0.5em;
    text-align: center;
    margin: 0 auto;
    height: 2em;
    max-width: 120px;
  }
  nav {
    flex-wrap: wrap;
    gap: 0.3em;
    justify-content: center;
    margin-bottom: 0.3rem;
  }
  nav a {
    font-size: 1em;
    padding: 0.4em 0.6em;
    margin: 0.2em 0.3em;
  }
  .search-bar {
    margin: 1rem 0 0 0;
    flex-direction: column;
    gap: 0.5em;
    width: 100%;
  }
  .search-bar input[type="search"] {
    max-width: 100vw;
    font-size: 1em;
    padding: 0.7em 1em;
    border-radius: 1em;
  }
  .search-btn,
  .submit-btn-transparent,
  button,
  input[type="search"] {
    width: 100%;
    margin-left: 0;
    margin-top: 0.5em;
    font-size: 1em;
    padding: 0.7em 0;
    min-height: 44px;
    border-radius: 1em;
  }
  .search-clear-btn {
    right: 1.5em;
    top: 1.2em;
  }
  .video-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.5rem 1vw;
  }
  .video-card {
    min-width: 0;
    font-size: 1em;
    padding: 0.7em;
    border-radius: 1em;
    margin-bottom: 1em;
  }
  .video-thumb {
    border-radius: 0.7em;
    min-height: 140px;
    background: #222;
  }
  .video-info {
    padding: 0.7em 0.3em 0.3em 0.3em;
  }
  .media-player iframe,
  .media-player video {
    height: 180px;
    min-height: 120px;
    aspect-ratio: 16/9;
  }
  .hero h1 {
    font-size: 1.1rem;
  }
  .hero p {
    font-size: 1.05rem;
    padding: 0 0.5em;
  }
  #profileMenuContainer {
    margin-top: 0.7em;
  }
  #profileDropdown {
    min-width: 110px;
    font-size: 0.95em;
    padding: 0.5em 0.7em;
    right: 0.5em;
    left: auto;
  }
  .recipe-thumb-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 16/12;
    border-radius: 0.5em;
    gap: 0.1em;
  }
  .recipe-thumb-single,
  .recipe-thumb-two,
  .recipe-thumb-three {
    aspect-ratio: 16/10;
    border-radius: 0.5em;
    gap: 0.1em;
  }
  .recipe-thumb {
    border-radius: 0.5em;
  }
  #recipe-gallery-overlay > div {
    padding: 1em 0.2em 0.5em 0.2em !important;
    max-width: 98vw !important;
  }
  #galleryImg {
    max-width: 95vw !important;
    max-height: 60vh !important;
  }
  form,
  .auth-box {
    padding: 1em 0.5em !important;
    border-radius: 1em !important;
    max-width: 98vw !important;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.1rem;
  }
  .video-title {
    font-size: 1em;
  }
  .video-desc {
    font-size: 0.92em;
  }
  .video-info {
    padding: 0.4em;
  }
  .video-grid {
    gap: 0.7rem;
    padding: 0.5rem 1vw;
  }
  .video-card {
    padding: 0.5em;
  }
  .media-player iframe,
  .media-player video {
    height: 120px;
  }
  #profileDropdown {
    min-width: 110px;
    font-size: 0.93em;
    padding: 0.5em 0.7em;
  }
}

@media (max-width: 700px) {
  .recipe-thumb-single {
    display: flex !important;
    aspect-ratio: 16/10;
    background: none !important;
  }
  .recipe-thumb-two {
    display: flex !important;
    gap: 0.12em;
    aspect-ratio: 16/10;
    background: none !important;
  }
  .recipe-thumb-two .recipe-grid-img {
    flex: 1 1 50%;
    height: auto;
  }
  .recipe-thumb-three {
    display: grid !important;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0.12em;
    aspect-ratio: 16/10;
    background: none !important;
  }
  .recipe-thumb-three .recipe-grid-img:nth-child(1) {
    grid-row: 1 / span 2;
    grid-column: 1 / span 1;
  }
  .recipe-thumb-three .recipe-grid-img:nth-child(2) {
    grid-row: 1 / span 1;
    grid-column: 2 / span 1;
  }
  .recipe-thumb-three .recipe-grid-img:nth-child(3) {
    grid-row: 2 / span 1;
    grid-column: 2 / span 1;
  }
}
@media (max-width: 700px) {
  header {
    flex-direction: column;
    align-items: stretch;
    padding: 0.7rem 2vw;
  }
  .logo {
    font-size: 1.4rem;
    margin-bottom: 0.5em;
    text-align: center;
  }
  nav {
    justify-content: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5em;
  }
  .search-bar {
    margin: 1rem 0 0 0;
    flex-direction: column;
    gap: 0.5em;
    width: 100%;
  }
  .search-bar input[type="search"] {
    max-width: 100vw;
    font-size: 1em;
    padding: 0.7em 1em;
  }
  .search-btn,
  .submit-btn-transparent {
    width: 100%;
    margin-left: 0;
    margin-top: 0.5em;
    font-size: 1em;
    padding: 0.7em 0;
  }
  .search-clear-btn {
    right: 1.5em;
    top: 1.2em;
  }
  .video-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 1rem 2vw;
  }
  .video-card {
    min-width: 0;
    font-size: 0.98em;
  }
  .media-player iframe,
  .media-player video {
    height: 180px;
    min-height: 120px;
    aspect-ratio: 16/9;
  }
  .hero h1 {
    font-size: 1.6rem;
  }
  .hero p {
    font-size: 1.05rem;
    padding: 0 0.5em;
  }
  #profileMenuContainer {
    margin-top: 0.7em;
  }
  #profileDropdown {
    right: 0.5em;
    left: auto;
    min-width: 140px;
    font-size: 0.98em;
  }
  .recipe-thumb-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 16/12;
    border-radius: 0.4em;
  }
}

/* Even smaller screens */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.2rem;
  }
  .video-grid {
    gap: 0.7rem;
    padding: 0.5rem 1vw;
  }
  .video-card {
    padding: 0.5em;
  }
  .media-player iframe,
  .media-player video {
    height: 120px;
  }
  #profileDropdown {
    min-width: 110px;
    font-size: 0.93em;
    padding: 0.5em 0.7em;
  }
}

body::-webkit-scrollbar {
  display: none;
}

@media (max-width: 700px) {
  header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 2vw 0.7rem 2vw;
    position: static;
  }
  .logo {
    order: 1;
    margin: 0;
    font-size: 1.3rem;
    text-align: left;
    flex: 1 0 auto;
  }
  #profileMenuContainer {
    order: 3;
    margin: 0;
    flex: 0 0 auto;
  }
  nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    box-shadow: 0 -2px 16px #0003;
    z-index: 100;
    justify-content: space-around;
    align-items: center;
    padding: 0.3em 0;
    margin: 0;
    width: 100vw;
    border-top-left-radius: 1em;
    border-top-right-radius: 1em;
    gap: 0;
  }
  nav a {
    margin: 0;
    padding: 0.7em 0.5em;
    font-size: 1.1em;
    flex: 1 1 0;
    text-align: center;
    border-radius: 0.7em;
    transition: background 0.2s, color 0.2s;
  }
  nav a.active,
  nav a:active {
    background: var(--accent);
    color: var(--bg);
  }
  .search-bar {
    margin: 1em 0 0 0;
    flex-direction: row;
    gap: 0.5em;
    width: 100%;
    justify-content: flex-start;
  }
  .search-btn {
    display: none !important;
  }
  #navbarSubmitBtn {
    display: inline-block !important;
    margin-left: 0.5em;
    margin-top: 0;
    background: var(--accent);
    color: var(--bg);
    border-radius: 1em;
    font-weight: bold;
    padding: 0.7em 1.2em;
    border: none;
    box-shadow: 0 2px 8px var(--shadow);
  }
  #navbarDownloadBtn {
    display: none !important;
  }
}

@media (max-width: 700px) {
  .bottom-bar-mobile {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary);
    z-index: 200;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    padding: 0.3em 0.7em 0.3em 0.7em;
    border-top-left-radius: 1em;
    border-top-right-radius: 1em;
    box-shadow: 0 -2px 16px #0003;
    width: 100vw;
    gap: 0.7em;
  }
  .bottom-bar-mobile .search-bar {
    flex: 3 1 0;
    margin: 0;
    flex-direction: row;
    gap: 0.5em;
    width: auto;
    justify-content: flex-start;
  }
  .bottom-bar-mobile #profileMenuContainer {
    flex: 0 0 auto;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
  .bottom-bar-mobile #profileDropdown {
    left: auto;
    right: 0;
    top: auto;
    bottom: 110%;
  }
  header {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 0.7rem 2vw 0.7rem 2vw;
    position: static;
  }
  .logo {
    order: 1;
    margin: 0;
    font-size: 1.3rem;
    text-align: left;
    flex: 1 0 auto;
  }
  nav {
    order: 2;
    flex: 1 1 0;
    position: static;
    background: none;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100vw;
    gap: 0;
  }
}
body.theme-glassy {
  /* No background override here, so the theme-dark or theme-light background stays */
  backdrop-filter: blur(12px) saturate(1.2);
}
body.theme-glassy .hero,
body.theme-glassy .video-card,
body.theme-glassy .media-player,
body.theme-glassy .auth-container,
body.theme-glassy .modal-box,
body.theme-glassy .search-bar,
body.theme-glassy .theme-btn-modern,
body.theme-glassy #profileDropdown,
body.theme-glassy .community-filter-bar,
body.theme-glassy .video-info,
body.theme-glassy .recipe-thumb-grid,
body.theme-glassy .recipe-grid-img,
body.theme-glassy .fanart-thumb-grid {
  background: rgba(30, 41, 59, 0.55) !important;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18) !important;
  backdrop-filter: blur(18px) saturate(1.2);
  /* border: 1.5px solid rgba(255,255,255,0.13); */ /* <-- removed */
}
body.theme-glassy header,
body.theme-glassy nav {
  background: rgba(30, 41, 59, 0.45) !important;
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 4px 24px #0002;
}
body.theme-glassy .search-bar input[type="search"] {
  background: rgba(255, 255, 255, 0.13) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: #f1f5f9;
}
body.theme-glassy .search-btn,
body.theme-glassy .submit-btn-transparent,
body.theme-glassy .download-btn {
  background: rgba(56, 189, 248, 0.22) !important;
  color: #fff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}
body.theme-glassy .search-btn:hover,
body.theme-glassy .download-btn:hover {
  background: rgba(56, 189, 248, 0.33) !important;
}
body.theme-glassy .video-title,
body.theme-glassy .hero h1,
body.theme-glassy .logo {
  text-shadow: 0 2px 12px #0004;
}

/* Remove background and box for search bar and buttons */
/* Glassy, rounded nav bar */
body.theme-glassy nav {
  background: rgba(30, 41, 59, 0.45) !important;
  backdrop-filter: blur(18px) saturate(1.2);
  border-radius: 2.5em !important;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18) !important;
  padding: 0.7em 2.5em !important;
  margin: 1.5em auto 2em auto !important;
  max-width: 900px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2em;
  /* Responsive: allow wrapping on small screens */
  flex-wrap: wrap;
}

/* Glassy, pill-like nav buttons ONLY in glassy theme */
body.theme-glassy .community-filter-bar,
body.theme-glassy .search-bar,
body.theme-glassy nav a {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2em;
  padding: 0.5em 1.4em;
  margin: 0 0.3em;
  color: #f1f5f9;
  box-shadow: 0 2px 12px #0002;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  border: 1.5px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(8px);
  font-weight: 500;
}
body.theme-glassy nav a.active,
body.theme-glassy nav a:hover {
  background: rgba(56, 189, 248, 0.22);
  color: var(--accent);
  box-shadow: 0 4px 24px var(--shadow);
}

/* Glassy, pill-like community filter buttons ONLY in glassy theme */
body.theme-glassy .community-filter-btn {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2em;
  padding: 0.5em 1.4em;
  margin: 0 0.3em;
  color: #f1f5f9;
  box-shadow: 0 2px 12px #0002;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  border: 1.5px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(8px);
  font-weight: 500;
}
body.theme-glassy .community-filter-btn.active,
body.theme-glassy .community-filter-btn:hover,
body.theme-glassy .community-filter-btn:focus-visible {
  background: rgba(56, 189, 248, 0.22);
  color: var(--accent);
  box-shadow: 0 4px 24px var(--shadow);
  border-color: var(--accent);
}

body.theme-glassy .card,
body.theme-glassy .video-card,
body.theme-glassy .recipe-thumb-grid,
body.theme-glassy .fanart-thumb-grid,
body.theme-glassy .media-player,
body.theme-glassy .auth-container,
body.theme-glassy .modal-box,
body.theme-glassy .search-bar,
body.theme-glassy .theme-btn-modern,
body.theme-glassy #profileDropdown,
body.theme-glassy .community-filter-bar,
body.theme-glassy .video-info,
body.theme-glassy .recipe-grid-img {
  background: rgba(30, 41, 59, 0.55) !important;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18) !important;
  backdrop-filter: blur(18px) saturate(1.2);
}
body.theme-glassy .community-filter-btn {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2em;
  padding: 0.5em 1.4em;
  margin: 0 0.3em;
  color: #f1f5f9;
  box-shadow: 0 2px 12px #0002;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  border: 1.5px solid rgba(255, 255, 255, 0.33); /* Brighter border */
  backdrop-filter: blur(8px);
  font-weight: 500;
}
body.theme-glassy .community-filter-btn.active,
body.theme-glassy .community-filter-btn:hover,
body.theme-glassy .community-filter-btn:focus-visible {
  background: rgba(56, 189, 248, 0.22);
  color: var(--accent);
  box-shadow: 0 4px 24px var(--shadow);
  border-color: var(--accent);
}
body.theme-glassy .card,
body.theme-glassy .video-card,
body.theme-glassy .recipe-thumb-grid,
body.theme-glassy .fanart-thumb-grid,
body.theme-glassy .media-player,
body.theme-glassy .modal-box,
body.theme-glassy .theme-btn-modern,
body.theme-glassy #profileDropdown,
body.theme-glassy .video-info,
body.theme-glassy .recipe-grid-img {
  background: rgba(30, 41, 59, 0.55) !important;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18) !important;
  backdrop-filter: blur(18px) saturate(1.2);
  border: 1.5px solid rgba(255, 255, 255, 0.33) !important; /* Brighter border */
}

body.theme-glassy #navBrowse {
  display: none;
}

/* Enhanced Glossy Glassy Theme */
/* --- Glossy Glassy Theme (Darker, More Gloss) --- */
body.theme-glossy {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  color: #e0e6ed;
}
body.theme-glossy::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.04) 100%
  );
  mix-blend-mode: lighten;
}
body.theme-glossy .hero,
body.theme-glossy .video-card,
body.theme-glossy .media-player,
body.theme-glossy .auth-container,
body.theme-glossy .modal-box,
body.theme-glossy .search-bar,
body.theme-glossy .theme-btn-modern,
body.theme-glossy #profileDropdown,
body.theme-glossy .community-filter-bar,
body.theme-glossy .video-info,
body.theme-glossy .recipe-thumb-grid,
body.theme-glossy .recipe-grid-img,
body.theme-glossy .fanart-thumb-grid {
  background: linear-gradient(
    120deg,
    rgba(30, 41, 59, 0.85) 0%,
    rgba(15, 23, 42, 0.92) 100%
  ) !important;
  box-shadow: 0 8px 48px 0 rgba(0, 0, 0, 0.45), 0 1.5px 8px 0 #fff2 inset !important;
  backdrop-filter: blur(32px) saturate(1.5) brightness(0.95);
  border: 2.5px solid rgba(255, 255, 255, 0.18) !important;
  position: relative;
  overflow: hidden;
}
body.theme-glossy .hero::after,
body.theme-glossy .video-card::after,
body.theme-glossy .media-player::after,
body.theme-glossy .auth-container::after,
body.theme-glossy .modal-box::after,
body.theme-glossy .search-bar::after,
body.theme-glossy .theme-btn-modern::after,
body.theme-glossy #profileDropdown::after,
body.theme-glossy .community-filter-bar::after,
body.theme-glossy .video-info::after,
body.theme-glossy .recipe-thumb-grid::after,
body.theme-glossy .recipe-grid-img::after,
body.theme-glossy .fanart-thumb-grid::after {
  content: "";
  position: absolute;
  left: 10%;
  top: 0;
  width: 80%;
  height: 40%;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.13) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  border-radius: inherit;
  filter: blur(3px);
  opacity: 0.5;
  z-index: 1;
}
body.theme-glossy nav {
  background: linear-gradient(
    120deg,
    rgba(30, 41, 59, 0.85) 0%,
    rgba(15, 23, 42, 0.92) 100%
  ) !important;
  backdrop-filter: blur(28px) saturate(1.3);
  border-radius: 2.5em !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35) !important;
  padding: 0.7em 2.5em !important;
  margin: 1.5em auto 2em auto !important;
  max-width: 900px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2em;
  flex-wrap: wrap;
  border: 2.5px solid rgba(255, 255, 255, 0.13) !important;
  position: relative;
  overflow: hidden;
}
body.theme-glossy nav::after {
  content: "";
  position: absolute;
  left: 10%;
  top: 0;
  width: 80%;
  height: 40%;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.13) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  border-radius: inherit;
  filter: blur(3px);
  opacity: 0.5;
  z-index: 1;
}
body.theme-glossy nav a,
body.theme-glossy .community-filter-btn {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2em;
  padding: 0.5em 1.4em;
  margin: 0 0.3em;
  color: #e0e6ed;
  box-shadow: 0 2px 12px #0004;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}
body.theme-glossy nav a.active,
body.theme-glossy nav a:hover,
body.theme-glossy .community-filter-btn.active,
body.theme-glossy .community-filter-btn:hover,
body.theme-glossy .community-filter-btn:focus-visible {
  background: rgba(56, 189, 248, 0.18);
  color: var(--accent);
  box-shadow: 0 4px 24px var(--shadow);
  border-color: var(--accent);
}

/* --- Roulette Table Layout --- */
.roulette-table-wrap {
  display: flex;
  align-items: flex-end;
  gap: 0.7em;
  justify-content: center;
}
.roulette-zero-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.roulette-zero-col .roulette-num-btn {
  width: 3em;
  height: 7.5em;
  background: #22c55e;
  color: #fff;
  border-radius: 0.5em;
  border: none;
  font-size: 1.1em;
  margin-bottom: 0.2em;
}
.roulette-main-table {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.roulette-table-grid {
  display: grid;
  grid-template-columns: repeat(3, 3em);
  grid-template-rows: repeat(12, 2.5em);
  gap: 0.2em;
  position: relative;
}
.roulette-num-btn {
  border: none;
  border-radius: 0.3em;
  font-size: 1.1em;
  color: #fff;
  cursor: pointer;
  background: #222;
  transition: box-shadow 0.18s, outline 0.18s;
  position: relative;
  z-index: 2;
}
.roulette-num-btn[data-color="red"] { background: #ef4444; }
.roulette-num-btn.selected,
.roulette-bet-btn.selected,
.roulette-split-btn.selected,
.roulette-corner-btn.selected,
.roulette-street-btn.selected {
  outline: 3px solid #38bdf8 !important;
  z-index: 10;
}
.roulette-column-bets {
  display: grid;
  grid-template-columns: repeat(3, 3em);
  gap: 0.2em;
  margin-top: 0.2em;
}
.roulette-bet-btn {
  background: #334155;
  color: #fff;
  border-radius: 0.3em;
  border: none;
  padding: 0.7em 1.5em;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.18s, outline 0.18s;
}
.roulette-dozen-bets {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  margin-left: 0.5em;
}
.roulette-dozen-bets .roulette-bet-btn {
  width: 3.5em;
  height: 3.5em;
}
.roulette-outside-bets {
  margin: 1em 0;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7em;
  justify-content: center;
}

/* --- Spread Bets (Split, Corner, Street) --- */
.roulette-split-btn,
.roulette-corner-btn,
.roulette-street-btn {
  position: absolute;
  background: rgba(56,189,248,0.18);
  border: 2px dashed #38bdf8;
  border-radius: 0.5em;
  cursor: pointer;
  z-index: 3;
  transition: background 0.18s, border 0.18s;
  opacity: 0.7;
}
.roulette-split-btn:hover,
.roulette-corner-btn:hover,
.roulette-street-btn:hover {
  background: rgba(56,189,248,0.35);
  border: 2px solid #38bdf8;
  opacity: 1;
}
.roulette-split-btn.selected,
.roulette-corner-btn.selected,
.roulette-street-btn.selected {
  background: #38bdf8;
  border: 2px solid #fff;
  opacity: 1;
}

/* --- Position split/corner/street overlays --- */
/* You may need to adjust these for pixel-perfect alignment */
.roulette-split-btn {
  width: 1em; height: 2.5em;
}
.roulette-corner-btn {
  width: 1em; height: 1em;
}
.roulette-street-btn {
  width: 3em; height: 0.7em;
}

/* --- Spin Animation --- */
.roulette-spin-ball {
  width: 90px;
  height: 90px;
  line-height: 90px;
  margin: 0 auto;
  border-radius: 50%;
  font-size: 2.5em;
  color: #fff;
  box-shadow: 0 2px 16px #000a;
  display: inline-block;
  animation: roulette-spin 0.7s cubic-bezier(.4,2,.6,1);
}
.roulette-spin-ball.result {
  animation: roulette-bounce 0.7s cubic-bezier(.4,2,.6,1);
}
@keyframes roulette-spin {
  0% { transform: scale(0.7) rotate(-180deg); opacity: 0.2; }
  80% { transform: scale(1.1) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes roulette-bounce {
  0% { transform: scale(1.2); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* Chips and animation for roulette */
#rouletteChipsLayer {
  position:absolute;
  left:0; top:0; width:100%; height:100%; pointer-events:none; z-index:10;
}
.roulette-chip {
  position:absolute;
  width:36px; height:36px;
  pointer-events:none;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  animation: chip-pop 0.25s cubic-bezier(.4,2,.6,1);
}
@keyframes chip-pop {
  0% { transform: scale(0.7); opacity: 0.2; }
  80% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.chip-stack {
  width:36px; height:36px; border-radius:50%; background:#fff; border:2px solid #38bdf8;
  display:flex; align-items:center; justify-content:center; font-weight:bold; font-size:1em;
  box-shadow:0 2px 8px #0005;
  transition:background 0.2s, color 0.2s;
}
.chip-stack span {
  position:relative; top:-2px;
}
.roulette-spin-ball {
  width: 90px;
  height: 90px;
  line-height: 90px;
  margin: 0 auto;
  border-radius: 50%;
  font-size: 2.5em;
  color: #fff;
  box-shadow: 0 2px 16px #000a;
  display: inline-block;
  animation: roulette-spin 0.7s cubic-bezier(.4,2,.6,1);
}
.roulette-spin-ball.result {
  animation: roulette-bounce 0.7s cubic-bezier(.4,2,.6,1);
}
@keyframes roulette-spin {
  0% { transform: scale(0.7) rotate(-180deg); opacity: 0.2; }
  80% { transform: scale(1.1) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes roulette-bounce {
  0% { transform: scale(1.2); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

#rouletteChipsLayer {
  position:absolute;
  left:0; top:0; width:100%; height:100%; pointer-events:none; z-index:10;
}
.roulette-chip-stack {
  position:absolute;
  width:36px; height:auto;
  pointer-events:none;
  display:flex; flex-direction:column; align-items:center; justify-content:flex-end;
}
.chip3d {
  position: absolute;
  left: 0; width: 36px; height: 12px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 6px #0005, 0 0 0 2px #2224 inset;
  display: block;
  transition: box-shadow 0.2s;
}
.chip3d:nth-child(2) { filter: brightness(0.98); }
.chip3d:nth-child(3) { filter: brightness(0.96); }
.chip3d:nth-child(4) { filter: brightness(0.94); }
.chip3d:nth-child(5) { filter: brightness(0.92); }
.chip-amount-label {
  position: absolute;
  left: 50%; top: -18px;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  font-size: 0.95em;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 1em;
  box-shadow: 0 2px 8px #0007;
  pointer-events: none;
  z-index: 20;
  letter-spacing: 0.5px;
}
#rouletteBallMarker {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff 70%, #bbb 100%);
  box-shadow: 0 2px 8px #0007;
  border: 2px solid #222;
  pointer-events: none;
  z-index: 30;
  opacity: 0;
  transition: transform 0.7s cubic-bezier(.4,2,.6,1), opacity 0.2s;
}
#rouletteChipsLayer {
  position:absolute;
  left:0; top:0; width:100%; height:100%; pointer-events:none; z-index:10;
}
.roulette-chip-stack {
  position:absolute;
  width:36px; height:auto;
  pointer-events:none;
  display:flex; flex-direction:column; align-items:center; justify-content:flex-end;
}
.chip3d.realchip {
  position: absolute;
  left: 0; width: 36px; height: 12px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 6px #0005, 0 0 0 2px #2224 inset;
  display: block;
  transition: box-shadow 0.2s;
  overflow: visible;
}
.chip3d.realchip svg {
  pointer-events: none;
}
.chip-amount-label {
  position: absolute;
  left: 50%; top: -18px;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  font-size: 0.95em;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 1em;
  box-shadow: 0 2px 8px #0007;
  pointer-events: none;
  z-index: 20;
  letter-spacing: 0.5px;
}

.roulette-table-wrap {
  padding: 2.5em 1.5em 2em 1.5em !important;
  margin-bottom: 2em !important;
}
.roulette-main-table {
  margin-bottom: 2em !important;
}
.roulette-table-grid {
  gap: 0.5em !important;
  padding: 1em 0.5em !important;
}
.roulette-num-btn,
.roulette-bet-btn {
  margin: 0.25em 0.18em !important;
  padding: 0.7em 0.5em !important;
  min-width: 2.5em;
  min-height: 2.5em;
  font-size: 1.1em;
}
.roulette-dozen-bets,
.roulette-column-bets,
.roulette-outside-bets {
  margin: 1.2em 0 !important;
  display: flex;
  gap: 1em;
  justify-content: center;
}
#rouletteChipsLayer {
  pointer-events: none;
}
.roulette-chip-stack {
  pointer-events: auto;
  cursor: pointer;
}
.chip3d.realchip {
  box-shadow: 0 2px 8px #0007, 0 0 0 2px #2224 inset;
}
.chip-amount-label {
  margin-bottom: 0.2em;
}
#rouletteSpinAnim {
  margin-top: 2.5em !important;
  margin-bottom: 2em !important;
}
#rouletteMsg {
  margin-top: 1.5em !important;
  margin-bottom: 1.5em !important;
  font-size: 1.15em !important;
}
.roulette-bet-btn {
  background: var(--primary);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 1.2em;
  padding: 0.7em 1.7em;
  font-size: 1.08em;
  font-weight: bold;
  margin: 0.3em 0.5em;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--shadow);
  transition: background 0.18s, color 0.18s, border 0.18s, transform 0.12s;
  outline: none;
}
.roulette-bet-btn:hover,
.roulette-bet-btn:focus {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 16px var(--shadow);
}

.roulette-action-btn {
  background: linear-gradient(90deg, #38bdf8 0%, #2563eb 100%);
  color: #fff;
  border: none;
  border-radius: 2em;
  padding: 0.8em 2.2em;
  font-size: 1.13em;
  font-weight: 600;
  margin: 0.4em 0.7em;
  cursor: pointer;
  box-shadow: 0 2px 8px #0002;
  transition: background 0.18s, color 0.18s, transform 0.12s, box-shadow 0.18s;
  outline: none;
  letter-spacing: 0.03em;
}
.roulette-action-btn:hover,
.roulette-action-btn:focus {
  background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
  color: #fde047;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 16px #0003;
}

.roulette-bet-input-group {
  display: inline-flex;
  align-items: center;
  background: var(--primary, #181f2a);
  border-radius: 2em;
  border: 2px solid var(--accent, #38bdf8);
  box-shadow: 0 2px 8px var(--shadow, #0002);
  overflow: hidden;
  margin: 0 1em;
}
.roulette-bet-amount-input {
  width: 6em;
  text-align: center;
  font-size: 1.13em;
  padding: 0.7em 1.2em;
  border: none;
  background: transparent;
  color: #fff;
  outline: none;
  transition: border 0.2s;
}
.roulette-bet-step {
  background: none;
  border: none;
  color: var(--accent, #38bdf8);
  font-size: 1.5em;
  width: 2.2em;
  height: 2.2em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-radius: 50%;
  outline: none;
}
.roulette-bet-step:hover,
.roulette-bet-step:focus {
  background: var(--accent, #38bdf8);
  color: #fff;
}
.roulette-chip-stack {
  position: absolute;
  pointer-events: auto;
  z-index: 20;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.chip3d.realchip {
  width: 36px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-bottom: -6px;
  box-shadow: 0 2px 8px #0005;
  position: absolute;
  left: 0;
}
.chip-amount-label {
  position: absolute;
  top: -1.5em;
  left: 50%;
  transform: translateX(-50%);
  color: #fde047;
  font-size: 0.95em;
  font-weight: bold;
  text-shadow: 0 1px 8px #000a;
  pointer-events: none;
}
.roulette-chip-stack {
  position: absolute;
  pointer-events: auto;
  z-index: 20;
  width: 36px;
  /* height is set inline */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.chip3d.realchip {
  width: 36px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-bottom: 0;
  box-shadow: 0 2px 8px #0005;
  position: absolute;
  left: 0;
  cursor: pointer;
  pointer-events: auto;
}
.chip-amount-label {
  position: absolute;
  top: -1.5em;
  left: 50%;
  transform: translateX(-50%);
  color: #fde047;
  font-size: 0.95em;
  font-weight: bold;
  text-shadow: 0 1px 8px #000a;
  pointer-events: none;
}
.roulette-chip-stack {
  position: absolute;
  pointer-events: none;
  z-index: 20;
  width: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.chip3d.realchip {
  width: 36px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-bottom: 0;
  box-shadow: 0 2px 8px #0005;
  position: absolute;
  left: 0;
  pointer-events: none;
  user-select: none;
}
.chip3d.realchip:last-child {
  pointer-events: auto;
  cursor: pointer;
}
.chip3d.chip-overflow {
  background: #fbbf24 !important;
  border: 2px solid #fbbf24 !important;
}
.chip-amount-label {
  position: absolute;
  top: -1.5em;
  left: 50%;
  transform: translateX(-50%);
  color: #fde047;
  font-size: 0.95em;
  font-weight: bold;
  text-shadow: 0 1px 8px #000a;
  pointer-events: none;
}
/* --- ROULETTE: Fit table and chips on screen, no scroll --- */
.roulette-table-wrap {
  padding: 0.5em 0.5em 0.5em 0.5em !important;
  margin-bottom: 0 !important;
  max-width: 100vw !important;
  max-height: 90vh !important;
  overflow: visible !important;
  box-sizing: border-box;
}
.roulette-main-table {
  margin-bottom: 0 !important;
  max-width: 100vw !important;
  max-height: 90vh !important;
  overflow: visible !important;
}
.roulette-table-grid {
  gap: 0.2em !important;
  padding: 0.2em 0.2em !important;
  max-width: 100vw !important;
  max-height: 60vh !important;
  overflow: visible !important;
}
.roulette-num-btn,
.roulette-bet-btn {
  min-width: 2em !important;
  min-height: 2em !important;
  font-size: 1em !important;
  padding: 0.5em 0.3em !important;
  margin: 0.1em 0.1em !important;
}
.roulette-chip-stack {
  max-height: 60px !important;
  overflow: visible !important;
}
.chip3d.realchip {
  width: 28px !important;
  height: 9px !important;
  left: 4px !important;
}
.chip-amount-label {
  font-size: 0.85em !important;
  top: -1.2em !important;
  padding: 1px 6px !important;
}
.roulette-actions-bar {
  flex-wrap: wrap;
  gap: 0.5em !important;
  margin: 0.7em 0 0.5em 0 !important;
}
.roulette-bet-input-group {
  margin: 0 0.5em !important;
}
@media (max-width: 700px) {
  .roulette-table-wrap,
  .roulette-main-table,
  .roulette-table-grid {
    max-width: 100vw !important;
    max-height: 60vh !important;
    padding: 0.1em !important;
    gap: 0.1em !important;
  }
  .roulette-num-btn,
  .roulette-bet-btn {
    min-width: 1.5em !important;
    min-height: 1.5em !important;
    font-size: 0.9em !important;
    padding: 0.3em 0.2em !important;
    margin: 0.05em 0.05em !important;
  }
  .chip3d.realchip {
    width: 20px !important;
    height: 7px !important;
    left: 8px !important;
  }
  .roulette-chip-stack {
    max-height: 36px !important;
  }
}
.roulette-flex-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 2em;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}
.roulette-table-side {
  flex: 1 1 0;
  min-width: 320px;
  max-width: 600px;
}
.roulette-actions-side {
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2em;
  min-width: 220px;
  max-width: 320px;
}
.roulette-actions-bar {
  flex-direction: column;
  align-items: flex-start;
  gap: 1em;
  width: 100%;
}
.roulette-bet-input-group {
  margin-bottom: 1em;
}
@media (max-width: 900px) {
  .roulette-flex-layout {
    flex-direction: column;
    align-items: stretch;
    gap: 1em;
  }
  .roulette-actions-side {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    min-width: 0;
    max-width: 100vw;
    gap: 0.5em;
  }
  .roulette-table-side {
    max-width: 100vw;
  }
}
#minesStartBtn:disabled {
  opacity: 0.5;
  filter: grayscale(0.5) brightness(0.8);
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}
/* Add this to your <style> section */

/* Lottery Styles */
.lottery-number-btn:hover:not([style*="var(--accent)"]) {
  background: #334155 !important;
  border-color: #64748b !important;
  transform: scale(1.05);
}

.lottery-ball {
  transition: all 0.3s ease;
}

.lottery-ball:hover {
  transform: scale(1.1);
}

/* Lottery card highlight effect */
.video-card:has(.lottery-highlight) {
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  border: 1px solid #ffd700;
}
/* Add this to your existing <style> section */

/* Lottery States Styling */
.lottery-drawing {
  animation: drawingPulse 2s infinite;
  border: 2px solid #ffc107 !important;
  box-shadow: 0 0 20px rgba(255, 193, 7, 0.3) !important;
}

.lottery-completed {
  opacity: 0.8;
  filter: grayscale(0.2);
}

@keyframes drawingPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 193, 7, 0.3); }
  50% { box-shadow: 0 0 30px rgba(255, 193, 7, 0.6); }
}

@keyframes liveBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(0deg); }
  10% { transform: translateY(-5px) rotate(5deg); }
  30% { transform: translateY(-3px) rotate(-3deg); }
  40% { transform: translateY(-8px) rotate(3deg); }
  60% { transform: translateY(-4px) rotate(-2deg); }
}

@keyframes reveal {
  0% { transform: scale(0.8) rotateY(180deg); opacity: 0; }
  50% { transform: scale(1.2) rotateY(90deg); }
  100% { transform: scale(1) rotateY(0deg); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}











.offline-modal {
            display: flex;
            position: fixed;
            z-index: 9999;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(5px);
            justify-content: center;
            align-items: center;
        }

        .modal-content {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 40px;
            border-radius: 20px;
            text-align: center;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
            max-width: 500px;
            width: 90%;
            position: relative;
            animation: modalSlideIn 0.5s ease-out;
        }

        @keyframes modalSlideIn {
            from {
                transform: translateY(-50px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .modal-content h2 {
            color: white;
            font-size: 2.5em;
            margin-bottom: 20px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }

        .modal-content p {
            color: #f0f0f0;
            font-size: 1.2em;
            margin-bottom: 30px;
            line-height: 1.6;
        }

        .offline-icon {
            font-size: 4em;
            margin-bottom: 20px;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .close-btn {
            display: none;
            background: #ff4757;
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 25px;
            font-size: 1.1em;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-top: 20px;
        }

        .close-btn:hover {
            background: #ff3838;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
        }

        .admin-login {
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.2);
        }

        .admin-input {
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.2);
            color: white;
            padding: 12px 20px;
            border-radius: 25px;
            font-size: 1em;
            width: 200px;
            margin-right: 10px;
            transition: all 0.3s ease;
        }

        .admin-input:focus {
            outline: none;
            border-color: rgba(255, 255, 255, 0.5);
            background: rgba(255, 255, 255, 0.2);
        }

        .admin-input::placeholder {
            color: rgba(255, 255, 255, 0.7);
        }

        .admin-btn {
            background: #2ed573;
            color: white;
            border: none;
            padding: 12px 25px;
            border-radius: 25px;
            font-size: 1em;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .admin-btn:hover {
            background: #26d968;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(46, 213, 115, 0.4);
        }

        .error-message {
            color: #ff6b7a;
            font-size: 0.9em;
            margin-top: 10px;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .error-message.show {
            opacity: 1;
            animation: shake 0.5s ease-in-out;
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-5px); }
            75% { transform: translateX(5px); }
        }

        /* Hide main content when modal is active */
        body.modal-active {
            overflow: hidden;
        }

        .main-content {
            filter: blur(3px);
            pointer-events: none;
        }

        .lottery-expired {
  opacity: 0.8;
}

.lottery-expired:hover {
  opacity: 1;
}

.build-version {
  color: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
}