:root {
  --bg: #09070e;
  --panel: rgba(16, 10, 24, 0.82);
  --panel-border: rgba(255, 255, 255, 0.06);
  --text: #f8f4e8;
  --muted: #b0a880;
  --accent: #e8c44a;
  --accent-dark: #b8921a;
  --green: #10b981;
  --yellow: #f59e0b;
  --grey: #374151;
  --font-display: 'Outfit', Inter, system-ui, -apple-system, sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(232, 196, 74, 0.09) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(120, 60, 180, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #09070e 0%, #0e0a18 50%, #080710 100%);
  overflow-x: hidden;
  position: relative;
}

/* Background Decorative Glowing Orbs */
.orb {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
}

.orb-1 {
  top: 10%;
  left: -100px;
  background: radial-gradient(circle, rgba(232, 196, 74, 0.13) 0%, transparent 70%);
}

.orb-2 {
  bottom: 10%;
  right: -100px;
  background: radial-gradient(circle, rgba(120, 60, 180, 0.10) 0%, transparent 70%);
}

/* Main Layout Grid */
.layout-container {
  display: grid;
  grid-template-columns: 320px 1fr 260px;
  /* Widened left sidebar for 300x300 ad */
  gap: 32px;
  max-width: 1460px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 20px 24px;
  align-items: start;
}

/* Sidebar Columns (Ad Space Placeholder) */
.sidebar {
  position: sticky;
  top: 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ad-placeholder {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 24px 16px;
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ad-placeholder:hover {
  border-color: rgba(232, 196, 74, 0.25);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), 0 0 20px rgba(232, 196, 74, 0.07);
}

.ad-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(232, 196, 74, 0.12);
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid rgba(232, 196, 74, 0.2);
}

.ad-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(232, 196, 74, 0.07) 0%, transparent 60%);
  pointer-events: none;
}

.ad-text {
  margin-top: 16px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ad-desc {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 6px 0 16px;
}

/* Vinyl Player Widget on Left */
.vinyl-container {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 24px auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vinyl {
  width: 155px;
  height: 155px;
  border-radius: 50%;
  background: radial-gradient(circle, #242424 24%, #121212 25%, #050505 35%, #1b1b1b 36%, #0b0b0b 48%, #1f1f1f 49%, #050505 70%);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: spin 8s linear infinite;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Vinyl grooves texture simulation */
.vinyl::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.vinyl::after {
  content: "";
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  bottom: 24px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.vinyl-label {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle, #e8c44a 15%, #7c3f9e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #0a0710;
  font-family: var(--font-display);
  font-weight: 800;
  text-align: center;
  box-shadow: 0 0 12px rgba(232, 196, 74, 0.5);
  padding: 4px;
}

.vinyl-label .artist {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 900;
}

.vinyl-label .album {
  font-size: 0.45rem;
  font-weight: 500;
  opacity: 0.8;
  margin-top: 1px;
}

.tone-arm {
  position: absolute;
  top: 0px;
  right: 5px;
  width: 40px;
  height: 80px;
  background: transparent;
  border-right: 3px solid #7a7f8d;
  border-top: 3px solid #7a7f8d;
  border-top-right-radius: 12px;
  transform: rotate(24deg);
  transform-origin: top right;
  pointer-events: none;
  transition: transform 0.5s ease;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.tone-arm::after {
  content: "";
  position: absolute;
  bottom: -4px;
  right: -5px;
  width: 7px;
  height: 14px;
  background: var(--accent-dark);
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Right Sidebar Mockup Ad Card */
.ad-mockup {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ad-mockup:hover {
  transform: translateY(-3px);
  border-color: rgba(229, 193, 88, 0.25);
  background: rgba(229, 193, 88, 0.02);
}

.guitar-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  animation: pulse 2s infinite ease-in-out;
}

.mockup-title {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.mockup-text {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
  margin-bottom: 14px;
}

.mockup-btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border: none;
  color: #0a0710;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(232, 196, 74, 0.18);
}

.mockup-btn:hover {
  opacity: 0.95;
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(232, 196, 74, 0.30);
}

/* Center Game Column */
.main-content {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 40px);
}

.app-shell {
  width: 100%;
  max-width: 520px;
  /* Highly compact main application width */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Hero Section Styles */
.hero {
  padding: 18px 20px;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero h1 {
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #fff 20%, #e8c44a 60%, #7c3f9e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted);
}

/* Highly Prominent Colorful Daily Return Badge */
.daily-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 16px;
  background: rgba(232, 196, 74, 0.06);
  border: 1px solid rgba(232, 196, 74, 0.28);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(232, 196, 74, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transition: all 0.3s ease;
  animation: pulseGlow 2.5s infinite ease-in-out;
}

.daily-badge:hover {
  background: rgba(232, 196, 74, 0.14);
  border-color: rgba(232, 196, 74, 0.50);
  box-shadow: 0 8px 25px rgba(232, 196, 74, 0.18);
}

.daily-badge .badge-text {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(45deg, #e8c44a, #ffffff, #7c3f9e, #e8c44a, #ffffff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: flowGradient 4s linear infinite;
}

.daily-badge .badge-icon {
  font-size: 0.95rem;
  animation: rotateSparkle 2s linear infinite;
  display: inline-block;
}

/* Animations for colorful badge */
@keyframes flowGradient {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

@keyframes rotateSparkle {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }

  50% {
    transform: scale(1.2) rotate(180deg);
    opacity: 0.85;
  }
}

@keyframes pulseGlow {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(232, 196, 74, 0.06);
  }

  50% {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(232, 196, 74, 0.18), 0 0 15px rgba(232, 196, 74, 0.10);
  }
}

/* Game Interface Panel */
.game-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 24px;
  background: rgba(13, 18, 30, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.3s ease;
}

.game-panel:hover {
  border-color: rgba(232, 196, 74, 0.18);
}

/* Compact Wordle Board Layout */
.board {
  display: grid;
  width: min(100%, 240px);
  /* Tighter compact board */
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  /* Compact tile gaps */
  justify-items: stretch;
  margin: 4px auto;
}

/* Tile styling */
.tile {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 44px;
  border-radius: 8px;
  /* Tighter rounded edges */
  border: 2px solid rgba(255, 255, 255, 0.18);
  /* Much more visible border */
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.35rem;
  /* Tighter bold lettering */
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(4, 6, 10, 0.8);
  /* Beautiful dark contrast inside tile */
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.tile:hover {
  border-color: rgba(232, 196, 74, 0.35);
  background: rgba(232, 196, 74, 0.04);
}

.tile.filled {
  border-color: var(--accent);
  background: rgba(232, 196, 74, 0.10);
  color: #fff;
  box-shadow: 0 0 10px rgba(232, 196, 74, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

/* State evaluation gradients */
.tile.correct {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border-color: rgba(16, 185, 129, 0.6) !important;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.tile.present {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  border-color: rgba(245, 158, 11, 0.6) !important;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tile.absent {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%) !important;
  border-color: rgba(75, 85, 99, 0.4) !important;
  color: rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  opacity: 0.85;
}

/* Message Display Styling */
.message-container {
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent);
  font-weight: 600;
  text-align: center;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 320px);
  margin: 2px auto;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.message-container.active {
  background: rgba(232, 196, 74, 0.10);
  border-color: rgba(232, 196, 74, 0.4);
  color: #fff;
  text-shadow: 0 0 8px rgba(232, 196, 74, 0.5);
  transform: scale(1.02);
}

/* Keyboard Panel Styling */
.keyboard {
  display: grid;
  gap: 6px;
  /* Compact gap */
  width: min(100%, 460px);
  /* Highly compact keyboard width */
  margin: 4px auto;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 5px;
  /* Tighter letter-to-letter distance */
}

.key {
  flex: 1;
  max-width: 42px;
  height: 44px;
  /* Slightly taller for better touch targets */
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  /* Much more visible border */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.04) 100%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  user-select: none;
}

.key:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.1) 100%);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.key:active {
  transform: translateY(1px);
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.key.wide {
  flex: 1.6;
  max-width: 66px;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.key.correct {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #fff !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.key.present {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #fff !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.key.absent {
  background: rgba(20, 26, 40, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.5) !important;
  opacity: 0.75;
  box-shadow: none;
}

/* Open "How to Play" Box */
.tip-box {
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  margin-top: 4px;
}

.tip-header {
  margin-bottom: 8px;
}

.tip-header h3 {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 700;
}

.tip-content {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.legend-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-left: 4px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

.legend-dot.green {
  background: var(--green);
}

.legend-dot.yellow {
  background: var(--yellow);
}

.legend-dot.grey {
  background: var(--grey);
}

/* Daily Reminder Box */
.reminder-box {
  padding: 16px 20px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  margin-top: 4px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.reminder-box:hover {
  border-color: rgba(232, 196, 74, 0.18);
}

.reminder-header h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.reminder-header p {
  color: var(--muted);
  font-size: 0.74rem;
  margin-bottom: 12px;
}

.reminder-form {
  display: flex;
  gap: 8px;
  width: 100%;
}

.reminder-form input[type="email"] {
  flex: 1;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  transition: all 0.2s ease;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.reminder-form input[type="email"]:focus {
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 10px rgba(232, 196, 74, 0.18), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.reminder-form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.reminder-form button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border: none;
  color: #0a0710;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(232, 196, 74, 0.20);
  white-space: nowrap;
}

.reminder-form button:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(232, 196, 74, 0.30);
}

.reminder-form button:active {
  transform: translateY(1px);
}

.reminder-message {
  font-size: 0.74rem;
  margin-top: 8px;
  font-weight: 600;
  min-height: 18px;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  opacity: 0;
  transform: translateY(-5px);
}

.reminder-message.show {
  opacity: 1;
  transform: translateY(0);
}

.reminder-message.success {
  color: var(--green);
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.reminder-message.error {
  color: #ef4444;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}

/* Premium Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 10, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Card */
.modal-card {
  background: rgba(13, 18, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  width: min(90%, 420px);
  padding: 36px 28px;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: scale(0.9) translateY(-20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  transform: scale(1.08);
}

.modal-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.12);
  color: var(--green);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  margin-bottom: 16px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #fff 40%, var(--green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-subtitle {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.modal-form .reminder-email {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
}

.modal-form .reminder-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--green) 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

.modal-footer {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 16px;
}

/* Footer Styling */
.footer {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  font-size: 0.7rem;
}

/* Animations */
@keyframes pop {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  40% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.tile.pop {
  animation: pop 0.15s ease-out;
}

@keyframes flip {
  0% {
    transform: rotateX(0deg);
    background: rgba(255, 255, 255, 0.02);
  }

  45% {
    transform: rotateX(90deg);
    background: rgba(255, 255, 255, 0.02);
  }

  55% {
    transform: rotateX(90deg);
  }

  100% {
    transform: rotateX(0deg);
  }
}

.tile.flip {
  animation: flip 0.5s ease-out forwards;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-12px) scale(1.02);
  }

  60% {
    transform: translateY(-6px);
  }
}

.tile.bounce {
  animation: bounce 0.6s ease-out;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  15%,
  45%,
  75% {
    transform: translateX(-4px);
  }

  30%,
  60%,
  90% {
    transform: translateX(4px);
  }
}

.tile.shake {
  animation: shake 0.5s ease-out;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.85;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Media Queries & Responsive Layout Adjustments */
@media (max-width: 1200px) {
  .layout-container {
    grid-template-columns: 320px 1fr;
    /* Keep left sidebar 320px on tablets for the 300x300 ad */
    max-width: 1060px;
    gap: 20px;
  }

  .sidebar-right {
    display: none;
    /* Hide one sidebar on tablet sizes to balance game with one ad */
  }
}

@media (max-width: 800px) {
  .layout-container {
    grid-template-columns: 1fr;
    padding: 12px 16px;
  }

  .sidebar {
    display: none;
    /* Hide both sidebars on mobile to prioritize gameplay space */
  }

  .main-content {
    min-height: auto;
  }

  .app-shell {
    max-width: 100%;
    gap: 12px;
  }

  .hero {
    padding: 14px 16px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .daily-badge {
    padding: 6px 12px;
    margin-top: 10px;
    border-radius: 8px;
  }

  .daily-badge .badge-text {
    font-size: 0.7rem;
    letter-spacing: 0.02em;
  }

  .daily-badge .badge-icon {
    font-size: 0.8rem;
  }

  .game-panel {
    padding: 16px 8px;
    /* Compact padding to fit mobile screens */
    border-radius: 16px;
    gap: 10px;
  }

  .board {
    width: min(100%, 200px);
    /* Slightly tighter board on mobile */
    gap: 4px;
  }

  .tile {
    font-size: 1.15rem;
    border-width: 1.5px;
  }

  .keyboard {
    gap: 4px;
    width: 100%;
  }

  .keyboard-row {
    gap: 3px;
  }

  .key {
    height: 36px;
    /* Touch-optimized height for mobile */
    font-size: 0.75rem;
    border-radius: 5px;
  }

  .key.wide {
    font-size: 0.65rem;
  }
}

/* Sidebar 300x300 Ad Widget Styling */
.sidebar-ad-container {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.sidebar-ad-link {
  display: block;
  width: 300px;
  height: 300px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.sidebar-ad-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
  z-index: 2;
}

.sidebar-ad-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-ad-link:hover {
  transform: translateY(-5px);
  border-color: rgba(232, 196, 74, 0.4);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65), 0 0 25px rgba(232, 196, 74, 0.20);
}

.sidebar-ad-link:hover img {
  transform: scale(1.06);
}

/* Large Countdown Widget when Game Over */
.countdown-card {
  display: none;
  /* Hidden by default, shown via JS */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  margin: 16px auto 0 auto;
  padding: 24px;
  background: rgba(232, 196, 74, 0.03);
  border: 1px dashed rgba(232, 196, 74, 0.30);
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.02);
  animation: pulseGlowTimer 3s infinite ease-in-out;
  transition: all 0.3s ease;
}

.countdown-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.countdown-timer {
  font-family: 'Courier New', Courier, monospace;
  font-size: 2.5rem;
  /* Big, bold, digital clock! */
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-shadow: 0 0 20px rgba(232, 196, 74, 0.55);
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(232, 196, 74, 0.18);
  display: inline-block;
  margin: 8px 0;
  min-width: 220px;
}

.countdown-footer {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 8px;
  opacity: 0.8;
}

@keyframes pulseGlowTimer {

  0%,
  100% {
    border-color: rgba(232, 196, 74, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  }

  50% {
    border-color: rgba(232, 196, 74, 0.55);
    box-shadow: 0 12px 35px rgba(232, 196, 74, 0.15);
  }
}

@media (max-width: 480px) {
  .countdown-timer {
    font-size: 2rem;
    padding: 6px 12px;
    min-width: 180px;
  }

  .countdown-card {
    padding: 16px;
    margin-top: 12px;
  }

  /* Mobile Modal Optimizations */
  .modal-card {
    padding: 24px 20px;
    border-radius: 20px;
    max-height: 85vh;
    overflow-y: auto;
    /* Custom scrollbar style for premium glass look */
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(0,0,0,0.2);
  }

  .modal-card::-webkit-scrollbar {
    width: 4px;
  }

  .modal-card::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
  }

  .modal-close-btn {
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }

  .modal-badge {
    font-size: 0.6rem;
    padding: 4px 10px;
    margin-bottom: 12px;
  }

  .modal-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
  }

  .modal-subtitle {
    font-size: 0.76rem;
    margin-bottom: 16px;
    line-height: 1.4;
  }

  .modal-form .reminder-email,
  .modal-form .reminder-btn {
    padding: 10px 14px;
    font-size: 0.8rem;
    border-radius: 8px;
  }
}

/* Sidebar Info & Timer Card */
.sidebar-info-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

.sidebar-info-card:hover {
  border-color: rgba(232, 196, 74, 0.25);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), 0 0 20px rgba(232, 196, 74, 0.07);
}

.sidebar-info-card .eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.meta-chips-vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  align-items: center;
}

.meta-chips-vertical .chip {
  width: auto;
  justify-content: center;
  padding: 6px 14px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 99px;
  color: var(--text);
  font-weight: 600;
}

.sidebar-countdown {
  width: 100%;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.sidebar-countdown .countdown-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.sidebar-timer {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.8rem; /* Big glowing timer clock! */
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-shadow: 0 0 15px rgba(232, 196, 74, 0.50);
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 10px;
  border: 1px solid rgba(232, 196, 74, 0.14);
  min-width: 160px;
  text-align: center;
}

/* Mobile Landscape & Short Screen Optimizations */
@media (max-height: 500px) {
  .modal-card {
    padding: 16px 20px;
    max-height: 95vh;
    border-radius: 16px;
    width: min(95%, 460px);
  }
  
  .modal-badge {
    display: none !important;
  }
  
  .modal-subtitle {
    display: none !important;
  }
  
  .modal-title {
    font-size: 1.15rem;
    margin-bottom: 12px;
    margin-top: 4px;
  }
  
  .modal-form {
    gap: 8px;
    flex-direction: row !important; /* Align email input and button side-by-side to save height */
  }
  
  .modal-form .reminder-email {
    flex: 2;
    padding: 8px 12px;
    font-size: 0.75rem;
  }

  .modal-form .reminder-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  
  .modal-footer {
    display: none !important;
  }
}