/* ==========================================================================
   u24Bolt — Google-Style Ultra-Simple Minimalist Design System
   ========================================================================== */

:root {
  --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

  /* Dark Theme (Default) */
  --bg-color: #000000;
  --surface-card: #0c0c0e;
  --surface-elevated: #141417;
  --border-subtle: #27272a;
  --border-highlight: rgba(255, 255, 255, 0.2);
  
  --text-main: #ffffff;
  --text-muted: #a1a1aa;
  --text-sub: #71717a;

  --omni-bg: #121214;
  --omni-border: #2e2e33;
  --omni-hover-border: #4a4a52;
  --omni-focus-glow: rgba(255, 255, 255, 0.12);

  --btn-bg: #18181b;
  --btn-border: #27272a;
  --btn-text: #e4e4e7;
  --btn-hover-bg: #27272a;
  --btn-hover-text: #ffffff;

  --primary-btn-bg: #ffffff;
  --primary-btn-text: #000000;
  --primary-btn-hover: #e4e4e7;

  --accent-dot: #10b981;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-theme {
  --bg-color: #ffffff;
  --surface-card: #ffffff;
  --surface-elevated: #f8fafc;
  --border-subtle: #e2e8f0;
  --border-highlight: rgba(0, 0, 0, 0.2);
  
  --text-main: #09090b;
  --text-muted: #475569;
  --text-sub: #64748b;

  --omni-bg: #ffffff;
  --omni-border: #dfe1e5;
  --omni-hover-border: #c4c7cc;
  --omni-focus-glow: rgba(0, 0, 0, 0.08);

  --btn-bg: #f8f9fa;
  --btn-border: #dadce0;
  --btn-text: #3c4043;
  --btn-hover-bg: #f1f3f4;
  --btn-hover-text: #202124;

  --primary-btn-bg: #09090b;
  --primary-btn-text: #ffffff;
  --primary-btn-hover: #27272a;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

/* ================= HEADER ================= */
.g-header {
  width: 100%;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.engine-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  user-select: none;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-dot);
  box-shadow: 0 0 8px var(--accent-dot);
}

.status-dot.pulse {
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.g-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.g-select {
  background: var(--surface-card);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: var(--font-body);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.g-select:hover {
  border-color: var(--border-highlight);
  color: var(--text-main);
}

.g-icon-btn {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.g-icon-btn:hover {
  background: var(--btn-hover-bg);
  color: var(--text-main);
  border-color: var(--border-highlight);
}

/* ================= MAIN CONTAINER (GOOGLE STYLE CENTERED) ================= */
.g-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 60px 20px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

/* ================= BRAND LOGO ================= */
.g-brand-box {
  text-align: center;
  margin-bottom: 32px;
  user-select: none;
}

.g-brand-title {
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.brand-u24 {
  color: var(--text-main);
}

.brand-bolt {
  color: var(--text-muted);
  font-weight: 600;
}

.g-brand-sub {
  font-size: 15px;
  color: var(--text-sub);
  letter-spacing: -0.01em;
}

/* ================= OMNI SEARCH & DROP BAR ================= */
.g-omni-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.g-omni-bar {
  width: 100%;
  height: 56px;
  background: var(--omni-bg);
  border: 1px solid var(--omni-border);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  padding: 0 16px 0 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
  position: relative;
}

.g-omni-bar:hover {
  border-color: var(--omni-hover-border);
  box-shadow: 0 4px 16px var(--omni-focus-glow);
}

.g-omni-bar.focused,
.g-omni-bar:focus-within {
  border-color: var(--border-highlight);
  box-shadow: 0 4px 20px var(--omni-focus-glow);
}

.g-omni-bar.drag-over {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.2);
  transform: scale(1.01);
}

.g-omni-icon {
  color: var(--text-sub);
  display: flex;
  align-items: center;
  margin-right: 14px;
  flex-shrink: 0;
}

.g-omni-input {
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-main);
}

.g-omni-input::placeholder {
  color: var(--text-sub);
  font-size: 15px;
}

.g-omni-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.g-omni-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.g-omni-btn:hover {
  background: var(--btn-hover-bg);
  color: var(--text-main);
}

.browse-tooltip {
  position: absolute;
  top: -32px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: var(--transition);
}

.g-browse-btn:hover .browse-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* ================= GOOGLE BUTTONS ROW ================= */
.g-buttons-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.g-btn {
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-text);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.g-btn:hover {
  background: var(--btn-hover-bg);
  color: var(--btn-hover-text);
  border-color: var(--omni-hover-border);
}

.g-btn-primary {
  background: var(--primary-btn-bg);
  color: var(--primary-btn-text);
  border-color: transparent;
  font-weight: 600;
}

.g-btn-primary:hover {
  background: var(--primary-btn-hover);
  color: var(--primary-btn-text);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

/* ================= TAGLINE ================= */
.g-footer-tagline {
  margin-top: 26px;
  font-size: 13px;
  color: var(--text-sub);
  text-align: center;
  letter-spacing: -0.01em;
}

/* ================= CARDS (UPLOAD & DOWNLOAD RESULTS) ================= */
.g-card {
  width: 100%;
  margin-top: 32px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  animation: cardSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

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

.g-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: var(--surface-elevated);
}

.g-card-badge.success {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.g-card-badge.ready {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

.file-size-badge {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
}

.file-info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.file-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.file-meta {
  flex: 1;
  overflow: hidden;
}

.file-name {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.file-details {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ================= LINK BOX & COPY ================= */
.g-link-box {
  display: flex;
  align-items: center;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 6px 8px 6px 14px;
  margin-bottom: 16px;
}

.g-link-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 13px;
}

.g-copy-btn {
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--btn-text);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.g-copy-btn:hover {
  background: var(--btn-hover-bg);
  color: var(--btn-hover-text);
}

/* ================= PROGRESS BAR ================= */
.progress-wrap {
  margin-top: 14px;
}

.progress-bar-bg {
  width: 100%;
  height: 5px;
  background: var(--surface-elevated);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 4px;
  transition: width 0.2s ease;
}

.progress-meta-row {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-sub);
}

/* ================= TELEMETRY ================= */
.g-telemetry-details {
  margin-top: 14px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.g-telemetry-details summary {
  font-size: 12.5px;
  color: var(--text-sub);
  cursor: pointer;
  user-select: none;
  outline: none;
}

.g-telemetry-details summary:hover {
  color: var(--text-muted);
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.tele-item {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
}

.tele-label {
  font-size: 11px;
  color: var(--text-sub);
  margin-bottom: 2px;
}

.tele-value.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================= DOWNLOAD BUTTON ================= */
.download-action-row {
  margin-top: 14px;
}

.g-download-btn {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 15px;
  border-radius: 12px;
}

/* ================= FULLSCREEN DRAG OVERLAY ================= */
.drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.drop-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.drop-overlay-box {
  background: var(--surface-card);
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  padding: 48px;
  text-align: center;
  max-width: 440px;
  transform: scale(0.96);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.drop-overlay.active .drop-overlay-box {
  transform: scale(1);
}

.drop-icon {
  font-size: 42px;
  margin-bottom: 16px;
}

.drop-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.drop-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* ================= TOAST ================= */
.g-toast {
  position: fixed;
  bottom: 28px;
  background: #ffffff;
  color: #000000;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: var(--transition);
  z-index: 200;
}

.g-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 640px) {
  .g-brand-title {
    font-size: 42px;
  }
  .g-buttons-row {
    flex-direction: column;
    width: 100%;
  }
  .g-buttons-row .g-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ================= TOP OPEN BETA BANNER ================= */
.beta-top-banner {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, rgba(59, 130, 246, 0.12) 50%, rgba(139, 92, 246, 0.15) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  width: 100%;
  position: relative;
  z-index: 150;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.beta-top-banner.hidden {
  display: none !important;
}

.beta-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13.5px;
}

.beta-badge-chip {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 3px 10px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.beta-banner-message {
  color: var(--text-main);
  flex: 1;
  text-align: center;
}

.beta-banner-message strong {
  color: #10b981;
}

.beta-timer-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.beta-timer-title {
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 500;
}

.beta-countdown {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
}

.timer-box {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-main);
}

.timer-box strong {
  color: #10b981;
}

.timer-colon {
  color: var(--text-sub);
  font-weight: 700;
  font-size: 12px;
}

.beta-banner-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.beta-banner-close:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

/* ================= TRANSFER SECURITY SUMMARY ================= */
.transfer-security-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.sec-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.sec-icon {
  font-size: 14px;
}

.sec-text {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ================= FOOTER & LEGAL ================= */
.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-card);
  padding: 28px 20px 24px;
  width: 100%;
}

.footer-container {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 12px;
  line-height: 1.6;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--text-main);
}

.footer-legal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
}

.footer-nav-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12.5px;
  font-family: inherit;
  transition: var(--transition);
}

.footer-nav-link:hover {
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-dot {
  color: var(--text-sub);
  opacity: 0.5;
}

/* ================= MODALS ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  width: 100%;
  max-width: 560px;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  color: var(--text-main);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal-backdrop.active .modal-card {
  transform: scale(1);
}

.btn-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-modal-close:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.15);
}

.modal-section-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.modal-section-date {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 18px;
}

.modal-scroll-content {
  overflow-y: auto;
  padding-right: 8px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.modal-scroll-content h4 {
  color: var(--text-main);
  font-size: 14.5px;
  font-weight: 700;
  margin: 16px 0 6px;
}

.modal-scroll-content p {
  margin-bottom: 12px;
}

.btn-modal-action {
  margin-top: 20px;
  width: 100%;
  background: var(--primary-btn-bg);
  color: var(--primary-btn-text);
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

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

/* Contact form in modal */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.contact-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.contact-textarea {
  background: var(--omni-bg);
  border: 1px solid var(--omni-border);
  color: var(--text-main);
  border-radius: 12px;
  padding: 12px;
  font-family: inherit;
  font-size: 13.5px;
  resize: vertical;
  min-height: 90px;
}

.contact-textarea:focus {
  outline: none;
  border-color: var(--omni-hover-border);
}

@media (max-width: 640px) {
  .beta-banner-inner {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  .beta-banner-close {
    position: absolute;
    top: 8px;
    right: 8px;
  }
  .transfer-security-summary {
    grid-template-columns: 1fr;
  }
}
