/* Resolved by accepting feature branch changes */

/* Modern styles for Spelling Bee Championship */
@import url('https://fonts.googleapis.com/css2?family=Readex+Pro:wght@700&family=Inclusive+Sans:wght@400;700&display=swap');

:root {
  --primary-color: var(--color-primary);
  --text-color: var(--color-text);
  --bg-color: var(--color-bg);
}

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

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', sans-serif;
  overflow-x: hidden;
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Readex Pro', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--text);
  text-transform: uppercase;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 4vw, 2rem); }
h4 { font-size: clamp(1.25rem, 3.5vw, 1.75rem); }
h5 { font-size: clamp(1rem, 3vw, 1.5rem); }
h6 { font-size: clamp(0.875rem, 2.5vw, 1.25rem); }

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

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

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: var(--shadow);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--secondary);
  color: white;
}

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

.btn-outline:hover {
  background-color: rgba(79, 70, 229, 0.1);
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  transition: var(--transition);
}

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

/* Forms */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--card-bg);
  background-clip: padding-box;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

/* Alerts */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  font-weight: 500;
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border-left: 4px solid #10b981;
}

.alert-error {
  background-color: #fee2e2;
  color: #b91c1c;
  border-left: 4px solid #ef4444;
}

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

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

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

.animate-slide-up {
  animation: slideInUp 0.3s ease-out;
}

/* Dark Mode */
body.theme-dark {
  background-color: var(--dark-bg);
  color: var(--dark-text);
}

body.theme-dark .card {
  background-color: var(--dark-card-bg);
  color: var(--dark-text);
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .container {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
  }
}

/* Honeycomb Background */
.honeycomb-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.1;
  background-image: url('img/bee-honeycomb.svg');
  background-size: 200px 173px;
  background-repeat: repeat;
  pointer-events: none;
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-4 { margin-top: var(--spacing-md); }
.mt-6 { margin-top: var(--spacing-lg); }
.mt-8 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-4 { margin-bottom: var(--spacing-md); }
.mb-6 { margin-bottom: var(--spacing-lg); }
.mb-8 { margin-bottom: var(--spacing-xl); }


/* Shared layout utilities */
.screen-container {
    min-height: 100vh;
    padding: 1rem;
}

@media (min-width: 768px) {
    .screen-container {
        padding: 2rem;
    }
}

.screen-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .screen-title {
        font-size: 3rem;
    }
}

.screen-subtitle {
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .screen-subtitle {
        font-size: 1.5rem;
    }
}

.btn-responsive {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
}

@media (min-width: 768px) {
    .btn-responsive {
        padding: 0.75rem 1.5rem;
        font-size: 1.125rem;
    }
}

.timer-display {
    font-size: 2.25rem;
    font-weight: 700;
}

@media (min-width: 768px) {
    .timer-display {
        font-size: 3.75rem;
    }
}

/* Teacher Mode increases overall scaling for easier classroom viewing */
body.teacher-mode {
    font-size: 1.25rem;
}

body.teacher-mode button {
    font-size: 1.1em;
    padding: 1em 1.25em;
}

body.teacher-mode .scorecard {
    padding: 1.5em;
    margin-bottom: 1.5em;
}

img,
video {
    max-width: 100%;
    height: auto;
}

/* Custom animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes btn-bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.btn-bounce {
    animation: btn-bounce 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
    .btn-bounce {
        animation: none;
    }
}

@keyframes bee-fly {
    0% {
        transform: translateX(-10vw);
    }
    100% {
        transform: translateX(110vw);
    }
}

.flying-bee {
    position: fixed;
    top: 50vh;
    left: -10vw;
    width: 80px;
    z-index: 1000;
    pointer-events: none;
    animation: bee-fly 8s linear forwards;
}

@media (prefers-reduced-motion: reduce) {
    .flying-bee {
        animation: none;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* Custom gradient backgrounds */
.gradient-blue-purple {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.gradient-indigo-purple {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.gradient-green-blue {
    background: linear-gradient(135deg, #059669, #2563eb);
}

/* Timer styling */
.timer-warning {
    color: #ef4444;
    animation: pulse 1s infinite;
}

.timer-normal {
    color: white;
}

/* Word reveal animation */
.word-reveal {
    animation: bounce 0.5s ease-out;
}

/* Help shop buttons */
.help-button {
    transition: all 0.2s ease;
}

.help-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.help-button:disabled {
    transform: none;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Team cards */
.team-card {
    transition: all 0.3s ease;
}

.team-card:hover {
    transform: translateY(-5px);
}

.team-card.active {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Button hover effects */
.btn-primary {
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Modal overlay styles */
.modal-overlay {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay .modal-content {
    width: 100%;
    max-width: 500px;
}

@media (min-width: 768px) {
    .modal-overlay .modal-content {
        max-width: 600px;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Audio controls */
.audio-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 10px;
}

.audio-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.audio-btn:hover {
    transform: scale(1.1);
}

.audio-btn.muted {
    opacity: 0.5;
}

/* Theme toggle styles */
.theme-toggle {
  position: fixed;
  bottom: 70px;
  right: 20px;
  z-index: 100;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Responsive design */
@media (max-width: 768px) {
    .text-8xl {
        font-size: 4rem;
    }
    
    .text-6xl {
        font-size: 3rem;
    }
    
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .text-4xl {
        font-size: 2rem;
    }
    
    .text-3xl {
        font-size: 1.5rem;
    }
    
    .p-8 {
        padding: 1rem;
    }
}

@media (max-width: 640px) {
    .w-1\/2 {
        width: 100%;
    }
    #root {
        padding: 0.5rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
}