/**
 * BOE Resumen - 3D Background Styles
 * Estilos para el fondo animado 3D con Three.js
 */

/* Canvas container */
#boe-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Gradient overlay - tonos azules profesionales/legales */
#boe-gradient-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 60%),
    linear-gradient(180deg, #020617 0%, #0f172a 50%, #020617 100%);
}

/* Noise texture overlay */
#boe-noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Vignette overlay */
#boe-vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
}

/* Scan lines effect (subtle) */
#boe-scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.3;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.01) 2px,
    rgba(255, 255, 255, 0.01) 4px
  );
}

/* ============================================ */
/* Dark Theme Overrides for 3D Background      */
/* ============================================ */

/* Body with dark background */
body.boe-dark-theme {
  background: #020617;
  color: #f1f5f9;
}

/* Header - glassmorphism dark */
body.boe-dark-theme .header {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

body.boe-dark-theme .nav a {
  color: #94a3b8;
}

body.boe-dark-theme .nav a:hover {
  color: #3b82f6;
}

/* Hero Section */
body.boe-dark-theme .hero {
  background: transparent;
  padding-top: 6rem;
}

body.boe-dark-theme .hero::before {
  display: none;
}

body.boe-dark-theme .hero-title {
  color: #f1f5f9;
}

body.boe-dark-theme .hero-subtitle {
  color: #94a3b8;
}

body.boe-dark-theme .badge {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

body.boe-dark-theme .stat-number {
  color: #60a5fa;
}

body.boe-dark-theme .stat-label {
  color: #64748b;
}

/* Buttons */
body.boe-dark-theme .btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

body.boe-dark-theme .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(59, 130, 246, 0.5);
}

body.boe-dark-theme .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

body.boe-dark-theme .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

/* Sections */
body.boe-dark-theme .section {
  background: transparent;
}

body.boe-dark-theme .section-alt {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
}

body.boe-dark-theme .section-title {
  color: #f1f5f9;
}

body.boe-dark-theme .section-subtitle {
  color: #94a3b8;
}

/* Steps */
body.boe-dark-theme .step {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.15);
  backdrop-filter: blur(10px);
}

body.boe-dark-theme .step:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 10px 40px rgba(59, 130, 246, 0.1);
}

body.boe-dark-theme .step-number {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

body.boe-dark-theme .step-title {
  color: #f1f5f9;
}

body.boe-dark-theme .step-description {
  color: #94a3b8;
}

/* Chat Section */
body.boe-dark-theme .chat-container {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.15);
  backdrop-filter: blur(10px);
}

body.boe-dark-theme .chat-box {
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.1);
}

body.boe-dark-theme .chat-messages {
  background: transparent;
}

body.boe-dark-theme .bot-message .message-content {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #e2e8f0;
}

body.boe-dark-theme .user-message .message-content {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

body.boe-dark-theme .chat-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #f1f5f9;
}

body.boe-dark-theme .chat-input::placeholder {
  color: #64748b;
}

body.boe-dark-theme .chat-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

body.boe-dark-theme .chat-send-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

body.boe-dark-theme .example-btn {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #94a3b8;
}

body.boe-dark-theme .example-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #e2e8f0;
}

body.boe-dark-theme .chat-examples-title {
  color: #64748b;
}

/* Subscription Form */
body.boe-dark-theme .subscription-form {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.15);
  backdrop-filter: blur(10px);
}

body.boe-dark-theme .form-step-title {
  color: #f1f5f9;
}

body.boe-dark-theme .form-group label {
  color: #e2e8f0;
}

body.boe-dark-theme .form-group input,
body.boe-dark-theme .form-group textarea {
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #f1f5f9;
}

body.boe-dark-theme .form-group input::placeholder,
body.boe-dark-theme .form-group textarea::placeholder {
  color: #64748b;
}

body.boe-dark-theme .form-group input:focus,
body.boe-dark-theme .form-group textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

body.boe-dark-theme .form-hint {
  color: #64748b;
}

body.boe-dark-theme .tag-checkbox span {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #94a3b8;
}

body.boe-dark-theme .tag-checkbox input:checked + span {
  background: rgba(59, 130, 246, 0.3);
  border-color: #3b82f6;
  color: #e2e8f0;
}

body.boe-dark-theme .frequency-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

body.boe-dark-theme .frequency-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

body.boe-dark-theme .frequency-card input:checked + .frequency-content {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
}

body.boe-dark-theme .frequency-content h4 {
  color: #f1f5f9;
}

body.boe-dark-theme .frequency-content p {
  color: #94a3b8;
}

body.boe-dark-theme .frequency-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Footer */
body.boe-dark-theme .footer {
  background: rgba(2, 6, 23, 0.9);
  border-top: 1px solid rgba(59, 130, 246, 0.1);
}

body.boe-dark-theme .footer-brand p {
  color: #64748b;
}

body.boe-dark-theme .footer-column h4 {
  color: #e2e8f0;
}

body.boe-dark-theme .footer-column a {
  color: #64748b;
}

body.boe-dark-theme .footer-column a:hover {
  color: #3b82f6;
}

body.boe-dark-theme .footer-bottom {
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  color: #475569;
}

body.boe-dark-theme .footer-bottom a {
  color: #3b82f6;
}

/* Result success */
body.boe-dark-theme .subscription-result {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

body.boe-dark-theme .result-success h3 {
  color: #10b981;
}

body.boe-dark-theme .result-success p {
  color: #94a3b8;
}

/* Message loading */
body.boe-dark-theme .message-loading {
  color: #64748b;
}

/* Scrollbar for dark theme */
body.boe-dark-theme ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body.boe-dark-theme ::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

body.boe-dark-theme ::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.3);
  border-radius: 4px;
}

body.boe-dark-theme ::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.5);
}

/* Selection color */
body.boe-dark-theme ::selection {
  background: rgba(59, 130, 246, 0.3);
  color: #f1f5f9;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  #boe-canvas {
    display: none;
  }

  #boe-gradient-overlay {
    opacity: 1;
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  body.boe-dark-theme .hero {
    padding-top: 4rem;
  }

  #boe-scanlines {
    display: none;
  }
}
