:root {
  --color-glow: rgba(99, 102, 241, 0.4);
}

body {
  background: radial-gradient(circle at center, #111827 0%, #0a0e17 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  overflow-y: auto;
}

.radio-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  flex-shrink: 0;
  padding: 20px;
  position: relative;
}

.radio-card {
  background: rgba(19, 25, 38, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 1260px;
  height: auto;
  min-height: max(500px, calc(100vh - 240px));
  padding: 40px 40px 20px 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  transition: var(--transition-smooth);
  position: relative;
}

.radio-card:hover {
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 50px rgba(99, 102, 241, 0.15);
}

.status-select-container {
  position: relative;
  z-index: 120;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0px;
  margin-bottom: 15px;
  width: 100%;
  max-width: 580px;
  box-sizing: border-box;
}

.status-select-container.centered {
  position: relative;
  margin-top: auto;
  margin-bottom: auto;
  transform: translateY(-20px) scale(1.05);
  max-width: 480px;
}

.status-badge {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
  color: #a5b4fc;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-badge:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

.status-badge.active {
  border-color: rgba(99, 102, 241, 0.65);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.25);
  background-color: rgba(19, 25, 38, 0.95);
}



.status-select-row {
  display: flex;
  gap: 0;
  align-items: stretch;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

#status-select-trigger {
  width: 100%;
  box-sizing: border-box;
  justify-content: space-between;
  border-radius: 0 20px 20px 0 !important;
  height: 100%;
}

#label-select-trigger {
  width: 120px;
  min-width: 120px;
  box-sizing: border-box;
  justify-content: space-between;
  padding: 6px 12px;
  border-radius: 20px 0 0 20px !important;
  border-right: none !important;
  height: 100%;
}

.status-select-container.centered #status-select-trigger {
  width: 100%;
  min-width: 0;
  justify-content: space-between;
  padding: 8px 20px;
  border-radius: 0 20px 20px 0 !important;
  height: 100%;
}

.status-select-container.centered .status-badge {
  justify-content: space-between;
  padding: 8px 20px;
}

.status-select-container.centered #label-select-trigger {
  width: 140px;
  min-width: 140px;
  justify-content: space-between;
  padding: 8px 16px;
  border-radius: 20px 0 0 20px !important;
  border-right: none !important;
  height: 100%;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.status-dot.playing {
  background-color: #0ea5e9;
  box-shadow: 0 0 8px #0ea5e9;
}

.status-dot.paused {
  background-color: var(--color-warning);
  box-shadow: 0 0 8px var(--color-warning);
}

.status-dot.loading {
  background-color: #60a5fa;
  box-shadow: 0 0 8px #60a5fa;
}

.status-dot.active {
  animation: pulse-dot 1.5s infinite alternate;
}

#radio-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  white-space: normal;
}

.status-prefix {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
  transition: color 0.3s ease;
}

.status-prefix.playing {
  color: #0ea5e9 !important;
}

.status-prefix.paused {
  color: var(--color-warning) !important;
}

.status-prefix.loading {
  color: #60a5fa !important;
}

#radio-status-title {
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.label-status-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  white-space: normal;
}

#label-status {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.status-select-container.centered #label-status {
  max-width: 220px;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  100% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Sentence Render Area */
.sentence-display {
  flex-grow: 1;
  min-height: 180px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 10px;
}

.en-sentence {
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 8px;
}

.word-span {
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 500;
  color: #ffffff;
  background: transparent;
  padding: 0px 4px;
  margin: 0px 0;
  border-radius: 4px;
  line-height: 1.1;
  transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.word-span:hover {
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.15s ease;
}

.word-span.highlighted {
  color: var(--text-contrast);
  background: var(--grad-primary);
  transform: scale(1.08);
  box-shadow: 0 4px 6px rgba(99, 102, 241, 0.4);
  transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.zh-sentence {
  font-size: clamp(18px, 1.6vw, 22px);
  color: #fbbf24;
  max-width: 90%;
  line-height: 1.5;
  font-weight: 400;
  min-height: 27px;
  transition: opacity 0.3s ease;
}

.sentence-divider {
  width: 150px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15), transparent);
  margin: 6px 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sentence-divider.show {
  opacity: 1;
}

/* Dynamic Equalizer */
.equalizer-container {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 32px;
  margin-top: -15px;
}

.equalizer-bar {
  width: 4px;
  height: 32px;
  background: var(--grad-primary);
  border-radius: 2px;
  transform-origin: bottom;
  transform: scaleY(0.125);
  transition: transform 0.1s ease;
}

.equalizer-container.playing .equalizer-bar {
  animation: bounce 0.8s ease-in-out infinite alternate;
}

.equalizer-container.playing .equalizer-bar:nth-child(2) {
  animation-delay: 0.15s;
}

.equalizer-container.playing .equalizer-bar:nth-child(3) {
  animation-delay: 0.3s;
}

.equalizer-container.playing .equalizer-bar:nth-child(4) {
  animation-delay: 0.05s;
}

.equalizer-container.playing .equalizer-bar:nth-child(5) {
  animation-delay: 0.25s;
}

.equalizer-container.playing .equalizer-bar:nth-child(6) {
  animation-delay: 0.1s;
}

.equalizer-container.playing .equalizer-bar:nth-child(7) {
  animation-delay: 0.2s;
}

@keyframes bounce {
  0% {
    transform: scaleY(0.125);
  }

  100% {
    transform: scaleY(1);
  }
}

/* Center Play/Stop Button */
.control-center {
  position: relative;
  margin-top: 0;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
}

.play-btn-main {
  background: var(--grad-primary);
  border: none;
  color: var(--text-contrast);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4), 0 0 0 0px rgba(99, 102, 241, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 5;
  pointer-events: auto;
}

.play-btn-main:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.6), 0 0 0 8px rgba(99, 102, 241, 0.1);
}

.play-btn-main.playing {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.play-btn-main.playing:hover {
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.6), 0 0 0 8px rgba(239, 68, 68, 0.1);
}

.play-btn-sub {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
  z-index: 5;
  pointer-events: auto;
}

.play-btn-sub:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-contrast);
  transform: scale(1.05);
  border-color: rgba(99, 102, 241, 0.3);
}

.play-btn-sub:active {
  transform: scale(0.95);
}

.play-btn-sub:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.toggles-row {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  margin-top: -15px;
  margin-bottom: -15px;
  z-index: 10;
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 8px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  pointer-events: auto;
}

.toggle-container:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.3);
}

.toggle-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  user-select: none;
}

.speed-controller-inline {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0 6px;
  height: 30px;
  box-sizing: border-box;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  pointer-events: auto;
  user-select: none;
}

.speed-controller-inline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.3);
}

.speed-inline-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.speed-inline-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-contrast);
  border-color: rgba(99, 102, 241, 0.3);
  transform: scale(1.08);
}

.speed-inline-btn:active {
  transform: scale(0.9);
}

.speed-inline-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

.speed-inline-display {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  min-width: auto;
  padding: 0 2px;
  text-align: center;
}

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
  background: var(--grad-primary);
}

input:focus+.slider {
  box-shadow: 0 0 1px #6366f1;
}

input:checked+.slider:before {
  transform: translateX(18px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 20px;
}

.slider.round:before {
  border-radius: 50%;
}

.toggle-label.counting {
  color: #ef4444;
  font-weight: 600;
  animation: delayPulse 1s infinite alternate;
}

@keyframes delayPulse {
  from {
    opacity: 0.6;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* Custom Progress Bar */
.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--grad-primary);
  border-radius: 3px;
  transition: width 0.1s linear;
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.progress-wrapper:hover .progress-bar-fill::after {
  transform: translateY(-50%) scale(1);
}

.progress-wrapper.dragging .progress-bar-fill {
  transition: none;
}

.progress-wrapper.dragging .progress-bar-fill::after {
  transform: translateY(-50%) scale(1.2);
  transition: none;
}

/* Countdown Overlay */
.countdown-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-lg);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.countdown-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.countdown-number {
  font-size: 72px;
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
  animation: pulse-countdown 1s infinite alternate;
}

.countdown-text {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 500;
}

@keyframes pulse-countdown {
  0% {
    transform: scale(0.9);
  }

}

/* Quota Overlay Button Styles */
.quota-modal-btn {
  background: var(--grad-primary);
  border: none;
  color: var(--text-contrast);
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quota-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.quota-modal-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quota-modal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Footer styling */
.radio-footer {
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  width: 100%;
  background: rgba(19, 25, 38, 0.4);
}

.top-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1260px;
  margin-bottom: 20px;
  z-index: 10;
  padding: 0;
}

/* Custom Dropdown Styles */
.custom-select-arrow {
  color: #a5b4fc;
  transition: transform 0.3s ease;
  font-size: 14px;
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(19, 25, 38, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  max-height: 380px;
  /* ~10 items (approx 38px each) */
  overflow-y: auto;
  display: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 101;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

.custom-select-options.show {
  display: block;
  animation: fadeInDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.custom-select-options::-webkit-scrollbar {
  width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
  background: transparent;
}

.custom-select-options::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 3px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}

.custom-select-option {
  padding: 10px 20px;
  font-size: 15px;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-family: 'Outfit', sans-serif;
}

.custom-select-option:hover {
  background: rgba(99, 102, 241, 0.1);
  color: #ffffff;
}

.custom-select-option.selected {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  font-weight: 500;
}

/* Beautiful Toast System */
.toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-message {
  background: rgba(19, 25, 38, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-fade-in-out 3.2s forwards;
  pointer-events: auto;
}

@keyframes toast-fade-in-out {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }

  10% {
    opacity: 1;
    transform: translateY(0);
  }

  90% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Flying Word Jump Animation & Button Pop Effect */
.flying-word-anim {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  background: var(--grad-primary);
  border-radius: 20px;
  padding: 4px 12px;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6), 0 0 15px rgba(99, 102, 241, 0.4);
  white-space: nowrap;
  box-sizing: border-box;
}

.record-btn-pop {
  animation: recordBtnPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes recordBtnPop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.7);
    border-color: rgba(99, 102, 241, 0.8);
  }

  100% {
    transform: scale(1);
  }
}

/* Mobile Responsive Layout Styles */
@media (max-width: 1024px) {


  body {
    overflow-y: auto;
  }

  .radio-container {
    padding: 15px 10px 20px;
    justify-content: flex-start;
  }

  .radio-card {
    padding: 25px 15px 5px 15px;
    gap: 20px;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #131926;
    width: 100%;
    height: calc(100vh - 210px);
    max-height: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
  }

  .sentence-display {
    flex-grow: 1;
    min-height: 0;
    justify-content: center;
  }

  .word-span {
    font-size: clamp(26px, 4.5vw, 36px);
    padding: 0px 2px;
    border-radius: 3px;
    line-height: 1.1;
  }

  .zh-sentence {
    font-size: clamp(18px, 2.5vw, 22px);
  }

  .app-header {
    padding: 10px 15px;
  }

  .brand h1 {
    font-size: 18px;
  }

  .brand h1 span {
    display: none;
    /* Hide subtitle on mobile headers */
  }

  .brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .control-center {
    margin-top: 0;
    margin-bottom: 0;
    gap: 16px;
  }

  .toggles-row {
    margin-top: -17px;
    margin-bottom: -12px;
  }

  .play-btn-main {
    width: 60px;
    height: 60px;
    font-size: 20px;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  }

  .play-btn-main.playing {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
  }

  .play-btn-sub {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  @media (max-width: 768px) {
    .radio-card {
      height: auto;
      min-height: calc(100vh - 210px);
    }

    .word-span {
      font-size: clamp(20px, 6vw, 28px);
    }

    .zh-sentence {
      font-size: clamp(14px, 4.2vw, 18px);
    }

    .status-select-row {
      gap: 0;
      align-items: stretch;
    }

    .status-badge {
      font-size: 10px;
      padding: 3px 10px;
    }

    #status-select-trigger {
      width: 100%;
      border-radius: 0 20px 20px 0 !important;
      height: 100%;
    }

    #label-select-trigger {
      width: 90px;
      min-width: 90px;
      padding: 4px 6px !important;
      border-radius: 20px 0 0 20px !important;
      border-right: none !important;
      height: 100%;
    }

    .status-select-container.centered #status-select-trigger {
      width: 100%;
      min-width: 0;
      border-radius: 0 20px 20px 0 !important;
      height: 100%;
    }

    .status-select-container.centered .status-badge {
      padding: 6px 12px;
      font-size: 10px;
    }

    .status-select-container.centered #label-select-trigger {
      width: 100px;
      min-width: 100px;
      padding: 6px 8px !important;
      border-radius: 20px 0 0 20px !important;
      border-right: none !important;
      height: 100%;
    }

    #radio-status {
      max-width: none;
    }

    .status-select-container.centered #radio-status {
      max-width: none;
    }

    #radio-status-title {
      font-size: 11px;
      line-height: 1.2;
    }

    .status-prefix {
      font-size: 8px;
      letter-spacing: 0.3px;
    }

    #label-status {
      max-width: 48px;
      font-size: 11px;
      line-height: 1.2;
    }

    .status-select-container.centered #label-status {
      max-width: 55px;
      font-size: 11px;
      line-height: 1.2;
    }

    .toggles-row {
      justify-content: center;
      flex-wrap: wrap;
      gap: 6px;
    }

    .toggle-container {
      padding: 2px 6px;
      gap: 6px;
    }

    .toggle-label {
      font-size: 11px;
    }

    .speed-controller-inline {
      height: 22px;
      padding: 0 4px;
      gap: 2px;
    }

    .speed-inline-btn {
      width: 16px;
      height: 16px;
      font-size: 8px;
    }

    .speed-inline-display {
      font-size: 11px;
      min-width: auto;
      padding: 0 2px;
    }

    .switch {
      width: 30px;
      height: 16px;
    }

    .slider:before {
      height: 10px;
      width: 10px;
      left: 3px;
      bottom: 3px;
    }

    input:checked+.slider:before {
      transform: translateX(14px);
    }

    .custom-select-option {
      font-size: 13px;
      padding: 8px 16px;
    }

    .custom-select-options {
      max-height: 300px;
    }
  }
}

/* Specific override for iPad / Tablet devices */
@media (min-width: 768px) and (max-width: 1024px) {
  .radio-container {
    justify-content: center !important;
    padding: 20px !important;
  }

  .radio-card {
    height: calc(100vh - 80px) !important;
    min-height: 680px !important;
    max-height: 980px !important;
  }
}

/* Records Modal Styling */
#records-modal-overlay {
  z-index: 300;
}

.records-modal-content {
  background: rgba(19, 25, 38, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--border-radius-lg);
  padding: 35px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 50px rgba(99, 102, 241, 0.15);
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 85vh;
  overflow: hidden;
  transition: var(--transition-smooth);
}

/* Make modal larger on iPads and desktops */
@media (min-width: 768px) {
  .records-modal-content {
    max-width: 720px;
    padding: 40px;
  }
}

@media (min-width: 1024px) {
  .records-modal-content {
    max-width: 800px;
  }
}

.progress-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bottom-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  margin-top: auto;
}

.progress-time-info {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  user-select: none;
}

