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

:root {
  --bg-color: #0b0c14;
  --panel-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.1);
  --primary-cyan: #00f2ff;
  --primary-magenta: #ff00e5;
  --text-main: #ffffff;
  --text-muted: #a0a0a0;
  --accent-glow: rgba(0, 242, 255, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

#root {
  height: 100%;
}

.app-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% -20%, #1a1b2e 0%, #0b0c14 100%);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

/* Glassmorphism utility */
.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Custom Titlebar */
.titlebar {
  height: 40px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 10px;
  -webkit-app-region: drag;
}

.window-controls {
  display: flex;
  gap: 15px;
  -webkit-app-region: no-drag;
}

.control-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.control-btn:hover {
  color: var(--text-main);
}

.control-btn.close:hover {
  color: #ff4b4b;
}

/* Main Content */
.main-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  padding-top: 0;
  min-height: 0;
  /* Important for flex children to scroll */
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-cyan), var(--primary-magenta));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
}

.logo-text h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo-text span {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Navigation */
.nav-tabs {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 5px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
}

.nav-item {
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

.nav-item.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
  border: 1px solid rgba(0, 242, 255, 0.3);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  flex: 1;
}

/* Drop Zone */
.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.drop-zone:hover {
  border-color: var(--primary-cyan);
  background: rgba(0, 242, 255, 0.02);
}

.drop-zone::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  border-radius: 20px;
  box-shadow: 0 0 50px rgba(255, 0, 229, 0.1);
  pointer-events: none;
}

.drop-icon-container {
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
  position: relative;
}

.drop-icon-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, var(--primary-cyan), var(--primary-magenta));
  filter: blur(20px);
  opacity: 0.3;
  animation: pulse 4s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.5;
  }

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

.drop-zone h2 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}

.drop-zone p {
  color: var(--text-muted);
}

/* Sidebar Config */
.sidebar-config {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.config-card {
  padding: 20px;
}

.config-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-cyan);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-group {
  margin-bottom: 15px;
}

.input-group label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.select-custom {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.select-custom:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 242, 255, 0.3);
}

.select-custom:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 2px rgba(0, 242, 255, 0.1);
}

.btn-primary {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--primary-cyan), var(--primary-magenta));
  color: #0b0c14;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(255, 0, 229, 0.4);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: translateY(-1px) scale(0.98);
}

/* Status Bar */
.status-bar {
  height: 35px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  font-size: 11px;
  color: var(--text-muted);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.indicator-dot {
  width: 6px;
  height: 6px;
  background: #00ff88;
  border-radius: 50%;
  box-shadow: 0 0 8px #00ff88;
}

/* Custom Select Styles */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.inset-y-0 {
  top: 0;
  bottom: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

.z-50 {
  z-index: 50;
}

.mt-1 {
  margin-top: 4px;
}

.w-full {
  width: 100%;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.text-left {
  text-align: left;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.block {
  display: block;
}

.h-4 {
  height: 16px;
}

.w-4 {
  width: 16px;
}

.bg-dark-glass {
  background: rgba(15, 15, 25, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.max-height-60 {
  max-height: 240px;
}

.overflow-auto {
  overflow: auto;
}

.rounded-md {
  border-radius: 8px;
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.py-1 {
  padding-top: 4px;
  padding-bottom: 4px;
}

.py-2 {
  padding-top: 8px;
  padding-bottom: 8px;
}

.pl-3 {
  padding-left: 12px;
}

.pl-10 {
  padding-left: 40px;
}

.pr-4 {
  padding-right: 16px;
}

.select-none {
  user-select: none;
}

.cursor-default {
  cursor: default;
}

.font-normal {
  font-weight: 400;
}

.font-medium {
  font-weight: 500;
}

.text-primary-cyan {
  color: var(--primary-cyan);
}

.text-white {
  color: #ffffff;
}

/* Scrollbar styling for dropdown */
.bg-dark-glass::-webkit-scrollbar {
  width: 6px;
}

.bg-dark-glass::-webkit-scrollbar-track {
  background: transparent;
}

.bg-dark-glass::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.bg-dark-glass::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Animation for select dropdown */
.transition {
  transition-property: opacity, transform;
}

.ease-in {
  transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}

.duration-100 {
  transition-duration: 100ms;
}

.opacity-0 {
  opacity: 0;
}

.opacity-100 {
  opacity: 1;
}

.drop-zone.drag-active {
  border-color: var(--primary-cyan);
  background: rgba(0, 242, 255, 0.05);
  transform: scale(1.01);
}

.transcription-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.progress-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-text {
  position: absolute;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
}

.transcription-status h3 {
  font-size: 24px;
  background: linear-gradient(90deg, var(--primary-cyan), var(--primary-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
  0% {
    filter: hue-rotate(0deg);
  }

  100% {
    filter: hue-rotate(360deg);
  }
}

/* Models View */
.models-view h2 {
  font-size: 32px;
  margin-bottom: 10px;
}

.models-list .glass:hover {
  border-color: var(--primary-cyan);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-5px);
  transition: all 0.3s;
}

/* Result Modal Styles */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 40px;
}

.result-modal {
  width: 100%;
  max-width: 500px;
  padding: 40px;
  position: relative;
  text-align: center;
  border-color: rgba(0, 242, 255, 0.2);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: white;
}

.success-icon-container {
  margin-bottom: 25px;
  position: relative;
  display: inline-flex;
}

.success-glow {
  position: absolute;
  inset: 0;
  background: var(--primary-cyan);
  filter: blur(30px);
  opacity: 0.2;
  border-radius: 50%;
}

.result-modal h2 {
  font-size: 24px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #fff, var(--primary-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-subtitle {
  color: var(--text-muted);
  margin-bottom: 30px;
}

.path-container {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 10px;
  text-align: left;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.path-label {
  font-size: 10px;
  color: var(--primary-cyan);
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.path-text {
  font-size: 13px;
  color: #ddd;
  word-break: break-all;
  font-family: monospace;
}

.modal-actions {
  display: flex;
  gap: 15px;
}

.btn-primary-small {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--primary-cyan), var(--primary-magenta));
  color: #0b0c14;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 242, 255, 0.3);
}

.btn-secondary {
  padding: 12px 25px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* SRT Editor Styles */
.srt-editor-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 25px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 242, 255, 0.2);
}

.editor-header {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-back {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
}

.file-label {
  color: var(--text-muted);
  font-weight: 500;
}

.file-name {
  color: var(--primary-cyan);
  font-weight: 600;
}

.preview-label {
  color: var(--text-muted);
  font-size: 14px;
}

.segments-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 15px;
  margin-bottom: 20px;
}

.segments-list::-webkit-scrollbar {
  width: 8px;
}

.segments-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

.segments-list::-webkit-scrollbar-thumb {
  background: rgba(0, 242, 255, 0.2);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.segments-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 242, 255, 0.4);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.segments-header {
  display: grid;
  grid-template-columns: 60px 120px 120px 1fr;
  padding: 10px 15px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 10px;
}

.segment-row {
  display: grid;
  grid-template-columns: 60px 120px 120px 1fr;
  align-items: center;
  padding: 8px 15px;
  border-radius: 12px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all 0.2s;
}

.segment-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.segment-row:focus-within {
  border-color: var(--primary-cyan);
  background: rgba(0, 242, 255, 0.03);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

.col-index {
  font-size: 14px;
  color: var(--text-muted);
  font-family: monospace;
}

.time-input-container {
  position: relative;
  width: 100px;
}

.time-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text-main);
  font-size: 13px;
  font-family: monospace;
  outline: none;
}

.time-controls {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  color: var(--text-muted);
  opacity: 0.5;
}

.text-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-main);
  font-size: 14px;
  resize: none;
  outline: none;
  transition: all 0.2s;
}

.text-input:focus {
  border-color: var(--primary-cyan);
  background: rgba(0, 0, 0, 0.4);
}

.editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
}



.btn-one-click-export {
  flex: 1;
  max-width: 450px;
  height: 80px;
  background: linear-gradient(135deg, #4b1d3f 0%, #1d1b4b 100%);
  border: 2px solid #ff00e5;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  box-shadow: 0 0 30px rgba(255, 0, 229, 0.2);
}

.btn-one-click-export:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 50px rgba(255, 0, 229, 0.4);
  filter: brightness(1.2);
}

.btn-one-click-export .btn-content {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.btn-one-click-export .main-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.btn-one-click-export .sub-text {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 2px;
}

.btn-one-click-export .btn-icon {
  color: #ffaa00;
  filter: drop-shadow(0 0 8px #ffaa00);
}

.editor-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 20px;
  color: var(--primary-cyan);
}
.save-toast {
  position: absolute;
  bottom: 120px;
  left: 50%;
  background: rgba(0, 242, 255, 0.95);
  color: #0b0c14;
  padding: 12px 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 242, 255, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
