/* Modern enhanced styles for Memory Ball game */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Theme Variables */
:root {
  /* Default Theme */
  --primary-color: #4361ee;
  --success-color: #4CAF50;
  --warning-color: #FFC107;
  --danger-color: #F44336;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --accent-color: #7209b7;
  --bg-gradient-start: #e0f2fe;
  --bg-gradient-end: #f0f9ff;
  --text-color: #333;
  --panel-bg: #ffffff;
  --ball-shadow: inset -3px -3px 8px rgba(0,0,0,0.2), 2px 4px 10px rgba(0,0,0,0.15);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
  --transition-fast: all 0.2s ease;
  --transition-medium: all 0.3s ease;
  --transition-long: all 0.5s ease;
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 18px;
}

/* Dark Theme */
[data-theme="dark"] {
  --primary-color: #6d9cff;
  --success-color: #80e27e;
  --warning-color: #ffd54f;
  --danger-color: #ff7961;
  --light-color: #484848;
  --dark-color: #f8f9fa;
  --accent-color: #bb86fc;
  --bg-gradient-start: #121212;
  --bg-gradient-end: #1f1f1f;
  --text-color: #e0e0e0;
  --panel-bg: #282828;
  --ball-shadow: inset -3px -3px 8px rgba(0,0,0,0.4), 2px 4px 10px rgba(0,0,0,0.3);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.4);
}

/* Neon Theme */
[data-theme="neon"] {
  --primary-color: #ff00ff;
  --success-color: #00ff00;
  --warning-color: #ffff00;
  --danger-color: #ff0000;
  --light-color: #f8f9fa;
  --dark-color: #121212;
  --accent-color: #00ffff;
  --bg-gradient-start: #000000;
  --bg-gradient-end: #1a0129;
  --text-color: #ffffff;
  --panel-bg: rgba(30, 30, 30, 0.8);
  --ball-shadow: 0 0 15px rgba(255, 0, 255, 0.8), inset -2px -2px 8px rgba(255, 255, 255, 0.2);
  --shadow-sm: 0 0 5px rgba(255, 0, 255, 0.5);
  --shadow-md: 0 0 10px rgba(255, 0, 255, 0.7);
  --shadow-lg: 0 0 20px rgba(255, 0, 255, 0.9);
}

/* Pastel Theme */
[data-theme="pastel"] {
  --primary-color: #B5DEFF;
  --success-color: #BDEDC6;
  --warning-color: #FFE9AE;
  --danger-color: #FFCBC1;
  --light-color: #f8f9fa;
  --dark-color: #6b5c65;
  --accent-color: #CCA8E9;
  --bg-gradient-start: #F7F6FC;
  --bg-gradient-end: #FFFFFF;
  --text-color: #6b5c65;
  --panel-bg: #FFFFFF;
  --ball-shadow: inset -2px -2px 6px rgba(0,0,0,0.1), 1px 2px 6px rgba(0,0,0,0.08);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.05);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.08);
}

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

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  color: var(--text-color);
  overflow-x: hidden;
  transition: background 0.5s ease;
}

/* Game container */
#game {
  position: relative;
  width: 800px;
  height: 600px;
  background: linear-gradient(to bottom, var(--panel-bg), rgba(245, 249, 255, 0.8));
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg), 0 15px 30px rgba(67, 97, 238, 0.1);
  overflow: hidden;
  border: 1px solid rgba(67, 97, 238, 0.1);
  transition: var(--transition-medium);
}

/* Stats display */
#stats {
  position: absolute;
  top: 15px;
  left: 15px;
  display: flex;
  gap: 15px;
  z-index: 10;
  flex-wrap: wrap;
  max-width: 80%;
}

.stat-item {
  background-color: rgba(255,255,255,0.9);
  border-radius: var(--border-radius-sm);
  padding: 8px 15px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.5);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-medium);
}

.stat-item i {
  color: var(--accent-color);
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Progress bar */
#progress-container {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 8px;
  background-color: rgba(0,0,0,0.05);
  overflow: hidden;
  border-radius: 4px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

#progress-bar {
  width: 100%;
  height: 100%;
  position: relative;
}

#progress {
  height: 100%;
  width: 0;
  background-color: var(--primary-color);
  transition: width 0.1s linear;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.1) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Ball styling */
.ball {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: var(--ball-shadow);
  will-change: transform, left, top;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
}

.ball::before {
  content: '';
  position: absolute;
  width: 30%;
  height: 30%;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  top: 20%;
  left: 20%;
}

.ball::after {
  content: '';
  position: absolute;
  width: 10%;
  height: 10%;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  top: 45%;
  left: 45%;
}

.ball.highlight {
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 0 15px var(--primary-color), var(--ball-shadow);
  animation: pulsate 1.5s infinite;
}

@keyframes pulsate {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.05); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Combo indicator */
#combo-indicator {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background-color: var(--primary-color);
  color: white;
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: bold;
  font-size: 18px;
  box-shadow: var(--shadow-md);
  z-index: 20;
  opacity: 0;
  transition: var(--transition-fast);
  pointer-events: none;
}

#combo-indicator.combo-active {
  animation: comboShow 1.5s forwards;
}

@keyframes comboShow {
  0% { transform: translateX(-50%) scale(0.5); opacity: 0; }
  20% { transform: translateX(-50%) scale(1.2); opacity: 1; }
  30% { transform: translateX(-50%) scale(1); opacity: 1; }
  80% { transform: translateX(-50%) scale(1); opacity: 1; }
  100% { transform: translateX(-50%) scale(0.8); opacity: 0; }
}

#combo-count {
  color: var(--warning-color);
  font-size: 22px;
  margin-right: 3px;
}

/* Sound controls */
#sound-controls {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  gap: 10px;
  z-index: 10;
}

.control-btn {
  background-color: rgba(255,255,255,0.9);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: none;
  transition: var(--transition-medium);
}

.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background-color: rgba(255,255,255,1);
}

.control-btn.muted i {
  color: var(--danger-color);
}

.control-btn.muted::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 20px;
  background-color: var(--danger-color);
  transform: rotate(45deg);
}

/* Submit button */
#submit-btn {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  display: none;
  z-index: 10;
  box-shadow: var(--shadow-md);
  transition: var(--transition-medium);
  letter-spacing: 0.5px;
}

#submit-btn:hover {
  background-color: #3355dd;
  transform: translateX(-50%) translateY(-3px);
  box-shadow: 0 6px 12px rgba(67, 97, 238, 0.2);
}

#submit-btn:active {
  transform: translateX(-50%) translateY(-1px);
  box-shadow: 0 3px 6px rgba(67, 97, 238, 0.1);
}

#submit-btn.all-placed {
  background: linear-gradient(135deg, var(--success-color), #2E7D32);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

/* Recall markers */
.marker {
  position: absolute;
  border-radius: 50%;
  border: 2px dashed #333;
  background-color: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  z-index: 5;
  animation: fadeIn 0.3s ease-out;
  cursor: pointer;
}

.marker.selected {
  border-color: var(--primary-color);
  border-width: 3px;
  background-color: rgba(67, 97, 238, 0.2);
  animation: selectedPulse 1.5s infinite;
}

@keyframes selectedPulse {
  0% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(67, 97, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(1.2); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Screen overlays */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(5px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  overflow-y: auto;
}

.panel {
  background-color: var(--panel-bg);
  padding: 35px;
  border-radius: var(--border-radius-md);
  text-align: center;
  max-width: 80%;
  width: 80%;
  box-shadow: var(--shadow-lg);
  transform: translateY(0);
  animation: slideUpFade 0.5s ease-out;
  margin: 20px 0;
  z-index: 120;
  position: relative;
  color: var(--text-color);
  transition: var(--transition-medium);
}

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

.panel h1 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.panel h1 i {
  color: var(--accent-color);
}

.panel h2 {
  color: var(--accent-color);
  margin-bottom: 10px;
}

.panel p {
  margin-bottom: 15px;
  line-height: 1.5;
}

.button-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

/* Buttons */
button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
  transition: var(--transition-medium);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

button:hover {
  background-color: #3355dd;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

button:active {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.secondary-btn {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
  background-color: rgba(67, 97, 238, 0.1);
}

/* Main menu styling */
.branding {
  margin-bottom: 20px;
}

.branding h1 {
  font-size: 42px;
  margin: 0 0 5px 0;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  display: inline-block;
}

.branding h1::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 3px;
}

.tagline {
  font-style: italic;
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 15px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  padding: 14px 28px;
  font-size: 18px;
  margin: 10px 0;
  display: inline-block;
  width: auto;
  min-width: 180px;
  z-index: 150;
  position: relative;
}

.primary-btn:hover {
  background: linear-gradient(135deg, #3355dd, #6008a5);
}

.start-button-container {
  margin: 30px 0 20px;
  display: flex;
  justify-content: center;
  width: 100%;
  position: relative;
  z-index: 150;
}

.panel.mobile-friendly {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  padding: 25px;
  overflow-y: auto;
}

/* Connection lines and accuracy labels */
.connection-line {
  position: absolute;
  height: 2px;
  background-color: rgba(0,0,0,0.4);
  transform-origin: left center;
  z-index: 4;
  animation: growWidth 0.4s ease-out;
}

@keyframes growWidth {
  from { width: 0; }
}

.accuracy-label {
  position: absolute;
  padding: 4px 8px;
  border-radius: 50px;
  color: white;
  font-weight: bold;
  font-size: 12px;
  transform: translate(-50%, -50%);
  z-index: 6;
  box-shadow: var(--shadow-sm);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
}

@keyframes popIn {
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Instructions & other dropdowns */
.instructions-content, .highscores-content, .achievements-content {
  text-align: left;
  max-height: 200px;
  overflow-y: auto;
  padding: 0 10px;
  margin: 15px 0;
}

.instructions-dropdown, .highscores-dropdown, .achievements-dropdown {
  margin-top: 15px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.instructions-dropdown summary, .highscores-dropdown summary, .achievements-dropdown summary {
  cursor: pointer;
  padding: 12px;
  font-weight: 600;
  color: var(--primary-color);
  background-color: rgba(67, 97, 238, 0.05);
  outline: none;
  transition: var(--transition-fast);
}

.instructions-dropdown summary:hover, .highscores-dropdown summary:hover, .achievements-dropdown summary:hover {
  background-color: rgba(67, 97, 238, 0.1);
}

.instructions-dropdown[open] summary, .highscores-dropdown[open] summary, .achievements-dropdown[open] summary {
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.instruction-step {
  margin-bottom: 18px;
  border-left: 4px solid var(--primary-color);
  padding-left: 15px;
}

.instruction-step h3 {
  color: var(--primary-color);
  margin: 0 0 5px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.instruction-tip {
  background-color: rgba(0,0,0,0.03);
  border-radius: var(--border-radius-sm);
  padding: 15px;
  margin-top: 20px;
  border: 1px solid rgba(0,0,0,0.05);
}

.instruction-tip h3 {
  color: var(--warning-color);
  margin: 0 0 10px 0;
}

.instruction-tip ul {
  margin: 0;
  padding-left: 20px;
}

.instruction-tip li {
  margin-bottom: 8px;
}

/* Particles container */
#particles-container {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  pointer-events: none;
}

/* Floating Action Panel for Results View */
#floating-action-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 90;
  transition: var(--transition-medium);
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

#floating-action-panel .panel-content {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  padding: 15px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(67, 97, 238, 0.2);
  text-align: center;
}

.action-title {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.action-title::before {
  content: '\f06e';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

.action-btn {
  margin: 5px;
  padding: 8px 15px;
  font-size: 14px;
}

/* Game mode selector */
.mode-selector, .theme-selector {
  margin: 15px 0;
}

.mode-selector h3, .theme-selector h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 18px;
}

.mode-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

.mode-option {
  background-color: rgba(0,0,0,0.03);
  border-radius: var(--border-radius-md);
  padding: 15px;
  flex: 1;
  min-width: 140px;
  max-width: 200px;
  cursor: pointer;
  transition: var(--transition-medium);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mode-option i {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.mode-option span {
  font-weight: 600;
  color: var(--primary-color);
}

.mode-option p {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 5px;
}

.mode-option:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background-color: rgba(0,0,0,0.05);
}

.mode-option.selected {
  border-color: var(--primary-color);
  background-color: rgba(67, 97, 238, 0.1);
}

/* Theme selector */
.theme-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.theme-btn {
  background-color: var(--light-color);
  color: var(--dark-color);
  flex: 0 0 auto;
  padding: 8px 15px;
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  min-width: 100px;
}

.theme-btn.selected {
  border: 2px solid var(--primary-color);
  background-color: rgba(67, 97, 238, 0.1);
}

/* Highscores table */
#highscores-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

#highscores-table th, #highscores-table td {
  padding: 8px;
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

#highscores-table th {
  background-color: rgba(0,0,0,0.03);
  font-weight: 600;
  color: var(--primary-color);
}

#highscores-table tr:nth-child(even) {
  background-color: rgba(0,0,0,0.02);
}

#highscores-table tr:hover {
  background-color: rgba(67, 97, 238, 0.05);
}

/* Achievements */
#achievements-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 15px;
  padding: 10px 0;
}

.achievement-item {
  background-color: rgba(0,0,0,0.03);
  border-radius: var(--border-radius-sm);
  padding: 15px;
  border: 1px solid rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.achievement-item.unlocked {
  border-color: var(--success-color);
  background-color: rgba(76, 175, 80, 0.05);
}

.achievement-item.locked {
  opacity: 0.6;
}

.achievement-icon {
  font-size: 24px;
  color: var(--primary-color);
}

.achievement-item.unlocked .achievement-icon {
  color: var(--success-color);
}

.achievement-name {
  font-weight: 600;
  color: var(--primary-color);
}

.achievement-desc {
  font-size: 12px;
  opacity: 0.8;
}

.achievement-date {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 5px;
}

/* Achievement and high score banners */
.achievement-banner, .highscore-banner {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-radius: var(--border-radius-sm);
  padding: 12px;
  margin: 15px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  box-shadow: var(--shadow-md);
  animation: glowPulse 2s infinite;
}

@keyframes glowPulse {
  0% { box-shadow: 0 0 5px rgba(114, 9, 183, 0.5); }
  50% { box-shadow: 0 0 15px rgba(114, 9, 183, 0.8); }
  100% { box-shadow: 0 0 5px rgba(114, 9, 183, 0.5); }
}

.achievement-banner i, .highscore-banner i {
  font-size: 24px;
}

#achievement-details {
  margin-top: 10px;
  padding: 15px;
  background-color: rgba(0,0,0,0.03);
  border-radius: var(--border-radius-sm);
}

/* Results stats */
.results-stats {
  margin: 20px 0;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-label {
  font-weight: 600;
  color: var(--primary-color);
}

.stat-value {
  font-weight: 700;
  font-size: 18px;
}

/* Tutorial overlay */
.tutorial-container {
  max-width: 600px;
  width: 90%;
  background-color: var(--panel-bg);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.tutorial-content {
  padding: 25px;
  text-align: center;
}

.tutorial-content h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
}

#tutorial-step-content {
  min-height: 200px;
  margin: 20px 0;
  text-align: left;
}

.tutorial-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(0,0,0,0.1);
  padding-top: 20px;
  margin-top: 20px;
}

.tutorial-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
}

.tutorial-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#tutorial-pagination {
  display: flex;
  gap: 8px;
}

.pagination-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(0,0,0,0.1);
  cursor: pointer;
}

.pagination-dot.active {
  background-color: var(--primary-color);
}

.tutorial-step {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 15px;
}

.tutorial-step-img {
  width: 150px;
  height: 150px;
  border-radius: var(--border-radius-sm);
  background-color: rgba(0,0,0,0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 50px;
  color: var(--primary-color);
}

.tutorial-step-text {
  flex: 1;
}

.tutorial-step-text h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.tutorial-step-text p {
  line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 850px) {
  #game {
    width: 95vw;
    height: 95vw;
    max-height: 80vh;
  }
  
  button {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .panel {
    width: 90%;
    padding: 25px 15px;
    max-height: 80vh;
    overflow-y: auto;
  }
  
  .stat-item {
    padding: 6px 10px;
    font-size: 14px;
  }
  
  .branding h1 {
    font-size: 32px;
  }
  
  #floating-action-panel {
    bottom: 10px;
    right: 10px;
  }
  
  .action-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .instructions-content, .highscores-content, .achievements-content {
    max-height: 35vh;
    padding-right: 5px;
  }
  
  .primary-btn {
    padding: 12px 24px;
    font-size: 16px;
    min-width: 150px;
    margin: 15px 0;
  }
  
  .instruction-step p, .instruction-tip li {
    font-size: 14px;
  }
  
  .panel.mobile-friendly {
    padding: 20px 15px;
  }
  
  .panel.mobile-friendly .branding h1 {
    font-size: 28px;
    margin-bottom: 5px;
  }
  
  .panel.mobile-friendly .tagline {
    font-size: 14px;
    margin-bottom: 5px;
  }
  
  .start-button-container {
    margin: 20px 0 15px;
  }
  
  .mode-options {
    flex-direction: column;
    align-items: center;
  }
  
  .mode-option {
    width: 100%;
    max-width: 100%;
  }
  
  #stats {
    top: 10px;
    left: 10px;
    gap: 8px;
  }
  
  .tutorial-step {
    flex-direction: column;
    text-align: center;
  }
  
  .tutorial-step-img {
    margin: 0 auto;
  }
}

/* Animation for screen transition */
.screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.05);
}

/* Added animations for visual flair */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

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

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

/* Neon Theme Special Effects */
[data-theme="neon"] .ball {
  box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
}

[data-theme="neon"] .marker {
  border: 2px dashed var(--accent-color);
}

[data-theme="neon"] .marker.selected {
  box-shadow: 0 0 15px var(--primary-color);
}

[data-theme="neon"] .branding h1 {
  text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color);
}

[data-theme="neon"] button {
  box-shadow: 0 0 10px var(--primary-color);
}

[data-theme="neon"] .accuracy-label {
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

[data-theme="neon"] .panel {
  box-shadow: 0 0 20px rgba(114, 9, 183, 0.5);
  border: 1px solid var(--primary-color);
}

/* Pastel Theme Adjustments */
[data-theme="pastel"] .ball {
  opacity: 0.9;
}

[data-theme="pastel"] .marker {
  border: 2px dashed var(--primary-color);
}

[data-theme="pastel"] button {
  font-weight: 500;
}

[data-theme="pastel"] .panel {
  border: 1px solid rgba(0,0,0,0.05);
}