/* gooi.io — Playful, privacy-first file transfer */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ================================
   Design Tokens
   ================================ */

:root {
  /* Backgrounds */
  --bg: #0f0f1a;
  --surface: #1c1c2e;
  --surface-hover: #252540;
  --border: #2e2e4a;

  /* Text */
  --text: #e2e8f0;
  --text-muted: #94a3b8;

  /* Brand */
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --secondary: #22d3ee;
  --secondary-glow: rgba(34, 211, 238, 0.1);
  --success: #f59e0b;
  --success-glow: rgba(245, 158, 11, 0.15);
  --error: #f87171;
  --error-glow: rgba(248, 113, 113, 0.1);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-progress: linear-gradient(90deg, #6366f1, #a78bfa, #22d3ee);
  --gradient-bg: radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.08), transparent 50%),
                 radial-gradient(ellipse at 80% 100%, rgba(34, 211, 238, 0.05), transparent 50%);

  /* Sizing */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --container-max: 680px;
}

/* ================================
   Reset & Base
   ================================ */

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

html, body {
  height: 100%;
}

body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  background-image: var(--gradient-bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* ================================
   Layout
   ================================ */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ================================
   Header & Logo
   ================================ */

.header {
  text-align: center;
  margin-bottom: 3rem;
}

.logo {
  margin-bottom: 0.5rem;
  display: inline-block;
}

.logo-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.logo-img {
  width: 220px;
  height: auto;
  display: block;
}

.tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 400;
  max-width: 400px;
  margin: 0 auto;
}

.tagline-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 0.35rem;
}

/* Language toggle */
.lang-toggle {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  gap: 0.25rem;
  background: var(--surface);
  border-radius: var(--radius-xs);
  padding: 0.15rem;
  border: 1px solid var(--border);
}

.lang-btn {
  padding: 0.25rem 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.lang-btn.active {
  background: var(--accent);
  color: white;
}

.lang-btn:hover:not(.active) {
  color: var(--text);
}

/* ================================
   Privacy Badge
   ================================ */

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: var(--accent-glow);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--accent-hover);
  margin-bottom: 2rem;
}

.privacy-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ================================
   Drop Zone
   ================================ */

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 3.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--surface);
  position: relative;
  overflow: hidden;
  animation: breathe 4s ease-in-out infinite;
}

/* Cursor-following glow effect */
.drop-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    400px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    var(--accent-glow),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.drop-zone:hover::before {
  opacity: 1;
}

@keyframes breathe {
  0%, 100% {
    border-color: var(--border);
    box-shadow: 0 0 0 0 transparent;
  }
  50% {
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 0 40px -10px var(--accent-glow);
  }
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.05);
  transform: scale(1.01);
  animation: none;
  box-shadow: 0 0 60px -15px var(--accent-glow),
              inset 0 0 60px -30px var(--accent-glow);
}

.drop-zone.dragover {
  border-style: solid;
}

.drop-zone-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.drop-zone-icon svg {
  width: 56px;
  height: 56px;
  color: var(--accent);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.drop-zone:hover .drop-zone-icon svg,
.drop-zone.dragover .drop-zone-icon svg {
  opacity: 1;
  transform: translateY(-4px);
  color: var(--accent-hover);
}

.drop-zone-text {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--text);
}

.drop-zone-hint {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 1rem;
}

/* ================================
   Buttons
   ================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 20px -4px rgba(99, 102, 241, 0.4);
  font-size: 1.05rem;
  padding: 0.9rem 2.25rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px -4px rgba(99, 102, 241, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px -2px rgba(99, 102, 241, 0.3);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent-hover);
}

.btn-full {
  width: 100%;
}

/* ================================
   Trust Bar
   ================================ */

.trust-bar {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.trust-item svg {
  width: 13px;
  height: 13px;
  opacity: 0.6;
}

/* ================================
   Progress
   ================================ */

.progress-container {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.5rem;
  border: 1px solid var(--border);
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin: 1.25rem 0;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-progress);
  background-size: 200% 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-status {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.progress-percent {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--accent-hover);
  font-weight: 500;
}

/* ================================
   Result
   ================================ */

.result-container {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  border: 1px solid rgba(245, 158, 11, 0.15);
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.result-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--success-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.result-icon svg {
  width: 32px;
  height: 32px;
  color: var(--success);
}

.result-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.link-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.link-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.link-input:focus {
  border-color: var(--accent);
}

.btn-copy {
  padding: 0.75rem 1.5rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 10px -2px rgba(99, 102, 241, 0.3);
}

.btn-copy:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px -2px rgba(99, 102, 241, 0.4);
}

.btn-copy.copied {
  background: var(--success);
  box-shadow: 0 2px 10px -2px var(--success-glow);
}

.btn-share {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-share:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.qr-container {
  display: inline-block;
  padding: 1rem;
  background: white;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ================================
   Recent Transfers
   ================================ */

.recent-section {
  margin-top: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.recent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.recent-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.recent-clear {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.recent-clear:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.recent-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: var(--bg);
  border: 1px solid rgba(46, 46, 74, 0.7);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.7rem;
}

.recent-main {
  min-width: 0;
  text-align: left;
}

.recent-link {
  display: block;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-meta {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-top: 0.18rem;
}

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

.recent-btn {
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.42rem 0.6rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.recent-btn:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

/* ================================
   Download Page
   ================================ */

.download-info {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  border: 1px solid var(--border);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.download-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-icon svg {
  width: 36px;
  height: 36px;
  color: var(--accent);
}

.file-details {
  margin: 1.5rem 0;
  text-align: left;
}

.file-detail {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(46, 46, 74, 0.5);
  font-size: 0.9rem;
}

.file-detail:last-child {
  border-bottom: none;
}

.file-detail-label {
  color: var(--text-muted);
}

.file-detail-value {
  font-weight: 500;
}

/* ================================
   Error
   ================================ */

.error-container {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  border: 1px solid rgba(248, 113, 113, 0.2);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.error-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--error-glow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-icon svg {
  width: 32px;
  height: 32px;
  color: var(--error);
}

.error-message {
  color: var(--error);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* ================================
   Resume Banner
   ================================ */

.resume-container {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  border: 1px solid rgba(99, 102, 241, 0.2);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.resume-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.resume-icon svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.resume-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.resume-details {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
}

.resume-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* ================================
   Features
   ================================ */

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 3rem;
}

.feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.15rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature:hover {
  border-color: rgba(99, 102, 241, 0.2);
  background: rgba(99, 102, 241, 0.03);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px -8px var(--accent-glow);
}

.feature-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
}

.feature-icon svg {
  width: 18px;
  height: 18px;
  color: var(--accent-hover);
}

.feature-icon.secondary {
  background: var(--secondary-glow);
}

.feature-icon.secondary svg {
  color: var(--secondary);
}

.feature-icon.success {
  background: var(--success-glow);
}

.feature-icon.success svg {
  color: var(--success);
}

.feature-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.feature-text strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ================================
   Footer
   ================================ */

.footer {
  margin-top: auto;
  padding-top: 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

.footer-credits {
  opacity: 0.5;
  font-size: 0.72rem;
  line-height: 1.6;
}

/* ================================
   Confetti
   ================================ */

.confetti-piece {
  position: fixed;
  width: 8px;
  height: 8px;
  pointer-events: none;
  z-index: 1000;
  animation: confetti-fall var(--duration, 1.5s) cubic-bezier(0.25, 0, 0.5, 1) forwards;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--drift-x, 0px), var(--drift-y, 300px)) rotate(var(--rotation, 720deg)) scale(0.3);
  }
}

/* ================================
   Content Pages (Privacy, About)
   ================================ */

.page-content {
  max-width: 600px;
  margin: 0 auto;
}

.page-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.page-content p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.page-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
}

.page-content li {
  color: var(--text-muted);
  font-size: 0.92rem;
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.page-content li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

.page-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.tech-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.tech-detail h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--accent-hover);
}

.tech-detail p {
  font-size: 0.85rem;
}

/* ================================
   404 Page
   ================================ */

.not-found {
  text-align: center;
  padding: 4rem 0;
}

.not-found h2 {
  font-size: 5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.not-found p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* ================================
   Utility
   ================================ */

.hidden {
  display: none !important;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* ================================
   Accessibility
   ================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================================
   Responsive
   ================================ */

@media (max-width: 768px) {
  .lang-toggle {
    position: static;
    justify-content: center;
    margin-bottom: 1rem;
  }

  .header {
    position: relative;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1.5rem 1rem;
  }

  .logo-img {
    width: 180px;
  }

  .drop-zone {
    padding: 2.5rem 1.25rem;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .link-group {
    flex-direction: column;
  }

  .link-group .btn-copy {
    width: 100%;
  }

  .recent-item {
    flex-direction: column;
    align-items: stretch;
  }

  .recent-actions {
    justify-content: flex-start;
  }

  .trust-bar {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .progress-container,
  .result-container,
  .download-info,
  .error-container {
    padding: 1.75rem;
  }

  .btn-primary {
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
  }
}
