/* =========================
   DESIGN TOKENS
========================= */
:root {
  --bg: #121829;
  --surface: #1b2135;
  --muted: #949daf;
  --text: #ffffff;
  --special: #d1bdff;
  --primary: #a78bfa;
  --radius: 16px;
  --shadow-soft: 0 12px 30px rgba(22, 25, 45, 0.55);
  --hairline: rgba(255, 255, 255, 0.06);
}

/* =========================
   CUSTOM FONT
========================= */
@font-face {
  font-family: "customfont";
  src: url("src/fonts/Space_Grotesk/SpaceGrotesk-VariableFont_wght.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* =========================
   BASE RESET
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";

  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

img {
  max-width: 100%;
  display: block;
}

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

.container {
  width: min(1100px, 98vw);
  margin-inline: auto;
}

/* =========================
   HEADER / NAVBAR
========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;

  background:
    linear-gradient(
      to bottom,
      rgba(18, 24, 41, 0.85),
      rgba(18, 24, 41, 0.65)
    );

  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);

  border-bottom: 1px solid var(--hairline);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  color: var(--text);
  font-weight: 700;
  letter-spacing: .2px;
}

.logo {
  display: inline-flex;
}

.brand-name {
  font-family: customfont;
  font-size: 18px;
}

.nav-links {
  display: flex;
  gap: 18px;

  list-style: none;
  margin: 0;
  padding: 0;

  border-block-color: #949dbf;
}

.nav-link {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
  transition: 0.25s ease;
}

.nav-link:hover {
  transform: scale(1.1);
  color: var(--special);
  text-shadow:
    0 0 8px #b39dfb,
    0 0 16px #b39dfb;
}

.nav-link.active {
  color: var(--special);
}

/* =========================
   HERO
========================= */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;

  padding-top: 0;
}

.hero-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 28px;
  width: 100%;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  max-width: 650px;
}

.headline {
  font-family: customfont;
  font-size: clamp(28px, 6vw, 56px);

  line-height: 1.05;
  letter-spacing: -0.02em;
  text-align: center;

  margin-bottom: 15px;
}

.subtext {
  color: var(--muted);
  max-width: 560px;
  margin: 0 0 30px;
  text-align: center;
}

/* =========================
   MODE TOGGLE
========================= */
.mode-toggle {
  display: flex;
  justify-content: center;

  height: 60px;
  width: 700px;

  margin: auto;
  padding: 4px;

  background: #242b45;
  border-radius: 10px;
}

.mode-toggle input[type="radio"] {
  display: none;
}

.mode-toggle label {
  display: flex;
  align-items: center;
  gap: 8px;

  margin: 1px;
  padding: 10px 134px;

  background: transparent;
  color: var(--muted);

  border-radius: 8px;
  cursor: pointer;

  font-weight: 500;
  transition: all 0.25s ease;
}

.mode-toggle label:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.mode-toggle input[type="radio"]:checked + label {
  background: #121829;
  color: #ffffff;

  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.mode-toggle label img {
  opacity: 0.7;
  transition: opacity 0.25s ease;
}

.mode-toggle input[type="radio"]:checked + label img {
  opacity: 1;
}

/* =========================
   COVER SELECTOR
========================= */
.cover-title {
  text-align: center;
  font-weight: 600;
  margin-bottom: 10px;
  opacity: 0.8;
}

.cover-selector {
  display: flex;
  justify-content: center;
  gap: 20px;

  margin: 20px 0;
}

.cover-btn {
  padding: 12px 25px;

  border-radius: 12px;
  border: 2px solid #444;

  background: #111;
  color: white;

  cursor: pointer;
  font-size: 15px;

  transition: 0.3s;
}

.cover-btn:hover {
  border-color: #00c6ff;
}

.cover-btn.active {
  background: linear-gradient(45deg, #00c6ff, #0072ff);
  border: none;
}

/* =========================
   WORKSPACES
========================= */
.workspace {
  display: none;

  margin: 30px auto;
  width: min(600px, 90%);

  background: var(--surface);

  padding: 30px;

  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.workspace.active {
  display: block;
}

/* =========================
   UPLOAD AREA
========================= */
.upload-label,
.message-label {
  font-weight: 600;
}

.upload-label {
  margin-bottom: 10px;
}

.message-label {
  display: block;
  margin-top: 80px;
  margin-bottom: 10px;
}

.upload-area {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  width: 100%;
  max-width: 570px;
  aspect-ratio: 2 / 1;

  margin: 0 auto;
  padding: 40px;

  text-align: center;

  border:
    2px dashed rgba(255, 255, 255, 0.15);

  border-radius: 16px;

  background:
    rgba(255, 255, 255, 0.04);

  transition: all 0.25s ease;
  cursor: pointer;
}

.upload-area:hover {
  border-color: var(--primary);

  box-shadow:
    0 0 12px rgba(167, 139, 250, 0.4);

  background:
    rgba(255, 255, 255, 0.07);
}

.upload-area.dragover {
  border-color: var(--primary);

  background:
    rgba(167, 139, 250, 0.15);

  box-shadow:
    0 0 20px rgba(167, 139, 250, 0.5);
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.upload-image {
  width: 40px;
  height: 40px;

  margin-bottom: 8px;
  opacity: 0.85;
}

.upload-area p {
  color: var(--muted);
  margin: 0;
}

.plite {
  color: var(--muted);
  font-size: small;
  font-weight: 300;
}

.upload-area .browse {
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
}

/* =========================
   PREVIEWS
========================= */
.preview-img {
  display: none;

  margin-top: 20px;
  max-width: 100%;

  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.preview-audio,
.preview-video {
  width: 100%;
  margin-top: 10px;
}

/* =========================
   PASSWORD
========================= */
.password-group {
  margin: 12px 0;
  font-weight: 600;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  width: 100%;

  padding: 8px 36px 8px 8px;

  border-radius: 4px;
  border: 1px solid #ccc;
}

.toggle-password {
  position: absolute;
  right: 10px;

  cursor: pointer;
  user-select: none;

  font-size: 16px;
}

.password-note {
  color: #e53935;
  font-size: 12px;
}

/* =========================
   MESSAGE BOX
========================= */
.message-box {
  width: 100%;
  height: 120px;

  margin-bottom: 20px;
  padding: 10px;

  resize: none;

  border:
    1px solid rgba(255, 255, 255, 0.1);

  border-radius: 8px;

  background:
    rgba(255, 255, 255, 0.04);

  color: #fff;
}

/* =========================
   ACTION BUTTONS
========================= */
.action-btn,
.action-btn2 {
  width: 100%;

  padding: 14px;

  border: none;
  border-radius: 8px;

  background: var(--primary);
  color: #121829;

  font-size: 16px;
  font-weight: 600;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    box-shadow 0.3s ease;
}

.action-btn2 {
  margin-top: 25px;
}

.action-btn:hover,
.action-btn2:hover {
  transform: translateY(-2px);

  box-shadow:
    0 6px 20px rgba(167, 139, 250, 0.4);
}

/* =========================
   RESULT CARD
========================= */
.result-card {
  margin-top: 35px;
  padding: 30px;

  text-align: center;

  background:
    linear-gradient(145deg, #161d31, #1e2740);

  border:
    1px solid rgba(255,255,255,0.06);

  border-radius: 20px;

  box-shadow:
    0 8px 24px rgba(0,0,0,0.25);
}

.result-card h3 {
  color: #4ade80;
  font-size: 1.3rem;

  margin-bottom: 20px;
}

.result-info {
  margin-bottom: 25px;
}

.result-info p {
  color: #cbd5e1;
  font-size: 1rem;

  margin: 8px 0;
}

.download-btn {
  display: inline-block;

  padding: 14px 28px;

  background: #2563eb;
  color: white;

  border-radius: 12px;

  text-decoration: none;
  font-weight: 600;

  transition: 0.3s ease;
}

.download-btn:hover {
  background: #3b82f6;

  transform: translateY(-2px);

  box-shadow:
    0 8px 20px rgba(37,99,235,0.35);
}

/* =========================
   RESULT MESSAGES
========================= */
.result-msg {
  margin-top: 12px;
  font-size: 14px;
}

.result-msg.success {
  color: #2e7d32;
  font-weight: bold;
}

.result-msg.error {
  color: #e53935;
  font-weight: bold;
}

/* =========================
   COPY BUTTON
========================= */
.copy-btn {
  margin-left: 8px;
  padding: 0;

  background: transparent;
  border: none;

  cursor: pointer;
}

.copy-icon {
  width: 18px;
  height: 18px;

  opacity: 0.8;
  transition: 0.2s;
}

.copy-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* =========================
   METRICS SECTION
========================= */
.metrics-section {
  display: none;

  width: min(900px, 92%);
  margin: 35px auto 0;
  padding: 28px;

  background: var(--surface);

  border:
    1px solid rgba(255,255,255,0.05);

  border-radius: var(--radius);

  box-shadow: var(--shadow-soft);
}

.metrics-title {
  text-align: center;

  margin-bottom: 25px;

  color: var(--special);

  font-family: customfont;
  font-size: 24px;
}

.metrics-cards {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(180px, 1fr));

  gap: 18px;

  margin-bottom: 28px;
}

.metric-card {
  padding: 18px;

  text-align: center;

  background:
    rgba(255,255,255,0.04);

  border:
    1px solid rgba(255,255,255,0.06);

  border-radius: 14px;

  transition: 0.25s ease;
}

.metric-card:hover {
  transform: translateY(-4px);

  box-shadow:
    0 10px 25px rgba(167,139,250,0.18);
}

.metric-card h4 {
  margin: 0;

  color: var(--muted);

  font-size: 15px;
  font-weight: 500;
}

.metric-card p {
  margin-top: 10px;

  color: var(--primary);

  font-size: 24px;
  font-weight: 700;
}

.chart-wrapper {
  padding: 20px;

  background:
    rgba(255,255,255,0.03);

  border-radius: 14px;
}

.heatmap-container {
  margin-top: 30px;
  text-align: center;
}

.heatmap-image {
  width: 100%;
  max-width: 850px;

  border-radius: 14px;

  border:
    1px solid rgba(255,255,255,0.06);

  box-shadow: var(--shadow-soft);
}

/* =========================
   FOOTER
========================= */
.site-footer {
  padding: 100px 0 8px;
  color: var(--muted);
}

.footer-inner {
  display: grid;
  gap: 0;

  padding-top: 10px;
  padding-bottom: 5px;

  text-align: center;
  font-size: 13px;
}