/* ===== MAIN COMPONENTS STYLES ===== */

/* Main Content Area */
.main-content {
  margin-left: 260px;
  flex: 1;
  padding: 0;
  overflow-y: auto;
  background: #fafbfc;
  min-height: 100vh;
}

.main-content::-webkit-scrollbar {
  width: 8px;
}

.main-content::-webkit-scrollbar-thumb {
  background: rgba(139, 127, 245, 0.3);
  border-radius: 4px;
}

.main-content::-webkit-scrollbar-track {
  background: transparent;
}

/* Hide scrollbar for dashboard tab */
.main-content:has(.dashboard-container) {
  overflow-y: hidden !important;
  overflow-x: hidden !important;
  scrollbar-width: none;
}

.main-content:has(.dashboard-container)::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.main-content:has(.dashboard-container)::-webkit-scrollbar-track {
  display: none !important;
}

.main-content:has(.dashboard-container)::-webkit-scrollbar-thumb {
  display: none !important;
}

/* Alternative: Hide scrollbar using class */
.main-content.dashboard-active {
  overflow: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.main-content.dashboard-active::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.main-content.dashboard-active::-webkit-scrollbar-track {
  display: none !important;
  background: transparent !important;
}

.main-content.dashboard-active::-webkit-scrollbar-thumb {
  display: none !important;
  background: transparent !important;
}

/* Mobile override - main content full width */
@media (max-width: 768px) {
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding-top: 60px !important;
  }
}

/* Tab Content */
.tab-content {
  animation: fadeIn 0.4s ease-in-out;
}

/* Main app card */
.app-card {
  background: white;
  backdrop-filter: blur(20px);
  border-radius: 0;
  box-shadow: none;
  border: none;
  animation: slideIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: visible;
  padding: 0;
  margin: 12px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  height: auto;
}

.app-card::-webkit-scrollbar {
  display: none !important;
}

.app-card {
  scrollbar-width: none;
}

/* Header styling */
.header {
  position: relative;
}

.title {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--background-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  text-align: center;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.15rem;
  font-weight: 500;
  text-align: center;
  opacity: 0.9;
}

/* Language selector */
.language-selector {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafb 100%);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
  position: relative;
}

.language-selector:hover {
  border-color: var(--primary-lime);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.language-label {
  font-weight: 700;
  color: var(--primary-navy);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.language-icon {
  font-size: 1.2rem;
  color: var(--primary-purple);
}

.form-select {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  font-weight: 600;
  color: var(--primary-navy);
  background-color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-select:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 4px rgba(139, 127, 245, 0.1);
  outline: none;
}

/* Recording indicator */
.recording-indicator {
  padding: 1rem;
  background: linear-gradient(145deg, #fef3c7 0%, #ffffff 100%);
  border-radius: var(--radius-lg);
  transition: all 0.4s ease;
  justify-content: center;
  font-weight: 600;
  color: var(--text-primary);
}

.recording-indicator.active {
  background: linear-gradient(145deg, #fee2e2 0%, #fef2f2 100%);
  border-color: #ef4444;
  animation: recordingPulse 2s infinite;
}

.pulse-dot {
  width: 14px;
  height: 14px;
  background: linear-gradient(45deg, #ef4444, #f87171);
  border-radius: 50%;
  animation: pulse 1.2s infinite ease-in-out;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Output section */
.output-section {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafb 100%);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
}

.output-section:hover {
  border-color: var(--primary-purple);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 127, 245, 0.1);
}

.output-label {
  font-weight: 700;
  color: var(--primary-navy);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.15rem;
}

.output-text {
  background: white;
  border-radius: 16px;
  min-height: 140px;
  line-height: 1.7;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  word-wrap: break-word;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

/* Audio preview section */
.audio-preview-box {
  animation: slideIn 0.4s ease-in-out;
  transition: all 0.3s ease;
}

.audio-preview-box:hover {
  border-color: var(--primary-lime);
  box-shadow: 0 6px 25px rgba(160, 212, 5, 0.1);
  transform: translateY(-1px);
}

#uploadAudioPlayer {
  appearance: none;
  -webkit-appearance: none;
}

#uploadAudioPlayer::-webkit-media-controls-panel {
  background-color: rgba(160, 212, 5, 0.1);
}

/* Audio preview */
.audio-preview {
  background: linear-gradient(145deg, #f8fffe 0%, #ffffff 100%);
  border-radius: 20px;
  padding: 1.5rem;
  border: 2px solid var(--border-color);
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.audio-preview:hover {
  border-color: var(--primary-purple);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(139, 127, 245, 0.1);
}

#audioPlayer {
  width: 100%;
  height: 50px;
  border-radius: 16px;
  outline: none;
}

/* Playback bar */
.playback-bar {
  width: 100%;
  height: 10px;
  background: var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 15px;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bar-fill {
  height: 100%;
  width: 0;
  background: var(--background-gradient);
  border-radius: 6px;
  transition: width 0.2s linear;
  position: relative;
  overflow: hidden;
}

.bar-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

/* Upload Area */
.upload-area {
  transition: all 0.3s ease;
  position: relative;
}

.upload-area i {
  transition: all 0.3s ease;
}

.upload-area:hover {
  border-color: var(--primary-navy) !important;
  background: linear-gradient(145deg, rgba(139, 127, 245, 0.05), rgba(36, 20, 67, 0.05)) !important;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.upload-area:hover i {
  transform: scale(1.1);
  color: var(--primary-navy) !important;
}

.upload-results {
  animation: slideIn 0.4s ease-in-out;
}

/* Empty state */
.empty-state-section {
  padding: 3rem 2rem;
  animation: fadeIn 0.4s ease-in-out;
}

.audio-preview-section {
  animation: slideIn 0.5s ease-in-out;
}

/* Footer branding */
.footer-brand {
  padding: var(--spacing-md);
  text-align: center;
  background: linear-gradient(
    145deg,
    rgba(139, 127, 245, 0.08),
    rgba(36, 20, 67, 0.06)
  );
  border-radius: var(--radius-lg);
  border: none;
}

.footer-brand small {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-brand a {
  color: #ffffffe4 !important;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 2px 6px;
  border-radius: 6px;
}

.footer-brand a:hover {
  color: var(--primary-navy) !important;
  background: rgba(139, 127, 245, 0.1);
  transform: scale(1.05);
}

/* Countdown display */
.countdown-display {
  background: linear-gradient(135deg, #dbeafe 0%, #c7f0d8 100%);
  border-radius: var(--radius-lg);
  padding: 12px;
  margin: 20px 0;
  box-shadow: var(--shadow-md);
  animation: pulseGlow 2s ease-in-out infinite;
}

.countdown-display.warning {
  background: linear-gradient(135deg, #fee2e2 0%, #fca5a5 100%);
  animation: pulseWarning 1s ease-in-out infinite;
}

.countdown-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: var(--text-primary);
}

.countdown-icon {
  font-size: 2rem;
  animation: blink 1.5s ease-in-out infinite;
}

.countdown-display.warning .countdown-icon {
  animation: blinkFast 0.5s ease-in-out infinite;
}

.countdown-text {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.countdown-timer {
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  min-width: 100px;
  text-align: center;
}

.time-progress {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  margin-top: 15px;
  overflow: hidden;
  position: relative;
}

.time-progress-bar {
  height: 100%;
  background: white;
  border-radius: 10px;
  transition: width 1s linear;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
