/*
 * styles.css
 *
 * Este arquivo contém o conjunto unificado de estilos para toda a
 * aplicação NetherHost. A paleta utiliza tons escuros com
 * vermelhos e laranjas vibrantes inspirados no Nether do Minecraft.
 * Os componentes incluem barras de navegação, cartões, botões,
 * formulários, listas de uploads e elementos específicos da página
 * de upload. Classes utilitárias como `.hidden` são fornecidas para
 * controlar a visibilidade.
 */

/* Variáveis de cor para fácil customização */
:root {
  --bg-black: #0a0a0a;
  --bg-dark: #121212;
  --primary-red: #d40000;
  --primary-orange: #ff5e00;
  --accent-purple: #6b00b5;
  --grey: #444444;
  --text-light: #f5f5f5;
  --text-muted: #a0a0a0;
}

/* Reset básico */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
  width: 100%;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: var(--bg-black);
  color: var(--text-light);
  overflow-x: hidden;
}

/* Barra de navegação */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(10, 10, 10, 0.85);
  border-bottom: 1px solid #222222;
  position: sticky;
  top: 0;
  z-index: 5;
}
nav .brand {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-red);
  text-decoration: none;
}
nav .links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}
nav .links a {
  color: var(--text-light);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 4px;
  transition: color 0.3s ease, background 0.3s ease;
}
nav .links a:hover {
  color: var(--primary-orange);
  background: rgba(255, 60, 0, 0.1);
}
nav .username {
  color: var(--primary-orange);
  margin-right: 8px;
}

/* Contêiner principal para páginas */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: calc(100vh - 60px);
  padding: 40px 20px;
  position: relative;
  z-index: 2;
}

/* Cartões genéricos */
.card {
  background: var(--bg-dark);
  border: 1px solid #222222;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 520px;
  text-align: center;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.3), inset 0 0 30px rgba(255, 0, 0, 0.15);
  margin-bottom: 40px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(255, 100, 0, 0.5), inset 0 0 40px rgba(255, 0, 0, 0.2);
}

/* Agrupamento de campos de formulários */
.form-group {
  margin-bottom: 16px;
  width: 100%;
  text-align: left;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #333333;
  border-radius: 8px;
  background: #1a1a1a;
  color: var(--text-light);
}
.form-group input:focus-visible,
.form-group select:focus-visible {
  outline: 2px solid var(--primary-orange);
  outline-offset: 2px;
}

/* Botões genéricos */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  margin: 8px 4px;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn.primary {
  background: var(--primary-red);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
}
.btn.primary:hover:enabled {
  background: var(--primary-orange);
  box-shadow: 0 0 25px rgba(255, 60, 0, 0.5);
  transform: translateY(-2px);
}
.btn.secondary {
  background: #2a2a2a;
  color: var(--primary-orange);
  box-shadow: 0 0 15px rgba(255, 50, 0, 0.4);
}
.btn.secondary:hover:enabled {
  background: #3a3a3a;
  box-shadow: 0 0 20px rgba(255, 80, 0, 0.5);
  transform: translateY(-2px);
}
.btn.danger {
  background: #630000;
  color: #ff8a8a;
  box-shadow: 0 0 15px rgba(255, 20, 0, 0.4);
}
.btn.danger:hover:enabled {
  background: #7a0000;
  box-shadow: 0 0 20px rgba(255, 50, 0, 0.5);
  transform: translateY(-2px);
}

/* Elementos específicos da página de upload */
.drop-zone {
  position: relative;
  border: 2px dashed rgba(255, 0, 0, 0.4);
  border-radius: 12px;
  padding: 40px 20px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.drop-zone.dragover {
  background: rgba(80, 0, 0, 0.25);
  border-color: var(--primary-orange);
}
.drop-zone:focus-visible {
  outline: 2px solid var(--primary-orange);
  outline-offset: 2px;
}
.drop-zone .emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: 10px;
}
.file-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  word-break: break-all;
}
.preview-container {
  margin-bottom: 20px;
}
.preview-container.hidden {
  display: none;
}
.preview-container img,
.preview-container video {
  max-width: 100%;
  max-height: 240px;
  border: 3px solid #341f1f;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}
.preview-container .generic-file {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  height: 150px;
  border: 3px solid #341f1f;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
  color: var(--primary-orange);
}
.preview-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

/* Opções adicionais na página de upload */
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin-bottom: 20px;
}
.options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}
.options input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-red);
}
.options select,
.options input[type="text"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #333333;
  border-radius: 8px;
  background: #1a1a1a;
  color: var(--text-light);
}
.options select:focus-visible,
.options input[type="text"]:focus-visible {
  outline: 2px solid var(--primary-orange);
  outline-offset: 2px;
}

/* Barra de progresso */
.progress-container {
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 8px;
  overflow: hidden;
  height: 8px;
  margin-bottom: 16px;
}
.progress-container.hidden {
  display: none;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-red), var(--primary-orange));
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
  transition: width 0.2s ease;
}

/* Logs e mensagens de status */
.logs {
  background: rgba(20, 20, 20, 0.85);
  border: 1px solid #333333;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 10px;
  height: 80px;
  overflow-y: auto;
  border-radius: 8px;
  margin-bottom: 12px;
}
.logs.hidden {
  display: none;
}
.success-message,
.error-message {
  background: rgba(20, 20, 20, 0.85);
  border: 1px solid #333333;
  padding: 16px;
  border-radius: 8px;
  margin-top: 12px;
  text-align: left;
}
.success-message.hidden,
.error-message.hidden {
  display: none;
}
.success-message {
  color: #81f781;
}
.error-message {
  color: #ff6b6b;
}
.success-url {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.success-url input {
  flex-grow: 1;
  padding: 8px;
  border-radius: 8px;
  background: #1a1a1a;
  border: 1px solid #333333;
  color: var(--text-light);
}
.copy-feedback {
  font-size: 0.8rem;
  color: var(--primary-orange);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.copy-feedback.visible {
  opacity: 1;
}

/* Blocos de código na página de códigos */
.code-block {
  background: #1a1a1a;
  color: #dddddd;
  border: 1px solid #333333;
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.code-copy {
  margin-bottom: 20px;
}

/* Lista de uploads na página da conta */
.upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}
.upload-item .info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.upload-item .info img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #341f1f;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.4);
}
.upload-item .file-details {
  display: flex;
  flex-direction: column;
}
.upload-item .file-details strong {
  font-size: 0.95rem;
}
.upload-item .file-details span {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.upload-item .actions {
  display: flex;
  gap: 8px;
}

/* Estilização do painel de administração */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 20px;
}
.stat {
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 120px;
  text-align: center;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.2);
}
.stat strong {
  display: block;
  margin-bottom: 4px;
  color: var(--primary-orange);
}
.admin-upload-list,
.admin-user-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
}
.user-item .details {
  display: flex;
  flex-direction: column;
}
.user-item .details strong {
  font-size: 0.95rem;
}
.user-item .details span {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.user-item .stats {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Card de publicidade na página principal */
.ad-card {
  background: rgba(255, 60, 0, 0.1);
  border: 1px solid #333333;
  padding: 20px;
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  color: var(--text-light);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.3), inset 0 0 30px rgba(255, 0, 0, 0.1);
  margin-top: -10px;
  margin-bottom: 40px;
}
.ad-card h2 {
  margin-bottom: 8px;
}
.ad-card p {
  margin-bottom: 12px;
  color: var(--text-muted);
}

/* Classe utilitária para esconder elementos */
.hidden {
  display: none !important;
}

/* Ajustes responsivos */
@media (max-width: 600px) {
  nav .links {
    flex-wrap: wrap;
    gap: 8px;
  }
  .card {
    padding: 24px;
  }
  .upload-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .upload-item .actions {
    margin-top: 8px;
  }
}