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

:root {
  --bg-dark: #f8fafc;
  --bg-surface: #ffffff;
  --panel-bg: rgba(255, 255, 255, 0.88);
  --panel-border: rgba(226, 232, 240, 0.9);
  --panel-hover-border: rgba(147, 51, 234, 0.45);
  
  --primary-purple: #9333ea;
  --primary-indigo: #4f46e5;
  --primary-pink: #db2777;
  --accent-cyan: #0284c7;
  --accent-emerald: #059669;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  
  --gradient-main: linear-gradient(135deg, #4f46e5 0%, #9333ea 50%, #db2777 100%);
  --gradient-glow: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
  
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 35px -5px rgba(0, 0, 0, 0.08), 0 10px 15px -5px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

html {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  box-sizing: border-box;
}

/* Background Ambient Glowing Blobs */
.bg-glow-1 {
  position: absolute;
  top: -10%;
  left: 15%;
  width: min(550px, 90vw);
  height: min(550px, 90vw);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-glow-2 {
  position: absolute;
  top: 30%;
  right: 0;
  width: min(600px, 90vw);
  height: min(600px, 90vw);
  background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(100px);
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-glow-3 {
  position: absolute;
  bottom: 0;
  left: 10%;
  width: min(500px, 90vw);
  height: min(500px, 90vw);
  background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(90px);
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* Navigation Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--panel-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  box-sizing: border-box;
}

.header-main-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-icon-img {
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(147, 51, 234, 0.35);
  border: 1.5px solid rgba(147, 51, 234, 0.3);
}

.brand-text {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  line-height: 1;
}

.badge-tag {
  background: rgba(147, 51, 234, 0.12);
  color: var(--primary-purple);
  border: 1px solid rgba(147, 51, 234, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

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

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

.user-status-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-quick-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-selector-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.lang-selector-wrap:hover {
  border-color: var(--primary-purple);
  background: #f8fafc;
}

.lang-globe-icon {
  font-size: 1rem;
  filter: drop-shadow(0 1px 1px rgba(79, 70, 229, 0.2));
}

.lang-select {
  background: transparent;
  border: none;
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.lang-select option {
  background: #ffffff;
  color: #0f172a;
}

.credit-badge {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  padding: 0.4rem 0.85rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  flex-shrink: 0;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.credit-badge span {
  color: #0284c7;
}

.btn-pricing {
  background: var(--gradient-main);
  border: none;
  color: #ffffff !important;
  padding: 0.5rem 1.15rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.35);
}

.btn-pricing:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(147, 51, 234, 0.45);
}

/* Layout Main Container */
main {
  max-width: 1280px;
  width: 92%;
  margin: 2rem auto;
  flex: 1;
}

.hero-banner {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.hero-title span {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Navigation Tabs */
.tabs-container {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  background: #e2e8f0;
  padding: 0.4rem;
  border-radius: 16px;
  border: 1px solid #cbd5e1;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.tab-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.7);
}

.tab-btn.active {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 20px rgba(147, 51, 234, 0.35);
}

/* Studio Main Grid */
.studio-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.75rem;
  width: 100%;
}

.studio-grid > * {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 992px) {
  .studio-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--panel-border);
}

.panel-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-label span {
  color: var(--primary-pink);
}

textarea.form-control, input.form-control {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1rem;
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  transition: all 0.25s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

textarea.form-control:focus, input.form-control:focus {
  outline: none;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.15);
}

/* Custom Styled Multilingual File Upload Widget */
.custom-file-upload-wrap {
  width: 100%;
}

.file-input-hidden {
  display: none !important;
}

.custom-file-box {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  transition: all 0.25s ease;
  min-height: 48px;
  user-select: none;
}

.custom-file-box:hover, .custom-file-box:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.15);
  background: #f8fafc;
}

.custom-file-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: var(--text-main);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.custom-file-box:hover .custom-file-btn {
  background: var(--gradient-main);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 10px rgba(147, 51, 234, 0.25);
}

.custom-file-name {
  color: var(--text-muted);
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.custom-file-name.has-file {
  color: #059669;
  font-weight: 600;
}

.char-counter {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}

/* Preset Chips */
.presets-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.preset-chip {
  background: #f1f5f9;
  border: 1px solid var(--panel-border);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-chip:hover {
  background: #e2e8f0;
  color: var(--text-main);
  transform: translateY(-1px);
}

.preset-chip.active,
.speed-chip.active {
  background: rgba(147, 51, 234, 0.12);
  border-color: var(--primary-purple);
  color: var(--primary-purple);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(147, 51, 234, 0.2);
}

/* Speaker Select Cards Grid */
.speaker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.speaker-card {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.speaker-card:hover {
  border-color: var(--primary-purple);
  transform: translateY(-2px);
  background: #f8fafc;
}

.speaker-card.selected {
  background: rgba(147, 51, 234, 0.08);
  border-color: var(--primary-purple);
  box-shadow: 0 0 15px rgba(147, 51, 234, 0.2);
}

.speaker-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ede9fe 0%, #fce7f3 100%);
  border: 1.5px solid rgba(147, 51, 234, 0.25);
  box-shadow: 0 2px 6px rgba(147, 51, 234, 0.15);
  margin: 0 auto 0.5rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.speaker-name {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.15rem;
  color: var(--text-main);
}

.speaker-tag {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Action Generate Button */
.btn-generate {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 1.1rem;
  background: var(--gradient-main);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  word-break: keep-all;
  line-height: 1.35;
  gap: 0.6rem;
  box-shadow: 0 10px 25px rgba(147, 51, 234, 0.35);
  transition: all 0.3s ease;
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(147, 51, 234, 0.45);
}

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

.btn-generate-bundle {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.85rem;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, rgba(2, 132, 199, 0.1) 100%);
  border: 1px solid rgba(5, 150, 105, 0.3);
  border-radius: var(--radius-md);
  color: #059669;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  word-break: keep-all;
  line-height: 1.35;
  gap: 0.5rem;
  transition: all 0.25s ease;
}

.btn-generate-bundle:hover {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.2) 0%, rgba(2, 132, 199, 0.2) 100%);
  border-color: #059669;
  box-shadow: 0 0 15px rgba(5, 150, 105, 0.2);
  transform: translateY(-1px);
}

.btn-generate-bundle:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Multilingual Track Selector Bar */
.multilingual-track-bar {
  background: #f8fafc;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.track-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.track-tab-btn {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.track-tab-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.track-tab-btn.active {
  background: var(--gradient-main);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 12px rgba(147, 51, 234, 0.3);
}

.active-track-script-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 1rem;
  text-align: left;
}

.active-script-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.25rem;
}

.active-script-text {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.5;
  font-weight: 500;
}

.cert-lang-btn {
  background: #f1f5f9;
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cert-lang-btn.active, .cert-lang-btn:hover {
  background: var(--primary-purple);
  color: #fff;
  border-color: var(--primary-purple);
}

/* Output Player & History Panel */
.output-player-box {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.waveform-canvas {
  width: 100%;
  height: 80px;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-play-pause {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-main);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.btn-play-pause:hover {
  transform: scale(1.08);
}

.audio-time {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: monospace;
}

.audio-progress-bar {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.audio-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-main);
  border-radius: 3px;
}

.btn-download {
  background: rgba(147, 51, 234, 0.1);
  border: 1px solid var(--primary-purple);
  color: var(--primary-purple);
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-download:hover {
  background: var(--primary-purple);
  color: #fff;
}

.btn-download-srt {
  background: rgba(2, 132, 199, 0.1);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-download-srt:hover {
  background: var(--accent-cyan);
  color: #fff;
}

.output-actions-grid {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
  width: 100%;
}

.speed-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  width: 100%;
}

/* History List */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 350px;
  overflow-y: auto;
}

.history-item {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  width: 100%;
  box-sizing: border-box;
}

.history-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.history-text {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.history-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* Modal Pricing */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 90%;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  color: var(--text-main);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: #f1f5f9;
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

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

.price-card {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.price-card.featured {
  border-color: var(--primary-purple);
  background: rgba(147, 51, 234, 0.04);
  box-shadow: 0 0 25px rgba(147, 51, 234, 0.15);
}

.price-card-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--gradient-main);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
}

.price-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.price-amount {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.price-amount span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

.price-features {
  list-style: none;
  margin-bottom: 1.5rem;
  flex: 1;
}

.price-features li {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-features li::before {
  content: '✓';
  color: var(--accent-emerald);
  font-weight: bold;
}

.btn-subscribe {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
  background: #f1f5f9;
  color: var(--text-main);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.price-card.featured .btn-subscribe {
  background: var(--gradient-main);
  color: #ffffff;
  border: none;
  box-shadow: 0 5px 15px rgba(147, 51, 234, 0.3);
}

/* Spinner Loader */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 0, 0, 0.15);
  border-top-color: var(--primary-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Monetization & Billing UI Styling --- */

/* Plan Badges in Header */
.plan-badge-free {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.plan-badge-basic {
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  border: 1px solid #4f46e5;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
}

.plan-badge-pro {
  background: linear-gradient(135deg, rgba(219, 39, 119, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
  color: #db2777;
  border: 1px solid #db2777;
  padding: 0.25rem 0.85rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
}

.btn-secondary-nav {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn-secondary-nav:hover {
  background: #f8fafc;
  color: var(--text-main);
  border-color: #cbd5e1;
}

/* Pricing Modal Large */
.pricing-modal-large {
  max-width: 960px !important;
}

/* Currency & Gateway Switcher */
.currency-toggle-wrap {
  display: flex;
  background: #e2e8f0;
  padding: 0.35rem;
  border-radius: 30px;
  border: 1px solid #cbd5e1;
  max-width: 540px;
  margin: 0 auto 1.5rem auto;
}

.currency-toggle-btn {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: 24px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}

.currency-toggle-btn.active {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

/* Billing Tabs Nav (Subscription vs Recharge) */
.billing-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.billing-tab-btn {
  background: #f1f5f9;
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.billing-tab-btn.active {
  background: rgba(147, 51, 234, 0.1);
  border-color: var(--primary-purple);
  color: var(--primary-purple);
}

.billing-tab-content {
  display: none;
}

.billing-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Checkout Modal */
.checkout-card {
  max-width: 500px !important;
}

.checkout-summary-box {
  background: #f8fafc;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.summary-row.total-row {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed #cbd5e1;
  font-size: 1.1rem;
  color: var(--text-main);
  font-weight: 700;
}

.total-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0284c7;
}

.toss-method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.btn-pay-method {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-pay-method.active, .btn-pay-method:hover {
  background: rgba(79, 70, 229, 0.1);
  border-color: var(--primary-indigo);
  color: var(--primary-indigo);
}

.btn-pay-action {
  width: 100%;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: none;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-toss-pay {
  background: #3182f6;
  box-shadow: 0 5px 15px rgba(49, 130, 246, 0.35);
}

.btn-toss-pay:hover {
  background: #1b64da;
  transform: translateY(-2px);
}

.btn-paypal-pay {
  background: #ffc439;
  color: #003087 !important;
  font-weight: 800;
  box-shadow: 0 5px 15px rgba(255, 196, 57, 0.35);
}

.btn-paypal-pay:hover {
  background: #f4b400;
  transform: translateY(-2px);
}

/* History Modal Table */
.history-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.billing-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.billing-table th {
  background: #f1f5f9;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.billing-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--panel-border);
  font-size: 0.9rem;
  color: var(--text-main);
}

/* Commercial License Certificate Modal */
.license-card {
  max-width: 720px !important;
  background: #ffffff;
  padding: 1.5rem !important;
}

.license-frame {
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 2rem;
  background: #ffffff;
  position: relative;
}

.license-seal {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid #059669;
  color: #059669;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.license-heading {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  color: var(--text-main);
}

.license-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.license-body {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.license-info-table {
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--panel-border);
}

.license-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.license-info-row:last-child {
  margin-bottom: 0;
}

.license-info-key {
  color: var(--text-dim);
}

.license-info-val {
  font-weight: 600;
  color: var(--text-main);
}

.license-footer-sign {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid var(--panel-border);
  padding-top: 1.25rem;
}

.issuer-name {
  font-size: 1.1rem;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.issuer-date {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.btn-print-cert {
  background: var(--gradient-main);
  border: none;
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn-print-cert:hover {
  transform: translateY(-2px);
}

/* Speed Selector Segmented Chip Control */
.speed-control-wrap {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.speed-chip {
  flex: 1;
  background: #f1f5f9;
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.speed-chip:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

/* Custom Multilingual Bundle Box */
.bundle-download-card {
  background: #f0fdf4;
  border: 1px solid rgba(5, 150, 105, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.bundle-info-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #059669;
  margin-bottom: 0.2rem;
}

.bundle-info-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-download-zip {
  background: #059669;
  border: none;
  color: #fff;
  padding: 0.55rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-download-zip:hover {
  background: #047857;
  transform: translateY(-1px);
}

/* ============================================================
   📱 Comprehensive Mobile & Tablet Responsive Media Queries
   ============================================================ */

/* Safe area padding helper */
@supports (padding-top: env(safe-area-inset-top)) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Tablet & Smaller Laptops (<= 1024px) */
@media (max-width: 1024px) {
  header {
    padding: 0.85rem 1.25rem;
  }
  
  .brand-text {
    font-size: 1.25rem;
  }
  
  main {
    width: 95%;
    margin: 1.25rem auto 2.5rem;
  }
  
  .studio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

/* Tablets & Mobile Screens (<= 800px) */
@media (max-width: 800px) {
  /* Header: Clean 2-Row Structured Layout */
  header {
    flex-direction: column;
    padding: 0.6rem 0.75rem;
    gap: 0.45rem;
    align-items: stretch;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  .header-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .brand {
    gap: 0.4rem;
    flex-shrink: 1;
    min-width: 0;
  }
  
  .brand-icon-img {
    width: 28px !important;
    height: 28px !important;
    border-radius: 7px !important;
  }
  
  .brand-text {
    font-size: 1.1rem;
    white-space: nowrap;
    letter-spacing: -0.3px;
  }
  
  .badge-tag {
    display: none; /* Hide on mobile for compact navbar */
  }

  .header-primary-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
  }
  
  .lang-selector-wrap {
    padding: 0.2rem 0.4rem;
    border-radius: 12px;
    gap: 0.2rem;
  }
  
  .lang-globe-icon {
    font-size: 0.8rem;
  }
  
  .lang-select {
    font-size: 0.74rem;
    max-width: 76px;
    padding: 0.1rem;
  }
  
  .btn-pricing {
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    font-weight: 700;
  }

  /* Sub Row: Plan Badge, Credits, Quick Links */
  .header-sub-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
  }

  .user-status-badges {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
  }

  .plan-badge-free, .plan-badge-basic, .plan-badge-pro {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
  }
  
  .credit-badge {
    font-size: 0.7rem;
    padding: 0.18rem 0.45rem;
    border-radius: 12px;
    gap: 0.2rem;
    white-space: nowrap;
  }
  
  .user-quick-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
  }

  .btn-secondary-nav {
    font-size: 0.68rem;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    white-space: nowrap;
  }

  /* Main Container */
  main {
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
    margin: 0.65rem auto 2rem;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  /* Hero Banner */
  .hero-banner {
    margin-bottom: 0.9rem;
    padding: 0 4px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .hero-title {
    font-size: clamp(1.2rem, 4.8vw, 1.45rem);
    line-height: 1.35;
    margin-bottom: 0.35rem;
    word-break: keep-all;
    overflow-wrap: break-word;
  }
  
  .hero-subtitle {
    font-size: clamp(0.75rem, 3.2vw, 0.82rem);
    line-height: 1.45;
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  /* Tabs */
  .tabs-container {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0.9rem;
    padding: 0.25rem;
    gap: 0.25rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    box-sizing: border-box;
  }
  
  .tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.15rem;
    font-size: 0.72rem;
    gap: 0.15rem;
    border-radius: 8px;
    min-width: 0;
    text-align: center;
    white-space: normal;
    word-break: keep-all;
    line-height: 1.2;
  }
  
  .tab-btn span:first-child {
    font-size: 1rem;
    margin-bottom: 0.1rem;
  }

  /* Panels & Controls */
  .studio-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .studio-grid > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
  }
  
  .glass-panel {
    padding: 1.1rem 0.85rem;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
  }
  
  .panel-header {
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
  }
  
  .panel-title {
    font-size: 0.95rem;
    gap: 0.35rem;
  }
  
  .form-group {
    margin-bottom: 0.95rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .form-label {
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
  }
  
  /* Inputs: 16px font-size prevents iOS automatic zoom */
  textarea.form-control, input.form-control {
    font-size: 15px;
    padding: 0.65rem 0.75rem;
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
    box-sizing: border-box;
  }
  
  /* Presets wrap */
  .presets-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .preset-chip {
    padding: 0.32rem 0.6rem;
    font-size: 0.74rem;
    border-radius: 14px;
    white-space: normal;
    word-break: keep-all;
    line-height: 1.2;
    box-sizing: border-box;
  }

  /* Speed Chips in Responsive Grid */
  .speed-presets-grid,
  .presets-wrap:has(.speed-chip) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    width: 100%;
    box-sizing: border-box;
  }

  .speed-chip {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 0.45rem 0.2rem;
    font-size: 0.72rem;
    white-space: nowrap;
    border-radius: 10px;
    box-sizing: border-box;
  }

  /* Speaker Cards Grid: 2 Clean Balanced Columns */
  .speaker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .speaker-card {
    padding: 0.65rem 0.4rem;
    border-radius: var(--radius-sm);
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }
  
  .speaker-avatar {
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
    margin: 0 auto 0.3rem auto;
    background: linear-gradient(135deg, #ede9fe 0%, #fce7f3 100%);
    border: 1.5px solid rgba(147, 51, 234, 0.3);
    box-shadow: 0 2px 5px rgba(147, 51, 234, 0.15);
  }
  
  .speaker-name {
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .speaker-tag {
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Custom File Upload Box */
  .custom-file-box {
    padding: 0.4rem 0.55rem;
    min-height: 42px;
    width: 100%;
    box-sizing: border-box;
  }

  .custom-file-btn {
    padding: 0.3rem 0.55rem;
    font-size: 0.74rem;
  }

  .custom-file-name {
    font-size: 0.76rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Action Buttons */
  .btn-generate {
    font-size: 0.92rem;
    padding: 0.85rem 0.75rem;
    min-height: 48px;
    width: 100%;
    border-radius: 12px;
    box-sizing: border-box;
    text-align: center;
    word-break: keep-all;
    line-height: 1.3;
  }
  
  .btn-generate-bundle {
    font-size: 0.82rem;
    padding: 0.75rem 0.65rem;
    min-height: 44px;
    width: 100%;
    border-radius: 12px;
    box-sizing: border-box;
    text-align: center;
    word-break: keep-all;
    line-height: 1.3;
  }

  /* Output Player & Multilingual Track Bar */
  .output-player-box {
    padding: 0.85rem 0.65rem;
    border-radius: var(--radius-md);
    width: 100%;
    box-sizing: border-box;
  }
  
  .waveform-canvas {
    height: 48px;
    margin-bottom: 0.6rem;
    width: 100%;
  }
  
  .audio-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .btn-play-pause {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
    flex-shrink: 0;
  }
  
  .audio-progress-bar {
    flex: 1;
    min-width: 0;
    order: unset;
    margin-top: 0;
  }

  .audio-time {
    font-size: 0.72rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .multilingual-track-bar {
    padding: 0.5rem;
    width: 100%;
    box-sizing: border-box;
  }

  .multilingual-track-header {
    font-size: 0.82rem;
    font-weight: 600;
    color: #a5b4fc;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.25rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .track-tabs {
    gap: 0.3rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.2rem;
  }
  
  .track-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .track-tab-btn {
    font-size: 0.72rem;
    padding: 0.25rem 0.5rem;
    flex-shrink: 0;
    border-radius: 8px;
  }
  
  .active-track-script-box {
    padding: 0.55rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .active-script-text {
    font-size: 0.78rem;
    line-height: 1.45;
  }

  /* Download buttons */
  .output-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
    margin-top: 0.85rem;
    box-sizing: border-box;
  }

  .output-actions-grid .btn-download,
  .output-actions-grid .btn-download-srt,
  .output-actions-grid .btn-download-zip,
  .output-actions-grid #btn-audio-license {
    width: 100% !important;
    font-size: 0.82rem;
    padding: 0.65rem 0.75rem;
    min-height: 42px;
    display: flex !important;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
  }

  /* History list on mobile */
  .history-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    padding: 0.65rem;
  }
  
  .history-actions {
    display: flex;
    gap: 0.3rem;
    width: 100%;
    box-sizing: border-box;
  }

  .history-actions .btn-pricing {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 0.35rem 0.3rem;
    font-size: 0.72rem;
    box-sizing: border-box;
  }

  /* Modals */
  .modal-card {
    width: calc(100vw - 20px) !important;
    max-width: 95vw !important;
    padding: 1.15rem 0.75rem !important;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: var(--radius-md);
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
  }
  
  .modal-close {
    top: 0.55rem;
    right: 0.55rem;
    width: 30px;
    height: 30px;
    font-size: 0.95rem;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin-top: 0.8rem;
    width: 100%;
  }
  
  .price-card {
    padding: 1.1rem 0.85rem;
  }

  .currency-toggle-wrap {
    max-width: 100%;
    margin-bottom: 0.8rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .currency-toggle-btn {
    padding: 0.4rem 0.45rem;
    font-size: 0.74rem;
  }

  .license-card {
    padding: 0.55rem !important;
  }
  
  .license-frame {
    padding: 0.85rem 0.55rem !important;
  }
  
  .license-seal {
    position: static;
    display: inline-block;
    margin-bottom: 0.55rem;
    font-size: 0.65rem;
  }
  
  .license-heading {
    font-size: 1rem;
  }
  
  .license-sub {
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .license-body p {
    font-size: 0.78rem;
    margin-bottom: 0.75rem;
  }
  
  .license-info-table {
    padding: 0.55rem;
  }
  
  .license-info-row {
    font-size: 0.72rem;
  }
  
  .history-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
  
  .billing-table {
    min-width: 420px;
    font-size: 0.74rem;
  }
  
  .billing-table th, .billing-table td {
    padding: 0.5rem 0.55rem;
  }
}

/* Extra Small Smartphones (<= 380px) */
@media (max-width: 380px) {
  .brand-text {
    font-size: 0.98rem;
  }

  .btn-pricing {
    font-size: 0.68rem;
    padding: 0.25rem 0.45rem;
  }

  .lang-select {
    max-width: 65px;
    font-size: 0.65rem;
  }

  .tab-btn {
    font-size: 0.66rem;
    padding: 0.4rem 0.1rem;
  }

  .speaker-name {
    font-size: 0.72rem;
  }

  .speaker-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }

  .speed-chip {
    font-size: 0.65rem;
    padding: 0.35rem 0.1rem;
  }
  
  .btn-generate {
    font-size: 0.85rem;
  }
  
  .btn-generate-bundle {
    font-size: 0.75rem;
  }
}
