/* ============================================
   VARIABLES & CONFIGURACIÓN - LIQUID GLASS iOS 26
   ============================================ */

/* ============================================
   TEMA 1: AZUL CLARO (Default)
   ============================================ */
:root,
[data-theme="blue-light"] {
  --sakura-pink-light: #e3f2fd;
  --sakura-pink-med: #90caf9;
  --sakura-pink-deep: #0a84ff;
  --sakura-brown: #1565c0;
  --sakura-brown-dark: #0d47a1;

  --liquid-bg-start: #e3f2fd;
  --liquid-bg-end: #bbdefb;
  --liquid-accent: rgba(10, 132, 255, 0.4);

  --glass-surface: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glass-shadow: 0 8px 32px 0 rgba(10, 132, 255, 0.15);
  --glass-blur: 24px;
  --glass-radius: 32px;

  --text-primary: #0d1b2a;
  --text-secondary: #1565c0;
  --text-muted: #5c87b8;
  --text-inverse: #ffffff;

  --btn-gradient: linear-gradient(135deg, #90caf9 0%, #0a84ff 100%);
  --btn-text: #0d1b2a;

  --input-bg: rgba(255, 255, 255, 0.5);
  --input-focus-bg: rgba(255, 255, 255, 0.8);
  --input-border: rgba(255, 255, 255, 0.6);
  --input-focus-border: var(--sakura-pink-deep);
  --input-focus-ring: rgba(10, 132, 255, 0.15);

  --upload-border: rgba(10, 132, 255, 0.4);
  --upload-hover-bg: rgba(227, 242, 253, 0.5);
  --upload-hover-border: var(--sakura-pink-deep);

  --status-info-bg: rgba(10, 132, 255, 0.15);
  --status-info-border: rgba(10, 132, 255, 0.3);
  --status-info-text: var(--sakura-brown-dark);
  --status-success-bg: rgba(52, 199, 89, 0.15);
  --status-success-border: rgba(52, 199, 89, 0.3);
  --status-success-text: #2d5a3d;
  --status-error-bg: rgba(255, 59, 48, 0.15);
  --status-error-border: rgba(255, 59, 48, 0.3);
  --status-error-text: #8b2626;

  --spinner-track: rgba(255, 255, 255, 0.3);
  --spinner-top: var(--sakura-pink-deep);

  --scrollbar-track: rgba(255, 255, 255, 0.3);
  --scrollbar-thumb: var(--sakura-pink-med);
  --scrollbar-thumb-hover: var(--sakura-pink-deep);

  --selection-bg: var(--sakura-pink-deep);
  --selection-text: #ffffff;

  --footer-bg: rgba(255, 255, 255, 0.2);
  --footer-border: rgba(255, 255, 255, 0.5);
  --footer-heading: var(--sakura-brown-dark);
  --footer-link: var(--text-secondary);
  --footer-link-hover: var(--sakura-pink-deep);
  --footer-copyright: var(--text-muted);

  --toggle-bg: rgba(255, 255, 255, 0.4);
  --toggle-icon: var(--sakura-brown-dark);

  --petal-1: linear-gradient(135deg, #e3f2fd, #90caf9);
  --petal-2: linear-gradient(135deg, #bbdefb, #64b5f6);
  --petal-3: linear-gradient(135deg, #e1f5fe, #42a5f5);

  --body-bg: var(--liquid-bg-start);
  --body-radial-1: hsla(210, 80%, 95%, 1);
  --body-radial-2: hsla(200, 80%, 95%, 1);
  --liquid-blob-1: rgba(227, 242, 253, 0.8);
  --liquid-blob-2: rgba(10, 132, 255, 0.3);
  --liquid-blob-3: rgba(144, 202, 249, 0.4);

  --step-circle-bg: rgba(10, 132, 255, 0.15);
  --step-circle-border: rgba(10, 132, 255, 0.3);
  --step-icon-stroke: var(--sakura-pink-deep);
  --step-title: var(--sakura-brown-dark);

  --img-item-bg: rgba(255, 255, 255, 0.4);
  --img-item-border: rgba(255, 255, 255, 0.6);
  --img-item-hover-shadow: 0 8px 20px rgba(10, 132, 255, 0.2);

  --reset-bg: rgba(255, 59, 48, 0.15);
  --reset-border: rgba(255, 59, 48, 0.3);
  --reset-text: #8b2626;
}

/* ============================================
   TEMA 2: AZUL OSCURO
   ============================================ */
[data-theme="blue-dark"] {
  --sakura-pink-light: #1a2744;
  --sakura-pink-med: #5ac8fa;
  --sakura-pink-deep: #5ac8fa;
  --sakura-brown: #90caf9;
  --sakura-brown-dark: #e3f2fd;

  --liquid-bg-start: #0a1628;
  --liquid-bg-end: #1a2744;
  --liquid-accent: rgba(90, 200, 250, 0.4);

  --glass-surface: rgba(26, 39, 68, 0.65);
  --glass-border: rgba(90, 200, 250, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --glass-blur: 24px;
  --glass-radius: 32px;

  --text-primary: #e3f2fd;
  --text-secondary: #90caf9;
  --text-muted: #5c87b8;
  --text-inverse: #0a1628;

  --btn-gradient: linear-gradient(135deg, #1565c0 0%, #5ac8fa 100%);
  --btn-text: #0a1628;

  --input-bg: rgba(26, 39, 68, 0.5);
  --input-focus-bg: rgba(30, 50, 80, 0.8);
  --input-border: rgba(90, 200, 250, 0.2);
  --input-focus-border: var(--sakura-pink-deep);
  --input-focus-ring: rgba(90, 200, 250, 0.25);

  --upload-border: rgba(90, 200, 250, 0.3);
  --upload-hover-bg: rgba(26, 39, 68, 0.5);
  --upload-hover-border: var(--sakura-pink-deep);

  --status-info-bg: rgba(90, 200, 250, 0.12);
  --status-info-border: rgba(90, 200, 250, 0.25);
  --status-info-text: #90caf9;
  --status-success-bg: rgba(52, 199, 89, 0.12);
  --status-success-border: rgba(52, 199, 89, 0.25);
  --status-success-text: #6ee7a0;
  --status-error-bg: rgba(255, 59, 48, 0.12);
  --status-error-border: rgba(255, 59, 48, 0.25);
  --status-error-text: #ff8a80;

  --spinner-track: rgba(90, 200, 250, 0.15);
  --spinner-top: var(--sakura-pink-deep);

  --scrollbar-track: rgba(26, 39, 68, 0.3);
  --scrollbar-thumb: #1565c0;
  --scrollbar-thumb-hover: var(--sakura-pink-deep);

  --selection-bg: var(--sakura-pink-deep);
  --selection-text: #0a1628;

  --footer-bg: rgba(10, 22, 40, 0.6);
  --footer-border: rgba(90, 200, 250, 0.15);
  --footer-heading: #90caf9;
  --footer-link: #5c87b8;
  --footer-link-hover: #5ac8fa;
  --footer-copyright: #5c87b8;

  --toggle-bg: rgba(26, 39, 68, 0.6);
  --toggle-icon: #90caf9;

  --petal-1: linear-gradient(135deg, rgba(90, 200, 250, 0.3), rgba(21, 101, 192, 0.4));
  --petal-2: linear-gradient(135deg, rgba(144, 202, 249, 0.2), rgba(90, 200, 250, 0.35));
  --petal-3: linear-gradient(135deg, rgba(66, 165, 245, 0.25), rgba(30, 80, 160, 0.35));

  --body-bg: var(--liquid-bg-start);
  --body-radial-1: hsla(220, 50%, 12%, 1);
  --body-radial-2: hsla(210, 50%, 10%, 1);
  --liquid-blob-1: rgba(26, 39, 68, 0.6);
  --liquid-blob-2: rgba(21, 101, 192, 0.3);
  --liquid-blob-3: rgba(10, 50, 100, 0.4);

  --step-circle-bg: rgba(90, 200, 250, 0.1);
  --step-circle-border: rgba(90, 200, 250, 0.2);
  --step-icon-stroke: #5ac8fa;
  --step-title: #90caf9;

  --img-item-bg: rgba(26, 39, 68, 0.4);
  --img-item-border: rgba(90, 200, 250, 0.15);
  --img-item-hover-shadow: 0 8px 20px rgba(90, 200, 250, 0.15);

  --reset-bg: rgba(255, 59, 48, 0.1);
  --reset-border: rgba(255, 59, 48, 0.2);
  --reset-text: #ff8a80;
}

/* ============================================
   TEMA 3: SAKURA CLARO
   ============================================ */
[data-theme="sakura-light"] {
  --sakura-pink-light: #ffe4e6;
  --sakura-pink-med: #fbcfe8;
  --sakura-pink-deep: #f472b6;
  --sakura-brown: #8d6e63;
  --sakura-brown-dark: #5d4037;

  --liquid-bg-start: #fff1f2;
  --liquid-bg-end: #fce7f3;
  --liquid-accent: rgba(244, 114, 182, 0.4);

  --glass-surface: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glass-shadow: 0 8px 32px 0 rgba(244, 114, 182, 0.15);
  --glass-blur: 24px;
  --glass-radius: 32px;

  --text-primary: #5d4037;
  --text-secondary: #8d6e63;
  --text-muted: #a1887f;
  --text-inverse: #ffffff;

  --btn-gradient: linear-gradient(135deg, #fbcfe8 0%, #f472b6 100%);
  --btn-text: #5d4037;

  --input-bg: rgba(255, 255, 255, 0.5);
  --input-focus-bg: rgba(255, 255, 255, 0.8);
  --input-border: rgba(255, 255, 255, 0.6);
  --input-focus-border: var(--sakura-pink-deep);
  --input-focus-ring: rgba(244, 114, 182, 0.15);

  --upload-border: rgba(244, 114, 182, 0.4);
  --upload-hover-bg: rgba(255, 228, 230, 0.5);
  --upload-hover-border: var(--sakura-pink-deep);

  --status-info-bg: rgba(244, 114, 182, 0.15);
  --status-info-border: rgba(244, 114, 182, 0.3);
  --status-info-text: var(--sakura-brown-dark);
  --status-success-bg: rgba(52, 199, 89, 0.15);
  --status-success-border: rgba(52, 199, 89, 0.3);
  --status-success-text: #2d5a3d;
  --status-error-bg: rgba(255, 59, 48, 0.15);
  --status-error-border: rgba(255, 59, 48, 0.3);
  --status-error-text: #8b2626;

  --spinner-track: rgba(255, 255, 255, 0.3);
  --spinner-top: var(--sakura-pink-deep);

  --scrollbar-track: rgba(255, 255, 255, 0.3);
  --scrollbar-thumb: var(--sakura-pink-med);
  --scrollbar-thumb-hover: var(--sakura-pink-deep);

  --selection-bg: var(--sakura-pink-deep);
  --selection-text: #ffffff;

  --footer-bg: rgba(255, 255, 255, 0.2);
  --footer-border: rgba(255, 255, 255, 0.5);
  --footer-heading: var(--sakura-brown-dark);
  --footer-link: var(--text-secondary);
  --footer-link-hover: var(--sakura-pink-deep);
  --footer-copyright: var(--text-muted);

  --toggle-bg: rgba(255, 255, 255, 0.4);
  --toggle-icon: var(--sakura-brown-dark);

  --petal-1: linear-gradient(135deg, #ffe4e6, #fbcfe8);
  --petal-2: linear-gradient(135deg, #fff0f5, #ffd1dc);
  --petal-3: linear-gradient(135deg, #ffe4e1, #ffb6c1);

  --body-bg: var(--liquid-bg-start);
  --body-radial-1: hsla(340, 80%, 95%, 1);
  --body-radial-2: hsla(320, 80%, 95%, 1);
  --liquid-blob-1: rgba(255, 228, 230, 0.8);
  --liquid-blob-2: rgba(244, 114, 182, 0.3);
  --liquid-blob-3: rgba(255, 200, 200, 0.4);

  --step-circle-bg: rgba(244, 114, 182, 0.15);
  --step-circle-border: rgba(244, 114, 182, 0.3);
  --step-icon-stroke: var(--sakura-pink-deep);
  --step-title: var(--sakura-brown-dark);

  --img-item-bg: rgba(255, 255, 255, 0.4);
  --img-item-border: rgba(255, 255, 255, 0.6);
  --img-item-hover-shadow: 0 8px 20px rgba(244, 114, 182, 0.2);

  --reset-bg: rgba(255, 59, 48, 0.15);
  --reset-border: rgba(255, 59, 48, 0.3);
  --reset-text: #8b2626;
}

/* ============================================
   TEMA 4: SAKURA OSCURO
   ============================================ */
[data-theme="sakura-dark"] {
  --sakura-pink-light: #2d1225;
  --sakura-pink-med: #9d3a6e;
  --sakura-pink-deep: #f472b6;
  --sakura-brown: #d4899e;
  --sakura-brown-dark: #f9a8d4;

  --liquid-bg-start: #1a0a10;
  --liquid-bg-end: #2d1225;
  --liquid-accent: rgba(244, 114, 182, 0.4);

  --glass-surface: rgba(45, 18, 37, 0.65);
  --glass-border: rgba(244, 114, 182, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --glass-blur: 24px;
  --glass-radius: 32px;

  --text-primary: #fce7f3;
  --text-secondary: #f9a8d4;
  --text-muted: #9d6b7a;
  --text-inverse: #1a0a10;

  --btn-gradient: linear-gradient(135deg, #9d3a6e 0%, #f472b6 100%);
  --btn-text: #fff1f2;

  --input-bg: rgba(45, 18, 37, 0.5);
  --input-focus-bg: rgba(60, 25, 48, 0.8);
  --input-border: rgba(244, 114, 182, 0.2);
  --input-focus-border: var(--sakura-pink-deep);
  --input-focus-ring: rgba(244, 114, 182, 0.25);

  --upload-border: rgba(244, 114, 182, 0.3);
  --upload-hover-bg: rgba(60, 25, 48, 0.5);
  --upload-hover-border: var(--sakura-pink-deep);

  --status-info-bg: rgba(244, 114, 182, 0.12);
  --status-info-border: rgba(244, 114, 182, 0.25);
  --status-info-text: #f9a8d4;
  --status-success-bg: rgba(52, 199, 89, 0.12);
  --status-success-border: rgba(52, 199, 89, 0.25);
  --status-success-text: #6ee7a0;
  --status-error-bg: rgba(255, 59, 48, 0.12);
  --status-error-border: rgba(255, 59, 48, 0.25);
  --status-error-text: #ff8a80;

  --spinner-track: rgba(244, 114, 182, 0.15);
  --spinner-top: var(--sakura-pink-deep);

  --scrollbar-track: rgba(45, 18, 37, 0.3);
  --scrollbar-thumb: #9d3a6e;
  --scrollbar-thumb-hover: var(--sakura-pink-deep);

  --selection-bg: var(--sakura-pink-deep);
  --selection-text: #fff1f2;

  --footer-bg: rgba(30, 12, 22, 0.6);
  --footer-border: rgba(244, 114, 182, 0.15);
  --footer-heading: #f9a8d4;
  --footer-link: #d4899e;
  --footer-link-hover: #f472b6;
  --footer-copyright: #9d6b7a;

  --toggle-bg: rgba(45, 18, 37, 0.6);
  --toggle-icon: #f9a8d4;

  --petal-1: linear-gradient(135deg, rgba(244, 114, 182, 0.3), rgba(155, 58, 110, 0.4));
  --petal-2: linear-gradient(135deg, rgba(251, 207, 232, 0.2), rgba(244, 114, 182, 0.35));
  --petal-3: linear-gradient(135deg, rgba(255, 182, 193, 0.25), rgba(200, 80, 140, 0.35));

  --body-bg: var(--liquid-bg-start);
  --body-radial-1: hsla(330, 50%, 12%, 1);
  --body-radial-2: hsla(320, 50%, 10%, 1);
  --liquid-blob-1: rgba(80, 20, 55, 0.6);
  --liquid-blob-2: rgba(120, 30, 70, 0.3);
  --liquid-blob-3: rgba(60, 15, 40, 0.4);

  --step-circle-bg: rgba(244, 114, 182, 0.1);
  --step-circle-border: rgba(244, 114, 182, 0.2);
  --step-icon-stroke: #f472b6;
  --step-title: #f9a8d4;

  --img-item-bg: rgba(45, 18, 37, 0.4);
  --img-item-border: rgba(244, 114, 182, 0.15);
  --img-item-hover-shadow: 0 8px 20px rgba(244, 114, 182, 0.15);

  --reset-bg: rgba(255, 59, 48, 0.1);
  --reset-border: rgba(255, 59, 48, 0.2);
  --reset-text: #ff8a80;
}

/* Ocultar todos los iconos por defecto */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon,
.theme-toggle .icon-flower,
.theme-toggle .icon-flower-dark { display: none; }

/* Mostrar el icono correcto según el tema */
[data-theme="blue-light"] .theme-toggle .icon-moon       { display: block; }
[data-theme="blue-dark"] .theme-toggle .icon-sun          { display: block; }
[data-theme="sakura-light"] .theme-toggle .icon-flower    { display: block; }
[data-theme="sakura-dark"] .theme-toggle .icon-flower-dark { display: block; }

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  background: var(--body-bg);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  transition: background 0.5s ease, color 0.4s ease;
  background-image:
    radial-gradient(at 0% 0%, var(--body-radial-1) 0, transparent 50%),
    radial-gradient(at 100% 0%, var(--body-radial-2) 0, transparent 50%),
    radial-gradient(at 100% 100%, var(--body-radial-1) 0, transparent 50%),
    radial-gradient(at 0% 100%, var(--body-radial-2) 0, transparent 50%);
}

/* ============================================
   EFECTO LIQUID BACKGROUND ANIMADO
   ============================================ */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 50% 50%, var(--liquid-blob-1), transparent 60%),
    radial-gradient(circle at 20% 80%, var(--liquid-blob-2), transparent 50%),
    radial-gradient(circle at 80% 20%, var(--liquid-blob-3), transparent 50%);
  filter: blur(60px);
  z-index: -2;
  animation: liquidFlow 20s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes liquidFlow {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-5%, 5%) scale(1.05); }
  100% { transform: translate(5%, -5%) scale(1); }
}

/* ============================================
   PARTÍCULAS DE SAKURA
   ============================================ */
.sakura-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.petal {
  position: absolute;
  background: var(--petal-1);
  border-radius: 150% 0 150% 0;
  animation: fall linear infinite;
  opacity: 0.8;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.petal:nth-child(odd)  { background: var(--petal-2); }
.petal:nth-child(even) { background: var(--petal-3); }

@keyframes fall {
  0%   { transform: translate(0, -10%) rotate(0deg) scale(0.8); opacity: 0; }
  10%  { opacity: 0.9; }
  100% { transform: translate(100px, 110vh) rotate(360deg) scale(1); opacity: 0; }
}

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/* ============================================
   ESTILO LIQUID GLASS (iOS 26)
   ============================================ */
.glass-panel, .glass-card {
  background: var(--glass-surface);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Brillo interno */
.glass-panel::after, .glass-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-25deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

.glass-panel:hover::after, .glass-card:hover::after {
  left: 150%;
  transition: left 0.8s ease;
}

.glass-panel:hover, .glass-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 40px 0 rgba(244, 114, 182, 0.25);
  border-color: rgba(255, 255, 255, 0.95);
}

.glass-card {
  padding: 2.5rem;
}

/* ============================================
   TIPOGRAFÍA
   ============================================ */
h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--sakura-brown-dark) 0%, var(--sakura-pink-deep) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(244, 114, 182, 0.2);
}

.btn-primary {
  background: var(--btn-gradient);
  color: var(--btn-text);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(244, 114, 182, 0.4);
  filter: brightness(1.05);
}

.btn-primary:active {
  transform: scale(0.95);
}

.btn-secondary {
  background: var(--glass-surface);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--glass-border);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

/* ============================================
   TOGGLE DE TEMA
   ============================================ */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--toggle-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--toggle-icon);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.theme-toggle:hover {
  transform: rotate(30deg) scale(1.1);
  box-shadow: 0 4px 16px rgba(244, 114, 182, 0.25);
}

.theme-toggle:active {
  transform: rotate(60deg) scale(0.95);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform 0.4s ease;
}

/* Ocultar/mostrar iconos según tema */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ============================================
   LOGO CON FAVICON
   ============================================ */
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: color 0.3s ease;
}

.logo:hover {
  color: var(--sakura-pink-deep);
}

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 4px 10px rgba(244, 114, 182, 0.3);
  transition: transform 0.3s ease;
}

.logo:hover .logo-img {
  transform: rotate(-8deg) scale(1.1);
}

/* ============================================
   INPUTS & FORMULARIOS
   ============================================ */
.input-group { margin-bottom: 1.5rem; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sakura-brown);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input[type="file"],
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--input-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--input-border);
  border-radius: 16px;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

input[type="file"]::file-selector-button {
  background: var(--sakura-pink-med);
  color: var(--sakura-brown-dark);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  margin-right: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
  background: var(--sakura-pink-deep);
  color: white;
}

input:focus, textarea:focus {
  background: var(--input-focus-bg);
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 4px var(--input-focus-ring);
}

/* ============================================
   ÁREA DE SUBIDA (DROPZONE)
   ============================================ */
.upload-area {
  border: 2px dashed var(--upload-border);
  border-radius: var(--glass-radius);
  padding: 3rem 2rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  cursor: pointer;
  background: var(--glass-surface);
  backdrop-filter: blur(10px);
}

.upload-area:hover, .upload-area.dragover {
  border-color: var(--upload-hover-border);
  background: var(--upload-hover-bg);
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(244, 114, 182, 0.15);
}

.upload-area-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.upload-area p { color: var(--text-secondary); }
.upload-area strong { color: var(--sakura-brown-dark); }

/* ============================================
   LISTA DE IMÁGENES
   ============================================ */
.image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.image-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--img-item-bg);
  border: 1px solid var(--img-item-border);
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.image-item:hover {
  transform: scale(1.05) rotate(1deg);
  box-shadow: var(--img-item-hover-shadow);
  z-index: 2;
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.image-item:hover img { transform: scale(1.1); }

.image-item .remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 59, 48, 0.9);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.image-item:hover .remove-btn { opacity: 1; transform: scale(1.1); }

/* ============================================
   STATUS & NOTIFICACIONES
   ============================================ */
.status {
  padding: 1rem 1.5rem;
  border-radius: 16px;
  margin: 1rem 0;
  font-size: 0.95rem;
  display: none;
  backdrop-filter: blur(10px);
}

.status.show { display: block; animation: fadeIn 0.4s ease; }

.status.success {
  background: var(--status-success-bg);
  border: 1px solid var(--status-success-border);
  color: var(--status-success-text);
}

.status.error {
  background: var(--status-error-bg);
  border: 1px solid var(--status-error-border);
  color: var(--status-error-text);
}

.status.info {
  background: var(--status-info-bg);
  border: 1px solid var(--status-info-border);
  color: var(--status-info-text);
}

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

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--spinner-track);
  border-top-color: var(--spinner-top);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 1rem auto;
  box-shadow: 0 0 15px rgba(244, 114, 182, 0.3);
}

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

/* ============================================
   HEADER & NAV
   ============================================ */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  background: var(--glass-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.4s ease;
}

.header .nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.header .nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.3s ease;
  position: relative;
}

.header .nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--sakura-pink-deep);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.header .nav-links a:hover { color: var(--sakura-pink-deep); }
.header .nav-links a:hover::after { width: 100%; }

/* Header con botones de acción */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ============================================
   FOOTER - ESTILO SAKURA LIQUID GLASS
   ============================================ */
.footer {
  background: var(--footer-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--footer-border);
  padding: 3rem 2rem 2rem;
  margin-top: 4rem;
  transition: all 0.4s ease;
}

.footer h5 {
  color: var(--footer-heading);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer ul li {
  margin-bottom: 0.75rem;
}

.footer ul li a {
  color: var(--footer-link);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer ul li a:hover {
  color: var(--footer-link-hover);
  transform: translateX(4px);
}

.footer .social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: center;
}

.footer .social-item {
  display: inline-block;
}

.footer .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  overflow: hidden;
}

.footer .social-link:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 20px rgba(244, 114, 182, 0.25);
  border-color: var(--sakura-pink-deep);
}

.footer .social-link img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.footer .social-link:hover img {
  transform: scale(1.15);
}

.footer .copyright {
  color: var(--footer-copyright);
  font-size: 0.85rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--footer-border);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet (768px - 1024px) */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .container {
    padding: 1.5rem;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  .header {
    padding: 1.25rem 1.5rem;
  }
  
  .header .nav-links {
    gap: 1.5rem;
  }
  
  .image-list {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  .footer {
    padding: 2rem 1.5rem 1.5rem;
  }
}

/* Celular Vertical (hasta 767px) */
@media screen and (max-width: 767px) {
  :root {
    --glass-blur: 18px;
    --glass-radius: 24px;
  }
  
  .container {
    padding: 1rem;
  }
  
  .header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .header .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .header-actions {
    width: 100%;
    justify-content: center;
  }
  
  h1 {
    font-size: 2rem;
    text-align: center;
  }
  
  .btn {
    width: 100%;
    padding: 1rem;
  }
  
  .upload-area {
    padding: 2rem 1rem;
  }
  
  .upload-area-icon {
    font-size: 2.5rem;
  }
  
  .image-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .image-item .remove-btn {
    opacity: 1;
    top: 0.25rem;
    right: 0.25rem;
    width: 24px;
    height: 24px;
    font-size: 0.875rem;
  }
  
  .glass-card {
    padding: 1.5rem;
  }
  
  input[type="file"],
  input[type="text"],
  textarea {
    padding: 0.875rem 1.25rem;
  }
  
  .footer {
    padding: 2rem 1rem 1.5rem;
  }
  
  .footer .col-md-3 {
    margin-bottom: 2rem;
  }
  
  .footer .text-md-end {
    text-align: center !important;
  }
  
  .footer .social-icons {
    justify-content: center;
  }
}

/* Celular Horizontal (landscape) */
@media screen and (max-width: 767px) and (orientation: landscape) {
  .container {
    padding: 0.75rem;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  .glass-card {
    padding: 1rem;
  }
  
  .upload-area {
    padding: 1.5rem 1rem;
  }
  
  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Pantallas grandes (1440px+) */
@media screen and (min-width: 1440px) {
  .container {
    max-width: 1400px;
  }
  
  h1 {
    font-size: 4rem;
  }
  
  .glass-card {
    padding: 3rem;
  }
}

/* ============================================
   UTILIDADES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* Scrollbar personalizado */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Selección de texto */
::selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}

/* Focus visible para accesibilidad */
:focus-visible {
  outline: 2px solid var(--sakura-pink-deep);
  outline-offset: 2px;
}

/* Animaciones de entrada */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-up {
  animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ============================================
   MEDIA QUERIES PARA IMPRESIÓN
   ============================================ */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .glass-panel,
  .glass-card {
    background: white;
    border: 1px solid #ccc;
    box-shadow: none;
  }
  
  .btn,
  .upload-area,
  .sakura-container,
  .theme-toggle {
    display: none;
  }
  
  .footer {
    background: white;
    border-top: 1px solid #ccc;
  }
}

/* ============================================
   REDUCED MOTION PREFERENCE
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  body::before {
    animation: none;
  }
  
  .sakura-container {
    display: none;
  }
}

/* ============================================
   ACCESSIBILITY - HIGH CONTRAST
   ============================================ */
@media (prefers-contrast: high) {
  :root {
    --glass-surface: rgba(255, 255, 255, 0.95);
    --glass-border: #000000;
    --text-primary: #000000;
    --text-secondary: #333333;
  }
  
  .glass-panel, .glass-card {
    border-width: 2px;
  }
}

/* ============================================
   DARK MODE PREFERENCE DETECTION
   ============================================ */
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --liquid-bg-start: #1a0a10;
    --liquid-bg-end: #2d1225;
    --glass-surface: rgba(45, 18, 37, 0.65);
    --text-primary: #fce7f3;
    --text-secondary: #f9a8d4;
  }
}

/* ============================================
   ICONOS DE REDES SOCIALES (FIX COLOR)
   ============================================ */
.footer .social-link img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  transition: transform 0.3s ease;
  display: block;
  opacity: 1;
  visibility: visible;
  /* Sin filtro por defecto (modo claro = negro) */
  filter: none;
}

/* Modo CLARO - Iconos NEGROS */
[data-theme="blue-light"] .footer .social-link img,
[data-theme="sakura-light"] .footer .social-link img {
  filter: brightness(0) saturate(100%);
}

/* Modo OSCURO - Iconos BLANCOS */
[data-theme="blue-dark"] .footer .social-link img,
[data-theme="sakura-dark"] .footer .social-link img {
  filter: brightness(0) invert(1);
}

/* Hover - todos los modos */
.footer .social-link:hover img {
  transform: scale(1.15);
}