* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; /* Remove blue highlight on mobile */
}

html {
  overflow-x: hidden;
}

body {
  font-family: verdana, arial, helvetica, sans-serif;
  background: #aae0aa;
  color: #000;
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%; /* Prevent font scaling on iOS */
  -ms-text-size-adjust: 100%;
  touch-action: manipulation; /* Improve touch responsiveness */
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Mobile-first responsive padding */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
}

header {
  text-align: center;
  margin-bottom: 30px;
  margin-top: 30px;
  background: #e8f5e8;
  padding: 5px 25px;
  border: 1px solid #bababa;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

/* Mobile header optimization */
@media (max-width: 768px) {
  header {
    margin-bottom: 20px;
    margin-top: 20px;
    padding: 15px 10px;
    border-radius: 6px;
  }
}

/* Daily Challenge Button */
.daily-mode-btn {
  position: absolute;
  top: 15px;
  left: 20px;
  background: #ff6b35;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 10;
}

.daily-mode-btn:hover {
  background: #e85a25;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* Mobile daily button repositioning */
@media (max-width: 768px) {
  .daily-mode-btn {
    position: relative;
    top: auto;
    left: auto;
    margin: 10px auto;
    justify-content: center;
  }
}

/* Franchise toggle styling */
.franchise-toggle-container {
  position: absolute;
  top: 15px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mobile toggle repositioning */
@media (max-width: 768px) {
  .franchise-toggle-container {
    position: relative;
    top: auto;
    right: auto;
    justify-content: center;
    margin: 10px 0;
  }
}

.toggle-label {
  font-size: 12px;
  color: #006600;
  font-weight: bold;
  user-select: none;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
  border: 1px solid #999;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  border: 1px solid #999;
}

input:checked + .toggle-slider {
  background-color: #90c490;
  border-color: #70a470;
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
  border-color: #70a470;
}

/* Difficulty selector styling */
.difficulty-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  padding: 10px 20px;
  border: 1px solid #bababa;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.difficulty-selector label {
  font-size: 12px;
  color: #006600;
  font-weight: bold;
  user-select: none;
}

.difficulty-dropdown {
  padding: 4px 8px;
  border: 1px solid #bababa;
  border-radius: 4px;
  background: white;
  font-size: 12px;
  color: #006600;
  font-weight: bold;
  cursor: pointer;
}

.difficulty-dropdown:hover {
  background: #f5f5f5;
}

.difficulty-dropdown:focus {
  outline: 2px solid #90c490;
  outline-offset: 1px;
}

/* Mobile difficulty selector */
@media (max-width: 768px) {
  .difficulty-selector {
    padding: 8px 12px;
    font-size: 12px;
  }

  .difficulty-dropdown {
    padding: 8px 12px;
    font-size: 14px;
    min-height: 44px; /* Touch-friendly target size */
    min-width: 120px;
  }
}

/* Difficulty indicator in game area */
.difficulty-indicator {
  text-align: center;
  margin-bottom: 20px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #bababa;
  border-radius: 6px;
  display: inline-block;
}

.difficulty-label {
  font-size: 14px;
  color: #666;
  font-weight: normal;
}

.difficulty-value {
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
}

.difficulty-value.easy {
  color: #28a745; /* Green */
}

.difficulty-value.medium {
  color: #ffc107; /* Yellow */
}

.difficulty-value.hard {
  color: #dc3545; /* Red */
}

.toggle-slider:hover {
  background-color: #ddd;
}

input:checked + .toggle-slider:hover {
  background-color: #a0d4a0;
}

/* Info icon styling */
.info-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f0f8f0;
  border: 1px solid #90c490;
  color: #006600;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-left: 5px;
  font-family: verdana, arial, helvetica, sans-serif;
}

.info-icon:hover {
  background: #e0f0e0;
  border-color: #70a470;
  transform: scale(1.1);
}

.info-icon:active {
  transform: scale(0.95);
}

.logo {
  max-height: 225px;
  max-width: 100%;
  height: auto;
  margin-bottom: -100px;
  margin-top: -50px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.how-to-play-btn {
  background: linear-gradient(135deg, #e8f5e8 0%, #d4f0d4 100%);
  border: 2px solid #90c490;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: bold;
  color: #006600;
  cursor: pointer;
  font-family: verdana, arial, helvetica, sans-serif;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  margin-top: 8px;
}

.how-to-play-btn:hover {
  background: linear-gradient(135deg, #d4f0d4 0%, #c0e0c0 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 102, 0, 0.2);
  border-color: #70a470;
}

.how-to-play-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
}

.popup-content {
  background: #fff;
  border: 2px solid #bababa;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px 15px;
  border-bottom: 1px solid #eee;
  background: #f8f8f8;
  border-radius: 6px 6px 0 0;
}

.popup-header h2 {
  font-family: tahoma, verdana, arial, helvetica, sans-serif;
  font-size: 20px;
  color: #006;
  margin: 0;
  font-weight: bold;
}

.close-popup {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-popup:hover {
  background: #f0f0f0;
  color: #333;
}

.popup-body {
  padding: 25px;
  line-height: 1.6;
  font-size: 15px;
}

.popup-body p {
  margin: 0 0 15px 0;
  color: #333;
}

.popup-body ul {
  margin: 15px 0;
  padding-left: 20px;
}

.popup-body li {
  margin: 8px 0;
  color: #333;
}

.popup-body strong {
  color: #006;
  font-weight: bold;
}

.popup-footer {
  padding: 15px 25px 25px;
  text-align: center;
  border-top: 1px solid #eee;
  background: #f8f8f8;
  border-radius: 0 0 6px 6px;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  font-size: 15px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* Mobile stats optimization */
@media (max-width: 768px) {
  .stats {
    gap: 15px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .stats {
    gap: 8px;
    margin-bottom: 15px;
  }
}

.stat {
  background: #fff;
  padding: 10px 20px;
  border: 1px solid #bababa;
  border-radius: 4px;
  font-weight: normal;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

/* Mobile stat blocks */
@media (max-width: 768px) {
  .stat {
    padding: 8px 12px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .stat {
    padding: 6px 10px;
    font-size: 11px;
    min-width: 70px;
    text-align: center;
  }
}

.stat:hover {
  transform: translateY(-1px);
}

/* Score information styling */
.score-info {
  font-size: 14px;
  color: #666;
  margin: 5px 0;
}

.score-info span {
  font-weight: bold;
  color: #006600;
}

.game-area {
  position: relative;
  min-height: 562px;
  background: #fff;
  border: 1px solid #bababa;
  border-radius: 8px;
  padding: 37px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 16px;
  color: #006600;
  font-weight: bold;
}

.spinner {
  width: 60px;
  height: 60px;
  position: relative;
  margin: 0 auto 20px;
}

.spinner::before,
.spinner::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
}

.spinner::before {
  border-top: 3px solid #4caf50;
  border-right: 3px solid #4caf50;
  animation: spinClockwise 1.2s linear infinite;
}

.spinner::after {
  border-bottom: 3px solid #81c784;
  border-left: 3px solid #81c784;
  animation: spinCounterClockwise 1.2s linear infinite;
}

@keyframes spinClockwise {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes spinCounterClockwise {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

/* Pulsing text effect */
.loading p {
  animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* Celebration particles */
.celebration-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2000;
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  animation: particleFall 3s linear forwards;
}

.particle:nth-child(odd) {
  background: #81c784;
}

.particle:nth-child(3n) {
  background: #ffeb3b;
  border-radius: 0;
  transform: rotate(45deg);
}

@keyframes particleFall {
  0% {
    transform: translateY(-10px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

.game-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 475px;
  gap: 20px;
  margin-top: 140px;
  margin-bottom: 140px;
}

.game-characters {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  gap: 37px;
}

/* Mobile game layout - stack vertically */
@media (max-width: 768px) {
  .game-content {
    margin-top: 60px;
    margin-bottom: 60px;
    min-height: auto;
  }

  .game-characters {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .game-content {
    margin-top: 30px;
    margin-bottom: 30px;
  }

  .game-characters {
    gap: 15px;
  }
}

.character-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.character-card {
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  border: 2px solid #bababa;
  border-radius: 12px;
  padding: 37px;
  text-align: center;
  min-height: 275px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  overflow: hidden;
  -webkit-touch-callout: none; /* Disable iOS callout */
  -webkit-user-select: none; /* Disable text selection */
  user-select: none;
}

/* Mobile character card optimization */
@media (max-width: 768px) {
  .character-card {
    padding: 25px;
    min-height: 220px;
    max-width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .character-card {
    padding: 20px;
    min-height: 180px;
    border-radius: 8px;
    font-size: 14px;
  }
}

/* Mobile touch interactions */
@media (hover: none) and (pointer: coarse) {
  .character-card:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: #bababa;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
  }

  .character-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border-color: #4caf50;
    background: linear-gradient(145deg, #f8fff8, #e8f5e8);
  }
}

.character-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.6s ease;
}

.character-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 35px rgba(76, 175, 80, 0.3), 0 5px 15px rgba(0, 0, 0, 0.1);
  border-color: #4caf50;
  background: linear-gradient(145deg, #f8fff8, #e8f5e8);
}

.character-card:hover::before {
  left: 100%;
}

.character-card:active {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2), 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.1s ease;
}

/* Add pulse animation for correct answers */
.character-card.correct-answer {
  animation: correctPulse 0.6s ease-out;
  border-color: #4caf50;
  background: linear-gradient(145deg, #e8f5e8, #d4edda);
}

.character-card.wrong-answer {
  animation: wrongShake 0.6s ease-out;
  border-color: #f44336;
  background: linear-gradient(145deg, #ffeaea, #f8d7da);
}

@keyframes correctPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(76, 175, 80, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }
}

@keyframes wrongShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

.character-card h2 {
  font-family: tahoma, verdana, arial, helvetica, sans-serif;
  font-size: 20px;
  margin-bottom: 20px;
  color: #000;
  word-wrap: break-word;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.character-subtext {
  font-size: 12px;
  color: #555;
  margin-top: -10px;
  margin-bottom: 10px;
  line-height: 1.3;
  display: none; /* shown only when notes exist */
}

.post-count {
  margin-bottom: 15px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.post-count span:first-child {
  font-size: 40px;
  font-weight: bold;
  color: #060;
  display: block;
  font-family: tahoma, verdana, arial, helvetica, sans-serif;
  line-height: 1;
  transition: all 0.3s ease;
}

.post-count .label {
  font-size: 12px;
  color: #666;
  text-transform: lowercase;
  transition: color 0.3s ease;
}

.post-count.hidden {
  opacity: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
  transform: scale(0.8);
}

/* Prevent initial flash by fully removing from layout until reveal */
.post-count.hard-hidden {
  display: none;
}

/* Animation for count reveal */
.post-count.revealing {
  animation: countReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes countReveal {
  0% {
    opacity: 0;
    transform: scale(0.5) rotateX(90deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) rotateX(0deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotateX(0deg);
  }
}

/* Number counting animation */
.post-count.counting span:first-child {
  animation: numberBounce 0.6s ease-out;
}

@keyframes numberBounce {
  0%,
  20%,
  60%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  80% {
    transform: translateY(-5px);
  }
}

.question-mark {
  font-size: 60px;
  color: #006;
  font-weight: bold;
  opacity: 0.8;
  font-family: tahoma, verdana, arial, helvetica, sans-serif;
}

.vs-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 175px;
  padding: 0 25px;
}

/* Mobile VS section optimization */
@media (max-width: 768px) {
  .vs-section {
    min-width: auto;
    padding: 15px 0;
    margin: 10px 0;
  }
}

@media (max-width: 480px) {
  .vs-section {
    padding: 10px 0;
    margin: 5px 0;
  }
}

.instruction-text {
  font-size: 1.1rem;
  font-weight: bold;
  text-align: center;
  color: #006;
  font-family: tahoma, verdana, arial, helvetica, sans-serif;
  margin-bottom: 10px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Mobile instruction text */
@media (max-width: 768px) {
  .instruction-text {
    font-size: 1rem;
    margin-bottom: 8px;
  }
}

@media (max-width: 480px) {
  .instruction-text {
    font-size: 0.9rem;
    margin-bottom: 5px;
  }
}

.vs-text {
  font-size: 2.5rem;
  font-weight: bold;
  text-align: center;
  margin: 15px 0;
  color: #800;
  font-family: tahoma, verdana, arial, helvetica, sans-serif;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Mobile VS text */
@media (max-width: 768px) {
  .vs-text {
    font-size: 2rem;
    margin: 10px 0;
  }
}

@media (max-width: 480px) {
  .vs-text {
    font-size: 1.5rem;
    margin: 8px 0;
  }
}

.choice-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: 100%;
  min-width: 150px;
}

.choice-btn {
  border: 2px solid #bababa;
  border-radius: 6px;
  padding: 15px 20px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  font-family: verdana, arial, helvetica, sans-serif;
  text-transform: uppercase;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.choice-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  transition: left 0.3s ease;
  z-index: 1;
}

.choice-btn .arrow {
  font-size: 18px;
  font-weight: bold;
  z-index: 2;
  position: relative;
}

.choice-btn span {
  z-index: 2;
  position: relative;
}

.choice-btn.higher {
  background: linear-gradient(135deg, #e8f5e8 0%, #d4f0d4 100%);
  border-color: #90c490;
  color: #000;
}

.choice-btn.higher::before {
  background: linear-gradient(135deg, #c8f5c8 0%, #a4e0a4 100%);
}

.choice-btn.higher:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 102, 0, 0.2);
  border-color: #70a470;
}

.choice-btn.higher:hover::before {
  left: 0;
}

.choice-btn.lower {
  background: linear-gradient(135deg, #f5e8e8 0%, #f0d4d4 100%);
  border-color: #c49090;
  color: #000;
}

.choice-btn.lower::before {
  background: linear-gradient(135deg, #f5c8c8 0%, #e0a4a4 100%);
}

.choice-btn.lower:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(136, 0, 0, 0.2);
  border-color: #a47070;
}

.choice-btn.lower:hover::before {
  left: 0;
}

.choice-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-overlay {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: linear-gradient(145deg, #ffffff, #f8f8f8);
  border: 2px solid #bababa;
  border-radius: 16px;
  padding: 37px;
  min-width: 320px;
  margin: 0 15px;
  max-width: calc(100vw - 30px);
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.result-overlay.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.result-overlay::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #4caf50, #81c784, #4caf50);
  border-radius: 16px;
  z-index: -1;
  opacity: 0;
  animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 0.3;
  }
}

.result-content {
  text-align: center;
}

.result-text {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 25px;
  font-family: tahoma, verdana, arial, helvetica, sans-serif;
}

.result-text.correct {
  color: #060;
}

.result-text.incorrect {
  color: #800;
}

.result-stats {
  font-size: 16px;
  margin-bottom: 31px;
  color: #000;
  line-height: 1.5;
  background: #f8f8f8;
  padding: 19px;
  border-radius: 6px;
  border: 1px solid #eee;
}

.result-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  border: 2px solid #bababa;
  border-radius: 6px;
  padding: 13px 25px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  font-family: verdana, arial, helvetica, sans-serif;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn.primary {
  background: linear-gradient(135deg, #e8f5e8 0%, #d4f0d4 100%);
  border-color: #90c490;
  color: #006600;
}

.btn.primary:hover {
  background: linear-gradient(135deg, #d4f0d4 0%, #c0e0c0 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 102, 0, 0.2);
}

.btn.secondary {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  border-color: #bababa;
  color: #333;
}

.btn.secondary:hover {
  background: linear-gradient(135deg, #e8e8e8 0%, #ddd 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.error-message {
  text-align: center;
  padding: 25px;
  color: #800;
  font-size: 13px;
  background: #ffe0e0;
  border: 1px solid #ffaaaa;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Mobile result overlay optimizations */
@media (max-width: 768px) {
  .result-overlay {
    top: 10%;
    padding: 25px 20px;
    min-width: 280px;
    margin: 0 10px;
  }

  .result-text {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .result-stats {
    font-size: 14px;
    padding: 15px;
    margin-bottom: 25px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 14px;
    min-height: 44px;
  }

  .result-buttons {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .result-overlay {
    top: 5%;
    padding: 20px 15px;
    min-width: 260px;
  }

  .result-text {
    font-size: 18px;
    margin-bottom: 15px;
  }

  .result-stats {
    font-size: 13px;
    padding: 12px;
    margin-bottom: 20px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 13px;
    min-height: 44px;
  }

  .result-buttons {
    gap: 10px;
    flex-direction: column;
  }
}

.counting {
  animation: countUp 0.6s ease-out;
}

@keyframes countUp {
  0% {
    color: #f60;
    transform: scale(1.1);
  }
  100% {
    color: #060;
    transform: scale(1);
  }
}

/* Mobile touch feedback and optimizations */
@media (max-width: 768px) {
  /* Improve touch targets */
  button,
  .btn,
  .choice-btn {
    min-height: 44px;
    min-width: 44px;
  }

  /* Enhanced touch feedback for character cards */
  .character-card {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  }

  .character-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }

  /* Prevent text selection on touch */
  .character-card,
  .choice-btn,
  .btn {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }

  /* Improve readability on smaller screens */
  .instruction-text {
    font-size: 16px;
    line-height: 1.4;
    padding: 10px 15px;
  }

  /* Better spacing for mobile */
  .game-container {
    padding: 10px;
  }

  /* Optimize VS text for mobile */
  .vs-text {
    font-size: 2rem;
    margin: 10px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  }
}

@media (max-width: 480px) {
  /* Further optimize for small screens */
  .instruction-text {
    font-size: 14px;
    padding: 8px 12px;
  }

  .vs-text {
    font-size: 1.5rem;
    margin: 8px 0;
  }

  /* Ensure touch targets remain accessible */
  button,
  .btn,
  .choice-btn {
    min-height: 48px;
    font-size: 14px;
  }

  /* Optimize character name display */
  .character-name {
    font-size: 14px;
    padding: 8px;
  }

  .character-post-count {
    font-size: 12px;
  }
}

/* Landscape orientation optimizations for mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .header {
    padding: 10px 0;
  }

  .stats {
    padding: 8px;
  }

  .character-card {
    max-height: 200px;
  }

  .vs-text {
    font-size: 1.8rem;
    margin: 5px 0;
  }
}

.secondary-count {
  display: none;
}

.footer {
  margin-top: 37px;
  padding: 25px;
  text-align: center;
  background: #e8f5e8;
  border: 1px solid #bababa;
  border-radius: 8px;
  font-size: 14px;
  color: #666;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.footer p {
  margin: 4px 0;
  line-height: 1.4;
}

.footer a {
  color: #006;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  text-decoration: underline;
  color: #004;
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .logo {
    margin-top: -40px;
  }

  .how-to-play-btn {
    margin-top: 30px;
  }

  .franchise-toggle-container {
    position: static;
    justify-content: center;
    margin: 15px auto 10px;
    max-width: fit-content;
  }

  .stats {
    gap: 10px;
  }

  .game-content {
    flex-direction: column;
    min-height: auto;
    gap: 8px; /* Reduced from 10px */
    margin-top: 25px; /* Reduced from 30px */
    margin-bottom: 25px; /* Reduced from 30px */
  }

  /* Hide VS text on mobile */
  .vs-text {
    display: none;
  }

  .vs-section {
    order: 2;
    min-width: auto;
    padding: 3px 0; /* Reduced from 5px 0 */
  }

  .instruction-text {
    font-size: 1rem; /* Slightly smaller */
    margin-bottom: 3px; /* Reduced from 5px */
  }

  .character-container.left {
    order: 1;
  }

  .character-container.right {
    order: 3;
  }

  .character-card {
    max-width: 100%;
    min-height: 100px; /* Reduced from 120px */
    padding: 10px; /* Reduced from 12px */
  }

  .character-card h2 {
    font-size: 18px; /* Slightly smaller */
    margin-bottom: 6px; /* Reduced from 8px */
    min-height: 30px; /* Reduced from 35px */
  }

  .character-subtext {
    margin-top: -4px; /* Reduced from -6px */
    margin-bottom: 4px; /* Reduced from 6px */
    font-size: 11px;
  }

  .post-count {
    margin-bottom: 6px; /* Reduced from 8px */
  }

  .post-count span:first-child {
    font-size: 26px; /* Reduced from 28px */
  }

  .post-count .label {
    font-size: 11px;
  }

  .question-mark {
    font-size: 36px; /* Reduced from 40px */
    margin: 0; /* Remove any default margins */
  }

  .character-image-container {
    max-height: 112px; /* Reduced by 20% from 140px */
    min-height: 80px; /* Reduced by 20% from 100px */
    margin: 4px 0; /* Reduced from 6px 0 */
  }

  .character-image {
    max-height: 112px; /* Reduced by 20% from 140px */
  }

  .character-card:has(.character-image-container) {
    min-height: 200px; /* Reduced from 240px to account for smaller images */
  }

  .character-card .character-image-container + .post-count {
    margin-top: 6px; /* Reduced from 8px */
  }

  .character-card h2 + .character-image-container {
    margin-top: 4px; /* Reduced from 6px */
  }

  .choice-buttons {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
  }

  .choice-btn {
    flex: 1;
    max-width: 120px;
  }

  .result-overlay {
    min-width: 260px;
    margin: 0 15px;
  }

  .result-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .btn {
    width: 100%;
  }

  .report-problem-btn {
    bottom: 15px;
    right: 15px;
    padding: 12px 16px;
    font-size: 13px;
  }
}

/* Report Problem Button */
.report-problem-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
  border: 2px solid #e53935;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  font-family: verdana, arial, helvetica, sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
  z-index: 100;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.report-problem-btn:hover {
  background: linear-gradient(135deg, #ff5252 0%, #f44336 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
  border-color: #d32f2f;
}

.report-problem-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

@media (max-width: 768px) {
  .report-problem-btn {
    padding: 6px 10px;
    font-size: 10px;
    bottom: 10px;
    right: 10px;
    border-radius: 5px;
    border-width: 1px;
  }
}

/* Report Problem Popup */
.report-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  backdrop-filter: blur(3px);
}

.report-popup-content {
  background: #fff;
  border: 2px solid #bababa;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  animation: popupSlideIn 0.3s ease-out;
}

.report-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px 15px;
  border-bottom: 1px solid #eee;
  background: #f8f8f8;
  border-radius: 6px 6px 0 0;
}

.report-popup-header h3 {
  font-family: tahoma, verdana, arial, helvetica, sans-serif;
  font-size: 18px;
  color: #006;
  margin: 0;
  font-weight: bold;
}

.report-subtext {
  padding: 15px 25px 0;
  text-align: center;
}

.report-subtext p {
  color: #666;
  font-size: 14px;
  margin: 0;
  font-style: italic;
}

.report-form {
  padding: 25px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #333;
  font-size: 14px;
}

.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #bababa;
  border-radius: 4px;
  font-family: verdana, arial, helvetica, sans-serif;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-buttons {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 25px;
}

.report-status {
  padding: 15px;
  border-radius: 4px;
  margin-top: 15px;
  text-align: center;
  font-weight: bold;
}

.report-status.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.report-status.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.report-status.loading {
  background: #e2f3ff;
  color: #004085;
  border: 1px solid #b3d7ff;
}

.character-card::after {
  content: "Click to choose";
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #666;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  font-style: italic;
}

.character-card:hover::after {
  opacity: 1;
}

/* Changelog Styling */
.changelog-entry {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.changelog-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.changelog-entry h3 {
  font-family: tahoma, verdana, arial, helvetica, sans-serif;
  font-size: 16px;
  color: #003366;
  margin-bottom: 10px;
  font-weight: bold;
  border-left: 3px solid #4caf50;
  padding-left: 10px;
}

.changelog-entry ul {
  margin: 10px 0;
  padding-left: 20px;
}

.changelog-entry li {
  margin: 6px 0;
  color: #333;
  line-height: 1.5;
}

/* Changelog Footer Button */
.changelog-footer-btn {
  background: #f0f8f0;
  border: 1px solid #90c490;
  color: #006;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: verdana, arial, helvetica, sans-serif;
  font-size: 13px;
  font-weight: normal;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.changelog-footer-btn:hover {
  background: #e0f0e0;
  border-color: #70a470;
  transform: translateY(-0.5px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Character image styles */
.character-image-container {
  margin: 15px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-height: 220px;
  min-height: 180px;
  overflow: hidden;
  border-radius: 8px;
  background: #f0f0f0;
  position: relative;
  flex: 1;
}

.character-image {
  max-width: 100%;
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: transparent;
}

.character-image.loaded {
  opacity: 1;
}

.character-card {
  min-height: 380px;
  max-height: 550px;
  overflow: hidden;
}

.character-card .character-image-container + .post-count {
  margin-top: 15px;
}

.character-card:has(.character-image-container) {
  min-height: 430px;
}

.character-card h2 + .character-image-container {
  margin-top: 10px;
}

@media (max-width: 768px) {
  .character-image-container {
    max-height: 160px;
    min-height: 120px;
  }

  .character-image {
    max-height: 160px;
  }

  .character-card {
    min-height: 280px;
  }

  .character-card:has(.character-image-container) {
    min-height: 320px;
  }
}

/* Daily Mode Styles */
.back-btn {
  position: absolute;
  top: 15px;
  left: 20px;
  background: #006600;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.back-btn:hover {
  background: #004400;
}

.daily-header {
  margin-top: 15px;
}

.daily-header h2 {
  color: #006600;
  margin-bottom: 10px;
  font-size: 24px;
}

.daily-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 10px;
}

.score-tracker {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.score-squares {
  display: flex;
  gap: 8px;
  padding: 15px;
  background: #e8f5e8;
  border: 1px solid #bababa;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.score-square {
  width: 24px;
  height: 24px;
  border: 2px solid #bababa;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.score-square:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.score-square.pending {
  background: #f0f0f0;
  border-color: #bababa;
}

.score-square.correct {
  background: #4caf50;
  border-color: #4caf50;
  color: white;
}

.score-square.correct:hover {
  background: #45a049;
  border-color: #45a049;
}

.score-square.incorrect {
  background: #f44336;
  border-color: #f44336;
  color: white;
}

.score-square.incorrect:hover {
  background: #da190b;
  border-color: #da190b;
}

.final-score {
  text-align: center;
  margin-bottom: 20px;
}

.final-score h3 {
  font-size: 28px;
  color: #006600;
  margin-bottom: 15px;
}

.score-breakdown {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 15px 0;
}

.score-breakdown .score-square {
  width: 20px;
  height: 20px;
}

/* Daily Mode Button on Main Page */

/* Achievements System Styles */
.achievements-footer-btn {
  background: #f8f0ff;
  border: 1px solid #9c88ff;
  color: #4a148c;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: verdana, arial, helvetica, sans-serif;
  font-size: 13px;
  font-weight: bold;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  margin-right: 10px;
}

.achievements-footer-btn:hover {
  background: #f0e8ff;
  border-color: #7c68ee;
  transform: translateY(-0.5px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.achievements-popup {
  max-width: 600px;
  width: 95%;
}

.achievements-stats {
  text-align: center;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f8f8;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.achievement-summary {
  font-size: 18px;
  font-weight: bold;
  color: #4a148c;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px 0;
}

.achievement-item {
  display: flex;
  align-items: center;
  padding: 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #f9f9f9;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.achievement-item.unlocked {
  border-color: #4caf50;
  background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.achievement-item.unlocked::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 30px 30px 0;
  border-color: transparent #4caf50 transparent transparent;
}

.achievement-item.unlocked::after {
  content: "✓";
  position: absolute;
  top: 5px;
  right: 5px;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.achievement-item.locked {
  opacity: 0.6;
  border-color: #ccc;
  background: #f5f5f5;
}

.achievement-icon {
  font-size: 28px;
  margin-right: 15px;
  min-width: 40px;
  text-align: center;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.achievement-item.unlocked .achievement-icon {
  filter: none;
  animation: achievementGlow 2s ease-in-out infinite alternate;
}

@keyframes achievementGlow {
  0% {
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
  }
  100% {
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
  }
}

.achievement-details {
  flex: 1;
}

.achievement-name {
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
  font-size: 14px;
}

.achievement-item.unlocked .achievement-name {
  color: #2e7d32;
}

.achievement-description {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

.achievement-rarity {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: bold;
  text-transform: uppercase;
}

.achievement-rarity.common {
  background: #e8e8e8;
  color: #666;
}

.achievement-rarity.uncommon {
  background: #c8e6c9;
  color: #2e7d32;
}

.achievement-rarity.rare {
  background: #bbdefb;
  color: #1565c0;
}

.achievement-rarity.epic {
  background: #e1bee7;
  color: #7b1fa2;
}

.achievement-rarity.legendary {
  background: #ffccbc;
  color: #d84315;
}

/* Achievement Notification */
.achievement-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #4caf50, #66bb6a);
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
  z-index: 2000;
  max-width: 320px;
  animation: achievementSlideIn 0.5s ease-out,
    achievementSlideOut 0.5s ease-in 4.5s forwards;
  border: 2px solid #43a047;
}

@keyframes achievementSlideIn {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes achievementSlideOut {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

.achievement-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.achievement-notification .achievement-icon {
  font-size: 24px;
  filter: none;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.achievement-notification .achievement-title {
  font-size: 12px;
  font-weight: bold;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.achievement-notification .achievement-name {
  font-size: 16px;
  font-weight: bold;
  margin: 2px 0;
}

.achievement-notification .achievement-description {
  font-size: 13px;
  opacity: 0.95;
  line-height: 1.3;
}

/* Mobile achievement notifications */
@media (max-width: 768px) {
  .achievement-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    padding: 12px 15px;
  }

  .achievement-content {
    gap: 10px;
  }

  .achievement-notification .achievement-icon {
    font-size: 20px;
  }

  .achievement-notification .achievement-name {
    font-size: 14px;
  }

  .achievement-notification .achievement-description {
    font-size: 12px;
  }
}

/* Mobile achievements popup */
@media (max-width: 768px) {
  .achievements-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .achievement-item {
    padding: 12px;
  }

  .achievement-icon {
    font-size: 24px;
    margin-right: 12px;
    min-width: 35px;
  }

  .achievement-name {
    font-size: 13px;
  }

  .achievement-description {
    font-size: 11px;
  }
}
.daily-mode-btn {
  position: absolute;
  top: 15px;
  left: 20px;
  background: #ff6b35;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.daily-mode-btn:hover {
  background: #e55a2b;
}

/* Countdown styles (Daily final popup) */
.countdown-container {
  margin-top: 18px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #f7fff7 0%, #e8f5e8 100%);
  border: 1px solid #bababa;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.countdown-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #006;
  font-weight: bold;
  margin-bottom: 6px;
}

.countdown-time {
  font-family: tahoma, verdana, arial, helvetica, sans-serif;
  font-size: 28px;
  font-weight: bold;
  color: #060;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.08);
  margin-bottom: 4px;
}

.countdown-sub {
  font-size: 12px;
  color: #557;
  opacity: 0.9;
  font-style: italic;
}

@media (max-width: 768px) {
  .countdown-container {
    padding: 12px 14px;
  }
  .countdown-time {
    font-size: 22px;
  }
}

/* Daily page layout tweaks */
body.daily .game-content {
  flex-direction: column; /* stack children so tracker sits above game row */
  gap: 12px;
}

body.daily .daily-game-row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 37px;
}

/* Avoid ad injection inside gameplay area */
#game-content ins.adsbygoogle,
#game-content .google-auto-placed,
#game-content .adsbygoogle {
  display: none !important;
}

@media (max-width: 768px) {
  body.daily .daily-game-row {
    flex-direction: column;
    gap: 8px;
  }
}
