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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f0f0f;
  color: #e1e1e1;
  min-height: 100vh;
}

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

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

header h1 {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: #888;
  font-size: 0.875rem;
}

/* Form */
.input-group {
  display: flex;
  gap: 0.5rem;
}

.input-group input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #333;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.input-group input:focus {
  border-color: #5865f2;
}

.input-group button,
button[type="submit"] {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  background: #5865f2;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.input-group button:hover {
  background: #4752c4;
}

.input-group button:disabled {
  background: #333;
  cursor: not-allowed;
}

/* Cards */
.card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 1.25rem;
  margin-top: 1rem;
}

/* Progress */
.progress-section,
.result-section,
.error-section {
  margin-top: 1rem;
}

.hidden {
  display: none !important;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.75rem 0 0.5rem;
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  background: #333;
  color: #aaa;
}

.status-badge.downloading {
  background: #1a3a5c;
  color: #5dadec;
}

.status-badge.uploading {
  background: #3a2a1a;
  color: #e0a040;
}

.status-badge.ready {
  background: #1a3a1a;
  color: #5adc5a;
}

.status-badge.error {
  background: #3a1a1a;
  color: #dc5a5a;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #2a2a2a;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #5865f2;
  border-radius: 3px;
  transition: width 0.3s ease;
}

#progressPercent {
  font-size: 0.875rem;
  color: #888;
  font-variant-numeric: tabular-nums;
}

/* Result */
.result-card {
  border-color: #2a4a2a;
}

.result-card h3 {
  color: #5adc5a;
}

.link-group {
  margin-top: 0.75rem;
}

.link-group label {
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  display: block;
}

.copy-row {
  display: flex;
  gap: 0.5rem;
}

.copy-row input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #333;
  background: #111;
  color: #ccc;
  font-size: 0.8rem;
  font-family: monospace;
}

.copy-btn {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #333;
  background: #2a2a2a;
  color: #ccc;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: #333;
  color: #fff;
}

.copy-btn.copied {
  background: #1a3a1a;
  border-color: #2a4a2a;
  color: #5adc5a;
}

.expires-text {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: #666;
}

/* Error */
.error-card {
  border-color: #3a1a1a;
}

.error-card h3 {
  color: #dc5a5a;
  margin-bottom: 0.5rem;
}

.error-card p {
  color: #aaa;
  font-size: 0.875rem;
}

/* Recent */
.recent-section {
  margin-top: 2rem;
}

.recent-section h2 {
  font-size: 1rem;
  color: #999;
  margin-bottom: 0.75rem;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  gap: 0.75rem;
}

.recent-item-info {
  flex: 1;
  min-width: 0;
}

.recent-item-title {
  font-size: 0.875rem;
  color: #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-item-meta {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.15rem;
}

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

.recent-item-actions .status-badge {
  font-size: 0.65rem;
}

.recent-item-actions a {
  font-size: 0.8rem;
  color: #5865f2;
  text-decoration: none;
}

.recent-item-actions a:hover {
  text-decoration: underline;
}

.empty-state {
  text-align: center;
  color: #555;
  padding: 2rem;
  font-size: 0.875rem;
}

/* Footer */
footer {
  margin-top: 3rem;
}

.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #2a2a2a 20%, #2a2a2a 80%, transparent);
}

.footer-content {
  padding: 1.5rem 0 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.footer-hosted {
  font-size: 0.8rem;
  color: #555;
  letter-spacing: 0.02em;
}

.footer-hosted .heart {
  color: #dc5a5a;
  display: inline-block;
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.15); }
  28% { transform: scale(1); }
  42% { transform: scale(1.1); }
  56% { transform: scale(1); }
}

.footer-hosted .eu-flag {
  font-weight: 700;
  background: linear-gradient(135deg, #003399, #0055cc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: #3a3a3a;
}

.footer-disclaimer strong {
  color: #555;
  font-weight: 600;
}

.footer-links {
  margin-top: 0.25rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #444;
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.footer-links a:hover {
  color: #888;
  background: #1a1a1a;
}

.footer-links a svg {
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-links a:hover svg {
  opacity: 1;
}

/* Mobile */
@media (max-width: 480px) {
  .container {
    padding: 1rem 0.75rem;
  }

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

  .input-group button {
    width: 100%;
  }
}
