:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-subtle: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #0f172a;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent: #0f172a;
  --accent-hover: #1e293b;
  --accent-fg: #ffffff;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --success-border: #a7f3d0;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
  --danger-border: #fecaca;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 10px 30px -10px rgba(15, 23, 42, 0.07);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #090d16;
    --surface: #111827;
    --surface-subtle: #1e293b;
    --border: #1f2937;
    --border-focus: #e2e8f0;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #f8fafc;
    --accent-hover: #e2e8f0;
    --accent-fg: #090d16;
    --success-bg: rgba(16, 185, 129, 0.12);
    --success-text: #34d399;
    --success-border: rgba(16, 185, 129, 0.25);
    --danger-bg: rgba(239, 68, 68, 0.12);
    --danger-text: #f87171;
    --danger-border: rgba(239, 68, 68, 0.25);
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem 1.25rem;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 620px;
  margin: auto;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.privacy-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
}

.title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.4rem;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Main Card & Drop Zone */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.drop-zone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  background: var(--bg);
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.drag-active {
  border-color: var(--border-focus);
  background: var(--surface-subtle);
  outline: none;
}

.drop-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 0.75rem;
  color: var(--text-secondary);
}

.drop-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.drop-hint {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.link-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--text-primary);
}

/* Error Banner */
.error-banner {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
  font-size: 0.875rem;
}

/* Result Panel */
.result-panel {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.file-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.file-meta {
  min-width: 0;
}

.file-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.file-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.file-size-summary {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.status-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Collapsible Metadata Inspection */
.details-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}

.details-summary {
  padding: 0.65rem 0.85rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.details-summary:hover {
  color: var(--text-primary);
}

.tag-list {
  list-style: none;
  border-top: 1px solid var(--border);
  max-height: 190px;
  overflow-y: auto;
  padding: 0.35rem 0.85rem;
}

.tag-row {
  display: grid;
  grid-template-columns: 76px 1fr 1.2fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border);
}

.tag-row:last-child {
  border-bottom: none;
}

.tag-row-empty {
  display: block;
  color: var(--text-muted);
  padding: 0.5rem 0;
}

.tag-category {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  text-align: center;
}

.tag-cat-gps {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.tag-cat-serial,
.tag-cat-author {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
}

.tag-key {
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-val {
  color: var(--text-secondary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.74rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

/* Action Bar */
.actions {
  display: flex;
  gap: 0.65rem;
}

.btn-primary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: var(--accent-fg);
  cursor: pointer;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
}

.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* Footer */
.footer {
  text-align: center;
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 2rem;
}


/* Top Navigation Bar */
.top-bar {
  width: 100%;
  max-width: 620px;
  margin: 0 auto 1.5rem;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-link:hover {
  opacity: 0.85;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.nav-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: var(--surface-subtle);
}

/* About Page Styles */
.about-container {
  max-width: 620px;
}

.about-card {
  padding: 1.75rem;
}

.about-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.creator-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.25rem;
}

.creator-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.creator-role {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
}

.about-text {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.about-text code,
.method-desc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82em;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: var(--surface-subtle);
  color: var(--text-primary);
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.method-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.method-item {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
}

.method-heading {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.method-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.about-cta {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-start;
}

.about-cta-btn {
  text-decoration: none;
  flex: 0 1 auto;
}


/* Top Bar Nav Group */
.top-bar-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Contact Page & Support Form Styles */
.contact-container {
  max-width: 620px;
}

.contact-card {
  padding: 1.75rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 520px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.775rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

.form-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}

.status-banner {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
}

.status-banner-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
}

.status-banner-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
}

.bot-support-box {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
}


/* Version & Last Updated Metadata on About Page */
.creator-header {
  justify-content: space-between;
  flex-wrap: wrap;
}

.creator-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.version-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}

@media (max-width: 520px) {
  .version-meta {
    align-items: flex-start;
    width: 100%;
    margin-top: 0.25rem;
  }
}

.version-pill {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.version-pill strong {
  color: var(--text-primary);
  font-weight: 700;
}

.version-date {
  font-size: 0.725rem;
  color: var(--text-muted);
}


/* Top-Left Brand Logo */
.brand-logo {
  width: 56px;
  height: 56px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.12));
}
