/* Reset y Configuración Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --bg-color: #0b0f19;
  --card-bg: rgba(17, 24, 39, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-error: #ef4444;
  --text-success: #10b981;
  
  /* Nuevas variables de tema */
  --input-bg: rgba(17, 24, 39, 0.8);
  --input-color: #ffffff;
  --h1-gradient: linear-gradient(135deg, #ffffff 40%, #a5b4fc 100%);
  --card-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  --tabs-bg: rgba(17, 24, 39, 0.6);
}

body.light-theme {
  --bg-color: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.85);
  --border-color: rgba(15, 23, 42, 0.08);
  --border-focus: rgba(99, 102, 241, 0.6);
  --text-main: #0f172a;
  --text-muted: #64748b;
  
  --input-bg: rgba(255, 255, 255, 0.9);
  --input-color: #0f172a;
  --h1-gradient: linear-gradient(135deg, #0f172a 40%, #4f46e5 100%);
  --card-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.06);
  --tabs-bg: rgba(15, 23, 42, 0.04);
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

body.has-bg-image {
  background-image: linear-gradient(rgba(10, 15, 30, 0.82), rgba(10, 15, 30, 0.82)), var(--bg-image-url);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body.has-bg-image.light-theme {
  background-image: linear-gradient(rgba(248, 250, 252, 0.90), rgba(248, 250, 252, 0.90)), var(--bg-image-url);
}

/* Fondo decorativo premium con efectos */
.glass-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.glass-bg::before,
.glass-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
}

.glass-bg::before {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -10%;
  left: -10%;
}

.glass-bg::after {
  width: 500px;
  height: 500px;
  background: #a855f7;
  bottom: -20%;
  right: -10%;
}

/* Contenedor Principal */
.app-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 640px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Header */
.app-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #a5b4fc;
}

.logo i {
  width: 16px;
  height: 16px;
}

.hero-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: var(--h1-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 460px;
  line-height: 1.5;
  font-weight: 350;
}

/* Botones y Badges de Autenticación en Nav */
.auth-nav {
  display: flex;
  align-items: center;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

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

.nav-btn i {
  width: 15px;
  height: 15px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 0.85rem;
  color: #34d399;
}

.user-badge i {
  width: 14px;
  height: 14px;
}

.user-email {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.logout-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.logout-btn:hover {
  opacity: 1;
}

.logout-btn i {
  width: 14px;
  height: 14px;
}

.change-password-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.change-password-btn:hover {
  color: var(--primary);
  opacity: 1;
}

.change-password-btn i {
  width: 14px;
  height: 14px;
}

/* Tabs de Navegación */
.dashboard-tabs {
  display: flex;
  background: var(--tabs-bg);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  max-width: 380px;
  margin: 10px auto 0;
}

.tab-btn {
  flex: 1 1 0%;
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.tab-btn i {
  width: 16px;
  height: 16px;
}

/* Tarjeta Principal (Glassmorphism) */
.app-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.card-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.icon-action-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-action-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Formulario de Acortar */
.shorten-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.label-with-hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.label-with-hint .hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #d1d5db;
  letter-spacing: 0.025em;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px 14px 44px;
  color: var(--input-color);
  font-size: 0.95rem;
  transition: all 0.2s ease, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  outline: none;
}

.input-wrapper input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.input-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

/* Prefijo de dominio personalizado */
.prefix-wrapper input {
  padding-left: 165px;
}

.domain-prefix {
  position: absolute;
  left: 16px;
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 600;
  pointer-events: none;
}

/* Botón de Enviar */
.submit-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, #818cf8 100%);
  border: none;
  border-radius: 12px;
  padding: 14px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.submit-btn:active {
  transform: translateY(1px);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.submit-btn i {
  width: 18px;
  height: 18px;
}

/* Panel de Resultados */
.result-panel {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeIn 0.4s ease forwards;
}

.result-panel h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #a5b4fc;
}

.result-box {
  display: flex;
  gap: 8px;
}

.result-box input {
  flex: 1;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  text-overflow: ellipsis;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0 20px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

.copy-btn.success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.copy-btn i {
  width: 16px;
  height: 16px;
}

.stats-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 12px;
  border-radius: 8px;
}

.stats-hint i {
  width: 14px;
  height: 14px;
  color: var(--primary);
  flex-shrink: 0;
}

/* Buscador del Dashboard */
.search-bar-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-bar-wrapper input {
  width: 100%;
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px 12px 42px;
  color: #fff;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  outline: none;
}

.search-bar-wrapper input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(17, 24, 39, 0.8);
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* Lista de Enlaces en Dashboard */
.links-list-container {
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.loading-state, .empty-state, .error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 0;
  color: var(--text-muted);
  text-align: center;
}

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

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.05);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.empty-state i, .error-state i {
  width: 48px;
  height: 48px;
  color: var(--primary);
  opacity: 0.7;
}

.error-state i {
  color: var(--text-error);
}

.empty-state .primary-btn {
  margin-top: 8px;
  background: var(--primary);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.empty-state .primary-btn:hover {
  opacity: 0.9;
}

/* Cuadrícula de Enlaces */
.links-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 450px;
  overflow-y: auto;
  padding-right: 4px;
}

.links-grid::-webkit-scrollbar {
  width: 6px;
}

.links-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.link-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  transition: all 0.2s;
}

.link-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(99, 102, 241, 0.25);
  transform: translateY(-1px);
}

.link-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0; /* Permite que el texto largo trunque en flexbox */
}

.link-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.link-slug {
  font-weight: 700;
  color: #a5b4fc;
  font-size: 1.05rem;
}

.link-date {
  font-size: 0.75rem;
  color: rgba(156, 163, 175, 0.5);
}

.link-target {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
  transition: color 0.2s;
}

.link-target:hover {
  color: var(--primary);
}

.link-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}

.link-clicks {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #a5b4fc;
}

.link-clicks i {
  width: 14px;
  height: 14px;
}

.action-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.action-btn.copy:hover {
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

.action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.action-btn.qr:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.action-btn i {
  width: 14px;
  height: 14px;
}

/* Modales (Login / Registro Overlay) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 10, 18, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.25s ease-out forwards;
}

.modal-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  padding: 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

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

.modal-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  color: #fff;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.modal-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.modal-footer a:hover {
  text-decoration: underline;
}

/* Feedback / Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 320px;
}

.toast.success {
  background: #065f46;
  border: 1px solid #059669;
  color: #a7f3d0;
}

.toast.error {
  background: #991b1b;
  border: 1px solid #dc2626;
  color: #fee2e2;
}

/* Footer */
.app-footer {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(156, 163, 175, 0.6);
  line-height: 1.4;
  font-weight: 300;
}

/* Utilidades */
.hidden {
  display: none !important;
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateY(100%) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Ajustes Responsive */
@media (max-width: 480px) {
  .app-card {
    padding: 24px;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  .prefix-wrapper input {
    padding-left: 155px;
  }
  
  .domain-prefix {
    font-size: 0.9rem;
  }
  
  .result-box {
    flex-direction: column;
  }
  
  .copy-btn {
    padding: 14px;
    justify-content: center;
  }

  .link-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .link-actions {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
  }

  .link-target {
    max-width: 100%;
  }
}

/* Avisos y advertencias de caducidad para invitados */
.guest-info-notice, .anonymous-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 10px;
  margin-bottom: 12px;
}

.guest-info-notice i, .anonymous-warning i {
  color: #fbbf24;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.guest-info-notice a, .anonymous-warning a {
  color: #fbbf24;
  text-decoration: underline;
  font-weight: 500;
}

.guest-info-notice a:hover, .anonymous-warning a:hover {
  color: #f59e0b;
}

/* Estilos para el selector de caducidad */
.input-wrapper select.select-input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px 14px 44px;
  color: var(--input-color);
  font-size: 0.95rem;
  transition: all 0.2s ease, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.input-wrapper select.select-input option {
  background: #111827;
  color: #fff;
}

.input-wrapper select.select-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.input-wrapper select.select-input:disabled {
  background-color: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: not-allowed;
  background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

/* Menú de Configuración Flotante (Settings Popover) */
.settings-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.settings-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.settings-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-focus);
}

.settings-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  width: 280px;
  z-index: 100;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

body.light-theme .settings-menu {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.settings-menu.hidden {
  display: none;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-section label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.settings-options {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

body.light-theme .settings-options {
  background: rgba(0, 0, 0, 0.04);
}

.settings-options button {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.settings-options button:hover {
  color: var(--text-main);
}

.settings-options button.active {
  background: var(--primary);
  color: #fff;
}

.settings-options button i {
  width: 14px;
  height: 14px;
}

/* Overlay de Proyección QR a Pantalla Completa */
.projection-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 15, 30, 0.98);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.projection-overlay.hidden {
  display: none;
}

.close-projection-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.close-projection-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.projection-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  width: 90%;
  max-width: 600px;
}

#projection-qr-canvas {
  background: white;
  padding: 24px;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  width: min(85vw, 85vh);
  height: min(85vw, 85vh);
  max-width: 750px;
  max-height: 750px;
  display: block;
}

/* Modificaciones específicas para el modal de código QR */
.modal-card.qr-modal-card {
  max-width: min(90vw, 540px);
  width: 90%;
}

.modal-card.qr-modal-card #modal-qr-canvas {
  width: min(80vw, 420px) !important;
  height: min(80vw, 420px) !important;
  max-width: 420px;
  max-height: 420px;
  display: block;
}

.projection-url-text {
  color: #fff;
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  word-break: break-all;
  letter-spacing: 0.02em;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  font-family: 'Outfit', sans-serif;
}

/* Atribución Modal Responsive */
.about-body-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

@media (max-width: 580px) {
  .about-body-layout {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
  }
  
  .about-avatar-wrapper {
    margin-bottom: 8px;
  }
}

/* Atribución de Imagen de Fondo Flotante */
.bg-attribution {
  position: fixed;
  bottom: 12px;
  left: 16px;
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.5;
  transition: opacity 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
}

.bg-attribution:hover {
  opacity: 0.95;
}

.bg-attribution a {
  color: inherit;
  text-decoration: underline;
}

.bg-attribution.hidden {
  display: none;
}

@media (max-width: 768px) {
  .bg-attribution {
    position: static;
    margin-top: 8px;
    justify-content: center;
    width: 100%;
    opacity: 0.7;
  }
}

.dash-counter {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 4px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
}

