/* =================================================================
   NoFl - Flash Timer Styles
   ================================================================= */

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

body {
  font-family: 'Poppins', sans-serif;
  background-color: #0a0a0a;
  background-image: radial-gradient(circle at center, #1a1a1a, #0a0a0a);
  color: #f0f0f0;
  min-height: 100vh;
  padding: 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* =================================================================
   Header
   ================================================================= */
h1 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #d4af37;
  text-shadow: 0 1px 10px rgba(212, 175, 55, 0.3);
  margin-bottom: 0.5rem;
}

.subtitle {
  text-align: center;
  color: #a0a0a0;
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* =================================================================
   Layout
   ================================================================= */
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .two-column {
    grid-template-columns: 1fr;
  }
}

/* =================================================================
   Voice Control Section
   ================================================================= */
.voice-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 1.5rem;
}

.voice-section h2 {
  font-size: 1.25rem;
  color: #d4af37;
  margin-bottom: 1rem;
}

.voice-status {
  font-size: 0.875rem;
  color: #a0a0a0;
  margin-bottom: 1rem;
}

/* Model Selection Buttons */
.model-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.model-buttons button {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 0.5rem;
  color: #d4af37;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Poppins', sans-serif;
}

.model-buttons button:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: #d4af37;
}

.model-progress {
  color: #d4af37;
  font-weight: 600;
  margin-left: 0.5rem;
}

/* Language Controls */
.controls-container {
  margin-bottom: 1rem;
}

.controls-container label {
  color: #d4af37;
  margin-right: 0.5rem;
}

.controls-container select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 0.5rem;
  color: #f0f0f0;
  padding: 0.5rem;
  font-family: 'Poppins', sans-serif;
}

/* Voice Control Buttons */
.voice-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.voice-buttons button {
  flex: 1;
  padding: 0.75rem;
  border: none;
  border-radius: 0.5rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-start {
  background: #d4af37;
  color: #0d0d0d;
}

.btn-start:hover:not(:disabled) {
  background: #e5c158;
}

.btn-start:disabled {
  background: #4a4a4a;
  color: #808080;
  cursor: not-allowed;
}

.btn-stop {
  background: #e74c3c;
  color: white;
}

.btn-stop:hover:not(:disabled) {
  background: #c0392b;
}

.btn-stop:disabled {
  background: #4a4a4a;
  color: #808080;
  cursor: not-allowed;
}

.btn-clear {
  background: #555;
  color: white;
}

.btn-clear:hover {
  background: #666;
}

/* Transcript Display */
.transcript {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0.5rem;
  min-height: 5rem;
  color: #f0f0f0;
  font-size: 0.875rem;
  white-space: pre-wrap;
}

/* =================================================================
   Lane Timers Section
   ================================================================= */
.timers-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 1.5rem;
}

.timers-section h2 {
  font-size: 1.25rem;
  color: #d4af37;
  margin-bottom: 1rem;
}

.lane-timers {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Individual Lane Timer */
.lane-timer {
  position: relative;
  height: 5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  padding: 1rem;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease-in-out;
  background: rgba(255, 255, 255, 0.06);
}

.lane-timer:hover {
  transform: scale(1.02);
}

.lane-timer.active {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.lane-timer .progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(212, 175, 55, 0.2);
  transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  width: 0%;
}

/* Lane Icon */
.lane-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.lane-icon img {
  width: 2.5rem;
  height: 2.5rem;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all 0.5s;
}

.lane-timer.active .lane-icon img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
}

/* Lane Info */
.lane-info {
  margin-left: 1rem;
  flex-grow: 1;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lane-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lane-name {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(160, 160, 160, 0.8);
  transition: color 0.3s;
  min-width: 3rem;
}

.lane-timer.active .lane-name {
  color: white;
}

.lane-keyword-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 0.5rem;
  color: #f0f0f0;
  padding: 0.4rem 0.75rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.lane-keyword-input:focus {
  outline: none;
  border-color: #d4af37;
  background: rgba(0, 0, 0, 0.5);
}

.lane-keyword-input::placeholder {
  color: rgba(160, 160, 160, 0.5);
  font-size: 0.7rem;
}

.lane-keyword-input:hover {
  border-color: rgba(212, 175, 55, 0.4);
}

.lane-time {
  font-size: 1.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s;
}

.lane-timer.active .lane-time {
  color: #d4af37;
}

/* =================================================================
   Error Modal
   ================================================================= */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-in-out;
}

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

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border: 2px solid rgba(212, 175, 55, 0.3);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.3s ease-out;
}

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

.modal-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  color: #a0a0a0;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.modal-close:hover {
  color: #f0f0f0;
}

.modal-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1rem;
}

.modal-content h2 {
  color: #d4af37;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.modal-content p {
  color: #f0f0f0;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.error-solutions {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.error-solutions h3 {
  color: #d4af37;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.error-solutions ul {
  list-style: none;
  padding: 0;
}

.error-solutions li {
  color: #f0f0f0;
  font-size: 0.875rem;
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.error-solutions li:before {
  content: "•";
  color: #d4af37;
  font-weight: bold;
  position: absolute;
  left: 0.5rem;
}

.modal-btn {
  width: 100%;
  padding: 0.75rem;
  background: #d4af37;
  color: #0d0d0d;
  border: none;
  border-radius: 0.5rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-btn:hover {
  background: #e5c158;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.modal-btn:active {
  transform: translateY(0);
}

/* =================================================================
   Utility
   ================================================================= */
#output {
  display: none;
}
