:root {
  --primary: #7EC8A7;
  --primary-dark: #5CAD8B;
  --bg: #FEFAF6;
  --surface: #FFFFFF;
  --accent: #E88D7D;
  --text: #1F2937;
  --muted: #6B7280;
  --border: #E5E7EB;
  --success: #10B981;
  --warning: #FBBF24;
  --error: #F87171;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.main {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  background: var(--surface);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-bottom: 0;
}

.tab-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.tab-btn.active {
  color: var(--primary);
  background: var(--surface);
  border-bottom: 2px solid var(--primary);
}

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

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
  padding: 2rem;
  display: none;
}

.panel.active { display: block; }

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: var(--bg);
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: #F0FAF5;
}

.drop-zone .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.drop-zone h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.drop-zone p {
  color: var(--muted);
  font-size: 0.9rem;
}

.file-input { display: none; }

.url-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

.url-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(126,200,167,0.15);
}

.custom-name-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

.custom-name-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(126,200,167,0.15);
}

.expiry-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.expiry-row label {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.expiry-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}

.expiry-select:focus {
  outline: none;
  border-color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--error);
}

.btn-small {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 1rem;
}

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

.progress-text {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
  text-align: center;
}

.file-list-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--muted);
}

.file-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  transition: all 0.2s;
}

.file-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.file-card .mime-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-card .info {
  flex: 1;
  min-width: 0;
}

.file-card .info .name {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-card .info .meta {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  gap: 0.75rem;
  margin-top: 0.15rem;
}

.file-card .countdown {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  white-space: nowrap;
}

.file-card .actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.file-card .copy-btn {
  background: #ECFDF5;
  color: var(--primary);
  border: 1px solid #A7F3D0;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s;
}

.file-card .copy-btn:hover {
  background: #D1FAE5;
}

.file-card .delete-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 0.35rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.file-card .delete-btn:hover {
  color: var(--error);
  background: #FEE2E2;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.empty-state p {
  font-size: 0.95rem;
}

.footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

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

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

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

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

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 1000;
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.file-selected {
  background: #F0FAF5;
  border: 2px solid var(--primary);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.file-selected .name { font-size: 0.9rem; font-weight: 500; }
.file-selected .size { font-size: 0.8rem; color: var(--muted); }

@media (max-width: 640px) {
  .header { padding: 1rem; }
  .main { margin: 1rem auto; }
  .stats-bar { gap: 0.75rem; font-size: 0.7rem; }
  .panel { padding: 1.25rem; }
  .drop-zone { padding: 2rem 1rem; }
  .file-card { flex-wrap: wrap; }
  .file-card .actions { width: 100%; justify-content: flex-end; margin-top: 0.5rem; }
}

.success-card {
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
  animation: fadeInUp 0.3s ease;
}

.success-preview { margin-bottom: 1rem; }

.success-preview img,
.success-preview video {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
}

.success-preview audio { width: 100%; margin: 0.5rem 0; }

.success-preview .file-icon { font-size: 4rem; line-height: 1; }

.success-info { margin-bottom: 1.25rem; }

.success-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  word-break: break-all;
}

.success-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.success-url {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.success-url input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg);
  color: var(--text);
}

.success-url input:focus {
  outline: none;
  border-color: var(--primary);
}

.success-delete {
  margin-top: 0.25rem;
}
