@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700&family=Rajdhani:wght@300;400;500;600;700&family=Audiowide&display=swap");

:root {
  --primary-color: #00f3ff;
  --secondary-color: #ff00e6;
  --accent-color: #00ff9d;
  --dark-bg: #0a0a16;
  --card-bg: #12122a;
  --text-color: #e0e0ff;
  --border-color: #00a0c2;
  --glow-color: rgba(0, 243, 255, 0.6);
  --highlight-color: #ffcc00;
  --hover-color: #ff00ff;
  --success-color: #00ff00;
  --warning-color: #ffff00;
  --error-color: #ff0000;
  --panel-color: rgba(18, 18, 42, 0.9);
  --background-color: #0a0a16;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Rajdhani", sans-serif;
  background-color: var(--dark-bg);
  background-image: radial-gradient(circle at 50% 50%, rgba(0, 243, 255, 0.05) 0%, transparent 50%),
    linear-gradient(45deg, rgba(255, 0, 255, 0.03) 0%, transparent 100%);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Animated background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    125deg,
    transparent 0%,
    rgba(0, 243, 255, 0.05) 30%,
    transparent 60%,
    rgba(255, 0, 255, 0.05) 100%
  );
  background-size: 200% 200%;
  animation: gradientMove 15s ease infinite;
  pointer-events: none;
  z-index: -1;
}

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

.container {
  max-width: 1400px;
  width: 100%;
  position: relative;
  padding: 0 2rem;
}

/* Header Styles */
header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

header::after {
  content: "";
  position: absolute;
  bottom: -2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

h1 {
  font-family: "Audiowide", "Orbitron", sans-serif;
  font-size: clamp(2.5rem, 8vw, 4rem);
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
  margin-bottom: 0.5rem;
  letter-spacing: 6px;
  position: relative;
  display: inline-block;
}

h1::before,
h1::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

h1::before {
  color: var(--secondary-color);
  animation: glitch-1 5s infinite linear alternate-reverse;
}

h1::after {
  color: var(--accent-color);
  animation: glitch-2 7.5s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
  0%,
  94%,
  100% {
    transform: translate(0);
  }
  95% {
    transform: translate(-5px, 2px);
  }
  96% {
    transform: translate(3px, -5px);
  }
  97% {
    transform: translate(-2px, 4px);
  }
  98% {
    transform: translate(5px, -2px);
  }
  99% {
    transform: translate(-5px, 5px);
  }
}

@keyframes glitch-2 {
  0%,
  94%,
  100% {
    transform: translate(0);
  }
  95% {
    transform: translate(5px, -2px);
  }
  96% {
    transform: translate(-3px, 5px);
  }
  97% {
    transform: translate(2px, -4px);
  }
  98% {
    transform: translate(-5px, 2px);
  }
  99% {
    transform: translate(5px, -5px);
  }
}

.subtitle {
  font-size: 1.4rem;
  color: #ffffff;
  margin-bottom: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

.version {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.7;
}

/* Panel Styles */
.instructions-panel {
  background: var(--panel-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  text-align: left;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.instructions-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.panel-header i {
  font-size: 1.5rem;
  margin-right: 1rem;
  color: var(--primary-color);
}

.panel-header h2 {
  font-family: "Orbitron", sans-serif;
  color: var(--primary-color);
  font-size: 1.8rem;
  margin: 0;
}

/* Control Panel */
.control-panel {
  background-color: var(--panel-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.8rem;
  margin-bottom: 2.5rem;
  width: 100%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.control-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(0, 243, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: 0.5s;
}

.control-panel:hover::before {
  transform: translateX(100%);
}

.button-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.control-button {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  color: var(--text-color);
  padding: 0.8rem 1.2rem;
  font-family: "Rajdhani", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.control-button::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(to top, rgba(0, 243, 255, 0.2), transparent);
  transition: height 0.3s ease;
  z-index: -1;
}

.control-button:hover::after {
  height: 100%;
}

.control-button:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--hover-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 0, 255, 0.3);
  color: var(--hover-color);
}

.control-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.control-button i {
  margin-right: 0.5rem;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.control-button:hover i {
  transform: scale(1.2);
  color: var(--hover-color);
}

/* Instruction Content */
.intro-text {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.highlight {
  color: #00d7ff;
  font-weight: 700;
}

.instruction-subheader {
  font-family: "Orbitron", sans-serif;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.instruction-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.instruction-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 1.2rem;
  border: 1px solid rgba(0, 243, 255, 0.1);
  transition: all 0.3s ease;
}

.instruction-step:hover {
  transform: translateX(5px);
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.step-number {
  background: var(--border-color);
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: "Orbitron", sans-serif;
  flex-shrink: 0;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}

.step-content h4 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.step-content p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-color);
}

.instruction-note {
  background: rgba(255, 204, 0, 0.1);
  border-left: 3px solid var(--highlight-color);
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border-radius: 0 5px 5px 0;
}

.instruction-note i {
  color: var(--highlight-color);
  font-size: 1.2rem;
  margin-top: 0.2rem;
}

.instruction-note p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-color);
}

/* Gesture Grid */
.gesture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.gesture-item {
  display: flex;
  background: rgba(26, 26, 58, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.2rem;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.3s ease;
}

.gesture-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border-color: var(--primary-color);
}

.gesture-icon {
  font-size: 3rem;
  background: #1a1a3a;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.gesture-details h4 {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-family: "Orbitron", sans-serif;
}

.gesture-details p {
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.5;
}

.section-title {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(0, 160, 194, 0.4);
  padding-bottom: 0.5rem;
}

.key-binding {
  background-color: #0a0a20;
  color: var(--primary-color);
  font-family: "Courier New", monospace;
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  border: 1px solid rgba(0, 160, 194, 0.3);
}

.gesture-controls {
  display: flex;
  margin-top: 1rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gesture-btn {
  background: #1a1a3a;
  color: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.gesture-btn:hover {
  background: #2a2a4a;
  transform: translateY(-2px);
}

.gesture-btn i {
  font-size: 0.8rem;
}

/* Train New Gesture Section */
.train-gesture-section {
  background-color: rgba(26, 26, 58, 0.7);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
  border: 1px solid var(--border-color);
}

.train-gesture-section p {
  color: var(--text-color);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.gesture-training-info {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
  padding: 1rem;
  margin-top: 1rem;
  border-left: 3px solid var(--primary-color);
}

.gesture-training-info p {
  font-size: 0.95rem;
  margin: 0;
  color: #c0c0ff;
}

.gesture-training-info i {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

/* Usage Instructions */
.usage-instructions {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 2rem;
  margin-top: 2rem;
}

.usage-instructions h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.usage-instructions h3 i {
  margin-right: 0.5rem;
}

.usage-instructions ol {
  list-style-type: none;
  counter-reset: inst;
  padding: 0;
}

.usage-instructions li {
  counter-increment: inst;
  margin-bottom: 1rem;
  padding-left: 2.5rem;
  position: relative;
  text-align: left;
}

.usage-instructions li::before {
  content: counter(inst);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1.8rem;
  height: 1.8rem;
  background: var(--primary-color);
  color: var(--background-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Main Content Cards */
.main-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: var(--panel-color);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-7px);
  box-shadow: 0 0 25px rgba(0, 243, 255, 0.4);
  border-color: var(--primary-color);
  background: linear-gradient(180deg, #12122a, #1a1a3a);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(0, 243, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: 0.5s;
}

.card:hover::before {
  transform: translateX(100%);
}

.card-icon {
  font-size: 2.8rem;
  color: var(--primary-color);
  margin: 0 auto 1.5rem;
  background: rgba(0, 215, 255, 0.1);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(0, 215, 255, 0.3);
  transition: all 0.3s ease;
}

.card:hover .card-icon {
  transform: scale(1.1);
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(0, 215, 255, 0.4);
}

.card h2 {
  font-family: "Orbitron", sans-serif;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

.card p {
  margin-bottom: 2rem;
  line-height: 1.6;
  opacity: 0.8;
}

/* Cyber Button */
.cyber-button {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 1rem 2rem;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.cyber-button:hover {
  background: var(--primary-color);
  color: var(--background-color);
  transform: translateY(-2px);
  box-shadow: 0 0 15px var(--primary-color);
}

.cyber-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.cyber-button i {
  font-size: 1.2rem;
}

.stop-button {
  background-color: rgba(255, 0, 0, 0.2);
  border-color: #ff0000;
}

.stop-button:hover {
  background-color: #ff0000;
}

.stop-all-button {
  background-color: rgba(255, 0, 0, 0.3);
  border-color: #ff0000;
}

.stop-all-button:hover {
  background-color: #ff0000;
}

/* AI Features */
.ai-features-panel {
  margin-bottom: 3rem;
  background: linear-gradient(135deg, rgba(18, 18, 42, 0.8), rgba(10, 10, 22, 0.9));
  border: 1px solid var(--accent-color);
}

.ai-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.ai-feature {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 255, 157, 0.2);
  position: relative;
  overflow: hidden;
}

.ai-feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 255, 157, 0.2);
  border-color: var(--accent-color);
}

.ai-feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00b377, var(--border-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  position: relative;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.ai-feature-icon i {
  font-size: 1.5rem;
  color: var(--dark-bg);
}

.ai-feature h3 {
  color: var(--accent-color);
  margin-bottom: 0.8rem;
  font-family: "Orbitron", sans-serif;
  font-size: 1.2rem;
}

.ai-feature p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-color);
  opacity: 0.9;
}

/* TRY Section */
.try-panel {
  background: linear-gradient(to right, #0a0a1a, #151535, #0a0a1a);
  margin-top: 2rem;
}

.try-description {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-color);
  margin: 0.5rem 0 2rem;
}

.try-options {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.try-option {
  background: rgba(18, 18, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  flex: 1;
  min-width: 280px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
}

.try-option:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 136, 163, 0.3);
  border-color: var(--primary-color);
}

.try-icon {
  background: rgba(0, 215, 255, 0.1);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  border: 2px solid rgba(0, 215, 255, 0.3);
}

.try-icon i {
  font-size: 2.5rem;
  color: var(--primary-color);
}

.try-option h3 {
  color: var(--primary-color);
  font-family: "Orbitron", sans-serif;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.try-option p {
  color: var(--text-color);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--panel-color);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  position: relative;
  animation: slideIn 0.3s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 0.5rem;
  border-radius: 50%;
}

.modal-close:hover {
  color: var(--primary-color);
  background: rgba(0, 243, 255, 0.1);
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-content {
  text-align: center;
  color: var(--primary-color);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(0, 243, 255, 0.3);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

/* Footer */
footer {
  margin-top: 3rem;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  background: linear-gradient(to right, transparent, rgba(0, 136, 163, 0.1), transparent);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

footer p {
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-link:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  h1 {
    font-size: 2.5rem;
    letter-spacing: 3px;
  }

  .button-group {
    grid-template-columns: 1fr;
  }

  .main-content {
    grid-template-columns: 1fr;
  }

  .gesture-grid {
    grid-template-columns: 1fr;
  }

  .try-options {
    flex-direction: column;
    align-items: center;
  }

  .try-option {
    max-width: 100%;
  }

  .instructions-panel {
    padding: 1.5rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
    letter-spacing: 2px;
  }

  .subtitle {
    font-size: 1.1rem;
  }

  .control-button {
    font-size: 0.9rem;
    padding: 0.7rem 1rem;
  }

  .modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */
button:focus,
a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #ffffff;
    --secondary-color: #ffffff;
    --accent-color: #ffffff;
    --text-color: #ffffff;
    --border-color: #ffffff;
  }

  .modal-content,
  .instructions-panel,
  .control-panel,
  .card {
    border-width: 3px;
  }
}

/* Print styles */
@media print {
  body {
    background: white;
    color: black;
  }

  .modal,
  .loading-overlay {
    display: none !important;
  }

  .instructions-panel,
  .card {
    break-inside: avoid;
    border: 1px solid black;
  }
}
