
/* =====================================
   AUDIO2TEXT - MAIN STYLESHEET
   Default Theme: Light
===================================== */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f4fa;
  --text: #172033;
  --muted: #68758a;
  --border: #e1e7f0;
  --primary: #2878e5;
  --primary-hover: #1764ca;
  --success: #16845b;
  --shadow: 0 8px 30px rgba(30, 50, 80, 0.07);
  --radius: 16px;
}

[data-theme="dark"] {
  --bg: #101827;
  --surface: #182335;
  --surface-2: #202e43;
  --text: #f0f4fb;
  --muted: #a4b1c5;
  --border: #304158;
  --primary: #4b94f4;
  --primary-hover: #70aaff;
  --success: #36b987;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

/* RESET */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  transition: background 0.25s, color 0.25s;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

/* HEADER */

.header {
  width: 100%;
  min-height: 72px;
  padding: 12px 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo,
.footer-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.7px;
}

.logo span,
.footer-logo span {
  color: var(--primary);
}

/* MENU BUTTON */

.menu-btn {
  width: 39px;
  height: 39px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.menu-btn span {
  width: 19px;
  height: 2px;
  border-radius: 5px;
  background: var(--text);
  transition: 0.2s;
}

/* HEADER RIGHT */

.tagline {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.theme-btn {
  width: 39px;
  height: 39px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-size: 23px;
  display: grid;
  place-items: center;
  transition: transform 0.2s;
}

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

/* NAVIGATION */

.navigation {
  position: fixed;
  top: 72px;
  left: 0;
  width: 270px;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 14px 0;
  box-shadow: var(--shadow);
  z-index: 99;
  display: none;
}

.navigation.show {
  display: flex;
  flex-direction: column;
  gap: 5px;
  animation: slideDown 0.2s ease;
}

.navigation a {
  padding: 12px 14px;
  border-radius: 9px;
  color: var(--text);
  font-weight: 600;
}

.navigation a:hover {
  background: var(--surface-2);
  color: var(--primary);
}

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

/* HERO */

.hero {
  max-width: 850px;
  margin: 55px auto 30px;
  padding: 0 20px;
  text-align: center;
}

.hero-label {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 30px;
  background: rgba(40, 120, 229, 0.10);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 17px;
}

.hero h1 {
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -1.5px;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  max-width: 580px;
  margin: 15px auto 0;
  color: var(--muted);
  font-size: 15px;
}

/* CONVERTER CARD */

.converter-card {
  width: min(92%, 680px);
  margin: 30px auto 65px;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.section-heading {
  font-size: 21px;
  text-align: center;
}

.section-description {
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  margin: 5px 0 23px;
}

/* SOURCE OPTIONS */

.source-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 25px;
}

.source-option {
  padding: 17px 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  transition: 0.2s;
}

.source-icon {
  font-size: 27px;
}

.source-option.active {
  background: rgba(40, 120, 229, 0.10);
  border: 2px solid var(--primary);
  color: var(--primary);
}

.source-option:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* INPUT SECTIONS */

.input-section {
  margin-bottom: 23px;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 750;
  margin-bottom: 10px;
}

/* UPLOAD AREA */

.upload-area {
  min-height: 190px;
  padding: 25px 15px;
  border: 2px dashed var(--border);
  border-radius: 15px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
}

.upload-area:hover,
.upload-area.drag-active {
  border-color: var(--primary);
  background: rgba(40, 120, 229, 0.07);
}

.upload-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(40, 120, 229, 0.12);
  color: var(--primary);
  font-size: 30px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}

.upload-area h3 {
  font-size: 16px;
}

.upload-area p {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0;
}

.upload-area small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 8px;
}

.upload-area input {
  display: none;
}

.selected-file {
  margin-top: 10px;
  color: var(--primary);
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* YOUTUBE INPUT */

.text-input,
.language-select {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  transition: border 0.2s;
}

.text-input:focus,
.language-select:focus {
  border-color: var(--primary);
}

.text-input::placeholder {
  color: var(--muted);
}

.input-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}

/* LANGUAGE */

.language-section {
  margin-bottom: 24px;
}

.language-select {
  cursor: pointer;
}

/* GENERATE BUTTON */

.generate-btn {
  width: 100%;
  min-height: 53px;
  padding: 13px;
  border: none;
  border-radius: 11px;
  background: var(--primary);
  color: white;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: 0.2s;
}

.generate-btn:hover {
  background: var(--primary-hover);
}

.generate-btn:active {
  transform: scale(0.98);
}

.generate-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* PROGRESS */

.progress-section {
  margin-top: 20px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 20px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 20px;
  background: var(--primary);
  transition: width 0.3s ease;
}

/* STATUS */

.status-message {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.status-message.error {
  color: #dc4545;
}

.status-message.success {
  color: var(--success);
}

/* RESULT BOX */

.result-section {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 16px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.result-header h2 {
  font-size: 19px;
}

.result-language {
  color: var(--muted);
  font-size: 11px;
}

.result-badge {
  color: var(--success);
  background: rgba(22, 132, 91, 0.10);
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 750;
}

.transcript-text {
  width: 100%;
  min-height: 220px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  resize: vertical;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  line-height: 1.8;
}

.transcript-text:focus {
  border-color: var(--primary);
}

/* COPY AND DOWNLOAD */

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 13px;
}

.copy-btn,
.download-btn {
  min-height: 48px;
  padding: 11px;
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-weight: 750;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: 0.2s;
}

.copy-btn {
  background: #2878e5;
}

.download-btn {
  background: #16845b;
}

.copy-btn:hover,
.download-btn:hover {
  filter: brightness(1.08);
}

.copy-btn:active,
.download-btn:active {
  transform: scale(0.97);
}

/* HOW IT WORKS */

.how-it-works {
  width: min(92%, 950px);
  margin: 65px auto;
  text-align: center;
}

.how-it-works > h2,
.content-section > h2 {
  font-size: 25px;
  margin-bottom: 10px;
}

.how-it-works > p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 25px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.step-card {
  padding: 21px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: left;
}

.step-number {
  display: inline-block;
  color: var(--primary);
  font-size: 22px;
  font-weight: 850;
  margin-bottom: 10px;
}

.step-card h3 {
  font-size: 15px;
  margin-bottom: 7px;
}

.step-card p {
  color: var(--muted);
  font-size: 12px;
}

/* CONTENT SECTIONS */

.content-section {
  width: min(90%, 850px);
  margin: 60px auto;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 17px;
  scroll-margin-top: 95px;
}

.content-section > p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 12px;
}

/* FAQ */

details {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

details:last-child {
  border-bottom: none;
}

summary {
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

details p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

/* CONTACT */

.contact-link {
  display: inline-block;
  margin-top: 17px;
  padding: 11px 18px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}

/* FOOTER */

.footer {
  margin-top: 70px;
  padding: 35px 20px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-logo {
  display: inline-block;
}

.footer > p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.footer-links {
  max-width: 650px;
  margin: 22px auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 13px 22px;
}

.footer-links a {
  color: var(--muted);
  font-size: 12px;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer .copyright {
  padding-top: 17px;
  border-top: 1px solid var(--border);
}

/* RESPONSIVE TABLETS */

@media (max-width: 700px) {

  .header {
    padding: 11px 4%;
  }

  .tagline {
    font-size: 11px;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

/* RESPONSIVE MOBILE */

@media (max-width: 480px) {

  .header {
    min-height: 65px;
  }

  .logo {
    font-size: 19px;
  }

  .header-left,
  .header-right {
    gap: 9px;
  }

  .tagline {
    font-size: 10px;
  }

  .theme-btn,
  .menu-btn {
    width: 35px;
    height: 35px;
  }

  .navigation {
    top: 65px;
    width: 245px;
  }

  .hero {
    margin-top: 38px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 13px;
  }

  .converter-card {
    width: 94%;
    padding: 19px 15px;
    border-radius: 17px;
  }

  .section-heading {
    font-size: 19px;
  }

  .upload-area {
    min-height: 170px;
  }

  .result-section {
    padding: 14px;
  }

  .result-header h2 {
    font-size: 16px;
  }

  .transcript-text {
    min-height: 190px;
    font-size: 13px;
  }

  .copy-btn,
  .download-btn {
    font-size: 12px;
    padding: 10px 5px;
  }

  .steps-grid {
    gap: 10px;
  }

  .step-card {
    padding: 15px 11px;
  }

  .step-card h3 {
    font-size: 13px;
  }

  .step-card p {
    font-size: 11px;
  }

  .content-section {
    padding: 19px 15px;
  }

}
