:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #111726;
  --bg-card: rgba(18, 24, 38, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.25);
  
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --accent-danger: #ff4757;
  --accent-success: #2ed573;
  --accent-warning: #ffa502;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 16px 36px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 25px rgba(0, 242, 254, 0.15);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(at 10% 20%, rgba(79, 172, 254, 0.08) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(0, 242, 254, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Tipografia */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

a:hover {
  text-decoration: underline;
}

/* Barra de Navegação */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #050b14;
  font-weight: 900;
  font-size: 1.25rem;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.brand-title {
  font-size: 1.25rem;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.7rem;
  background: rgba(46, 213, 115, 0.15);
  color: var(--accent-success);
  border: 1px solid rgba(46, 213, 115, 0.3);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  margin-left: 6px;
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Seletor de idioma PT/EN */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  flex: 0 0 auto;
}

.lang-switch button {
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.lang-switch button:hover {
  color: var(--text-main);
}

.lang-switch button[aria-pressed="true"] {
  background: rgba(0, 242, 254, 0.14);
  color: var(--accent-cyan);
}

.lang-switch button:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

.lang-switch--corner {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* Evita flash de português para quem usa inglês: o lang-boot.js marca
   <html class="i18n-pending"> antes do CSS e o i18n.js remove após traduzir. */
html.i18n-pending body {
  visibility: hidden;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
}

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

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #070c16;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: rgba(255, 71, 87, 0.15);
  color: var(--accent-danger);
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.btn-danger:hover {
  background: rgba(255, 71, 87, 0.25);
  border-color: var(--accent-danger);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

/* Container Principal */
.container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex: 1;
  width: 100%;
}

/* Cards Estilo Glassmorphism */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  border-color: var(--border-glow);
}

.card-header {
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

/* Upload Dropzone */
.dropzone {
  border: 2px dashed rgba(79, 172, 254, 0.4);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: rgba(17, 23, 38, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.05);
  box-shadow: var(--shadow-glow);
}

.dropzone-icon {
  font-size: 3rem;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
}

.dropzone-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.dropzone-desc {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.selected-file-box {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-top: 1rem;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

.file-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 350px;
}

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

/* Seletor de Duração */
.duration-section {
  margin-top: 1.5rem;
}

.duration-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.duration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
  gap: 0.6rem;
}

.duration-option {
  position: relative;
}

.duration-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.duration-btn {
  display: block;
  text-align: center;
  padding: 0.6rem 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.duration-option input[type="radio"]:checked + .duration-btn {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

/* Barra de Progresso */
.progress-container {
  display: none;
  margin-top: 1.5rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  box-shadow: 0 0 12px var(--accent-cyan);
  transition: width 0.15s ease-out;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Resultado do Upload */
.upload-result {
  display: none;
  margin-top: 1.5rem;
  background: rgba(46, 213, 115, 0.08);
  border: 1px solid rgba(46, 213, 115, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  animation: fadeIn 0.4s ease;
}

.result-title {
  color: var(--accent-success);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.link-box {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.link-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: monospace;
}

/* Lista de Arquivos Ativos */
.files-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  transition: all 0.2s ease;
}

.file-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.file-item-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.file-item-icon {
  width: 42px;
  height: 42px;
  background: rgba(79, 172, 254, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 1.25rem;
}

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

.file-meta-sub {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.file-countdown {
  color: var(--accent-warning);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

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

/* Página de Download Pública */
.download-hero {
  text-align: center;
  padding: 2rem 0;
}

.download-icon-box {
  width: 90px;
  height: 90px;
  margin: 0 auto 1.5rem;
  background: rgba(0, 242, 254, 0.1);
  border: 2px solid rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
  color: var(--accent-cyan);
  box-shadow: var(--shadow-glow);
}

.download-filename {
  font-size: 1.75rem;
  word-break: break-word;
  margin-bottom: 0.5rem;
}

.download-filesize {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

/* Contador Regressivo Gigante */
.countdown-container {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 165, 2, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.5rem auto;
  max-width: 480px;
}

.countdown-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  font-family: monospace;
}

.timer-unit {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  min-width: 65px;
}

.timer-val {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-warning);
}

.timer-txt {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 2px;
}

.timer-sep {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dim);
}

.download-btn-large {
  width: 100%;
  max-width: 480px;
  margin: 1.5rem auto 0;
  padding: 1.1rem;
  font-size: 1.1rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-card);
  animation: modalPop 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-main);
}

/* Formulários */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 9999;
}

.toast {
  background: rgba(18, 24, 38, 0.95);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-main);
  box-shadow: var(--shadow-card);
  animation: toastSlide 0.3s ease;
}

.toast.success { border-left-color: var(--accent-success); }
.toast.error { border-left-color: var(--accent-danger); }
.toast.warning { border-left-color: var(--accent-warning); }

/* Rodapé */
.footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes toastSlide {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsividade Mobile */
@media (max-width: 640px) {
  .navbar {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .nav-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .container {
    padding: 0 1rem;
    margin: 1rem auto;
  }
  .card {
    padding: 1.25rem;
  }
  .file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .file-item-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .link-box {
    flex-direction: column;
  }
  .duration-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
