:root {
  /* PALETA ARGENTINA PODEROSA & AZULADA */
  --bg: #050f16;           /* Azul noche profundo */
  --surface: #0e1a24;      /* Azul grisáceo muy oscuro */
  --surface-light: #1c2b38;/* Para inputs/hovers */
  
  --celeste: #75AADB;      /* Celeste Bandera Vibrante */
  --celeste-dim: rgba(117, 170, 219, 0.2);
  
  --gold: #F4B942;         /* Dorado Sol de Mayo */
  --gold-dark: #b08d00;    
  
  --text: #ffffff;         /* Blanco puro */
  --text-muted: #9abacf;   /* Gris azulado claro */
  
  --radius: 20px;
  --header-height: 85px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; outline: none; }

body {
  font-family: "DM Sans", sans-serif;
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 50% -20%, #153c5e 0%, var(--bg) 60%);
  background-attachment: fixed;
  color: var(--text);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  overflow-x: hidden;
}

.app-container {
  width: 100%;
  max-width: 500px;
  padding: 0 16px 120px 16px;
  position: relative;
}

/* --- HEADER --- */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(5, 15, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin: 0 -16px 0 -16px; padding: 10px 24px;
  display: flex; justify-content: space-between; align-items: center;
  height: var(--header-height);
  border-bottom: 1px solid rgba(117, 170, 219, 0.15);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.brand-container { display: flex; flex-direction: column; }
h1 {
  font-size: 21px; font-weight: 900; margin: 0;
  background: linear-gradient(to right, var(--celeste), #fff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px; text-transform: uppercase;
  filter: drop-shadow(0 0 10px rgba(117,170,219,0.3));
}
.subtitle {
  font-size: 10px; color: var(--gold); text-transform: uppercase; letter-spacing: 1.5px; 
  font-weight: 700; margin-top: 4px; text-shadow: 0 0 10px rgba(244, 185, 66, 0.4);
}
.header-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-right: -2px;
}
.header-icon-box {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(117, 170, 219, 0.3); box-shadow: 0 0 20px rgba(117, 170, 219, 0.15);
  overflow: hidden; padding: 4px; cursor: pointer; text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.header-icon-box:hover {
  transform: translateY(-1px);
  border-color: rgba(117, 170, 219, 0.55);
  box-shadow: 0 0 24px rgba(117, 170, 219, 0.25);
}
.header-icon-img { width: 100%; height: 100%; object-fit: contain; opacity: 0.9; }

.header-profile-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(117, 170, 219, 0.45);
  background: linear-gradient(135deg, rgba(117,170,219,0.26), rgba(15,28,40,0.9));
  box-shadow: 0 0 20px rgba(117, 170, 219, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.6px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  padding: 0;
}

.header-profile-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 185, 66, 0.55);
  box-shadow: 0 0 24px rgba(117, 170, 219, 0.25);
}

.header-profile-btn:active {
  transform: translateY(1px) scale(0.98);
}

.header-profile-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  text-transform: uppercase;
  line-height: 1;
}

/* --- BIG BUTTON --- */
.hero-btn-container {
  display: flex; justify-content: center; margin: 25px 0 25px 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-height: 200px; opacity: 1; transform: scale(1);
}
.hero-btn-container.hidden { max-height: 0; opacity: 0; transform: scale(0.8); margin: 0; overflow: hidden; pointer-events: none; }
.big-btn {
  width: 155px; height: 155px; border-radius: 50%;
  background: linear-gradient(145deg, #1c2b38, #0a141c); color: var(--text);
  border: 3px solid transparent;
  background-image: linear-gradient(#0e1a24, #0e1a24), linear-gradient(to bottom, var(--celeste), #fff, var(--celeste));
  background-origin: border-box; background-clip: padding-box, border-box;
  box-shadow: 0 10px 0 #04080b, 0 20px 40px rgba(0,0,0,0.6), inset 0 0 20px rgba(117, 170, 219, 0.1);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; position: relative; user-select: none;
  animation: pulse-glow 3s infinite ease-in-out;
  overflow: hidden;
}
@keyframes pulse-glow {
  0% { transform: scale(1); box-shadow: 0 10px 0 #04080b, 0 20px 40px rgba(0,0,0,0.6); }
  50% { transform: scale(1.04); box-shadow: 0 10px 0 #04080b, 0 25px 50px rgba(117, 170, 219, 0.35); }
  100% { transform: scale(1); box-shadow: 0 10px 0 #04080b, 0 20px 40px rgba(0,0,0,0.6); }
}
.big-btn:active { animation: none; transform: translateY(10px) scale(0.98); box-shadow: 0 0 0 #04080b, inset 0 4px 20px rgba(0,0,0,0.9), 0 0 20px var(--gold); border-color: var(--gold); }
.big-btn span { display: block; pointer-events: none; }
.big-icon { font-size: 52px; margin-bottom: 6px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5)); }
.big-label { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 1.2px; color: var(--gold); text-shadow: 0 2px 4px rgba(0,0,0,0.8); margin-top: 5px; }

/* Fine, elegant smoke accumulation layer at button ceiling */
.big-btn::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -5%;
  right: -5%;
  height: 35%;
  background: 
    radial-gradient(ellipse 70% 40% at 50% 15%, rgba(255, 255, 255, 0.15) 0%, transparent 80%),
    radial-gradient(ellipse 80% 50% at 35% 25%, rgba(255, 255, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 80% 50% at 65% 25%, rgba(255, 255, 255, 0.08) 0%, transparent 60%),
    linear-gradient(to bottom, 
      rgba(255, 255, 255, 0.12) 0%, 
      rgba(255, 255, 255, 0.06) 25%,
      rgba(255, 255, 255, 0.02) 50%,
      transparent 100%);
  border-radius: 50% 50% 0 0;
  pointer-events: none;
  opacity: 0.7;
  animation: smoke-layer-breathe 8s ease-in-out infinite;
  z-index: 5;
  filter: blur(1.5px);
}

@keyframes smoke-layer-breathe {
  0%, 100% { 
    opacity: 0.55; 
    transform: translateY(0) scaleX(1);
  }
  33% { 
    opacity: 0.75; 
    transform: translateY(-1px) scaleX(1.01);
  }
  66% { 
    opacity: 0.8; 
    transform: translateY(-2px) scaleX(1.02);
  }
}

/* Second fine smoke layer for depth */
.big-btn .smoke-static-layer {
  position: absolute;
  top: 8px;
  left: 10%;
  right: 10%;
  height: 25%;
  background: radial-gradient(ellipse 85% 35% at 50% 0%, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.5;
  animation: smoke-layer-drift 10s ease-in-out infinite;
  z-index: 4;
  filter: blur(2px);
}

@keyframes smoke-layer-drift {
  0%, 100% { transform: translateX(0); opacity: 0.45; }
  50% { transform: translateX(5px); opacity: 0.55; }
}

/* Inner shadow for depth perception */
.big-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 100%, transparent 60%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
  z-index: 6;
}

/* GLOBAL SMOKE CANVAS - Rises from button to top of app */
.global-smoke-canvas {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
}

/* SMOKE EFFECT - OPTIMIZED */
.smoke-particle {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 5px; /* Bigger base size */
  height: 5px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(200, 200, 200, 0.2) 60%, transparent 80%);
  border-radius: 50%;
  filter: blur(3px); /* More blur to blend */
  opacity: 0.2; /* Lower individual opacity */
  margin-left: -2.5px;
  margin-top: -2.5px;
  will-change: transform, opacity; /* Hint for browser optimization */
}

/* MEDIUM smoke - slightly thicker for density */
.smoke-particle.medium {
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(220, 220, 220, 0.15) 60%, transparent 80%);
  filter: blur(4px);
  opacity: 0.25;
  animation: smoke-physics-medium 14s infinite ease-in-out;
  margin-left: -4px;
  margin-top: -4px;
}

/* SMOKE-PHYSICS - Real cigarette smoke with breeze */
@keyframes smoke-physics {
  0% { 
    transform: translate(-50%, 0) scale(0.6); 
    opacity: 0.35;
    filter: blur(1.5px);
  }
  2% { 
    transform: translate(-50%, -15px) scale(0.8); 
    opacity: 0.5;
    filter: blur(1.7px);
  }
  5% { 
    transform: translate(calc(-50% + var(--wave1)), -35px) scale(1) rotate(var(--rot1)); 
    opacity: 0.6;
    filter: blur(1.1px);
  }
  10% { 
    transform: translate(calc(-50% + var(--wave2)), -70px) scale(1.3) rotate(var(--rot2)); 
    opacity: 0.68;
    filter: blur(1.5px);
  }
  15% { 
    transform: translate(calc(-50% + var(--wave3)), -110px) scale(1.7) rotate(var(--rot3)); 
    opacity: 0.72;
    filter: blur(2px);
  }
  20% { 
    transform: translate(calc(-50% + var(--wave4)), -160px) scale(2.2) rotate(var(--rot4)); 
    opacity: 0.74;
    filter: blur(2.6px);
  }
  25% { 
    transform: translate(calc(-50% + var(--wave5)), -220px) scale(2.7) rotate(var(--rot5)); 
    opacity: 0.74;
    filter: blur(3.2px);
  }
  30% { 
    transform: translate(calc(-50% + var(--wave6)), -290px) scale(3.3) rotate(var(--rot6)); 
    opacity: 0.72;
    filter: blur(3.8px);
  }
  35% { 
    transform: translate(calc(-50% + var(--drift) * 0.1 + var(--wave7)), -370px) scale(3.9, 2.8) rotate(var(--rot7)); 
    opacity: 0.68;
    filter: blur(4.4px);
  }
  40% { 
    transform: translate(calc(-50% + var(--drift) * 0.2 + var(--wave8)), -450px) scale(4.5, 3.2) rotate(var(--rot8)); 
    opacity: 0.64;
    filter: blur(5px);
  }
  45% { 
    transform: translate(calc(-50% + var(--drift) * 0.3 + var(--wave9)), -530px) scale(5.2, 3.7) rotate(var(--rot9)); 
    opacity: 0.58;
    filter: blur(5.6px);
  }
  50% { 
    transform: translate(calc(-50% + var(--drift) * 0.4), -600px) scale(5.8, 4) rotate(0deg); 
    opacity: 0.54;
    filter: blur(6.2px);
  }
  55% { 
    transform: translate(calc(-50% + var(--drift) * 0.5 + var(--wave10)), -660px) scale(6.5, 4.3) rotate(var(--rot10)); 
    opacity: 0.48;
    filter: blur(6.8px);
  }
  60% { 
    transform: translate(calc(-50% + var(--drift) * 0.6 + var(--wave11)), -710px) scale(7.2, 4.6) rotate(var(--rot11)); 
    opacity: 0.42;
    filter: blur(7.4px);
  }
  65% { 
    transform: translate(calc(-50% + var(--drift) * 0.7 + var(--wave12)), -750px) scale(8, 5) rotate(var(--rot12)); 
    opacity: 0.36;
    filter: blur(8px);
  }
  70% { 
    transform: translate(calc(-50% + var(--drift) * 0.8), -780px) scale(8.8, 5.2) rotate(0deg); 
    opacity: 0.3;
    filter: blur(8.6px);
  }
  75% { 
    transform: translate(calc(-50% + var(--drift) * 0.9 + var(--wave13)), -800px) scale(9.6, 5.5) rotate(var(--rot13)); 
    opacity: 0.24;
    filter: blur(9.2px);
  }
  80% { 
    transform: translate(calc(-50% + var(--drift) * 1.0), -820px) scale(10.5, 5.8) rotate(0deg); 
    opacity: 0.18;
    filter: blur(9.8px);
  }
  85% { 
    transform: translate(calc(-50% + var(--drift) * 1.1), -840px) scale(11.2, 6) rotate(0deg); 
    opacity: 0.12;
    filter: blur(10.2px);
  }
  90% { 
    transform: translate(calc(-50% + var(--drift) * 1.2), -860px) scale(12, 6.3) rotate(0deg); 
    opacity: 0.07;
    filter: blur(10.8px);
  }
  95% { 
    transform: translate(calc(-50% + var(--drift) * 1.3), -880px) scale(12.8, 6.5) rotate(0deg); 
    opacity: 0.03;
    filter: blur(11.2px);
  }
  100% { 
    transform: translate(calc(-50% + var(--drift) * 1.4), -900px) scale(13.5, 6.8) rotate(0deg); 
    opacity: 0;
    filter: blur(11.8px);
  }
}

/* MEDIUM smoke - slightly thicker for density */
.smoke-particle.medium {
  width: 2px;
  height: 2px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(240, 240, 240, 0.5) 40%, transparent 75%);
  filter: blur(1.5px);
  opacity: 0.38;
  animation: smoke-physics-medium 14s infinite ease-in-out;
}

@keyframes smoke-physics-medium {
  0% { transform: translate(-50%, 0) scale(0.6); opacity: 0.4; filter: blur(1.4px); }
  2% { transform: translate(-50%, -15px) scale(0.8); opacity: 0.52; filter: blur(1.6px); }
  5% { transform: translate(calc(-50% + var(--wave1)), -35px) scale(1) rotate(var(--rot1)); opacity: 0.62; filter: blur(1px); }
  10% { transform: translate(calc(-50% + var(--wave2)), -70px) scale(1.3) rotate(var(--rot2)); opacity: 0.7; filter: blur(1.4px); }
  15% { transform: translate(calc(-50% + var(--wave3)), -110px) scale(1.7) rotate(var(--rot3)); opacity: 0.74; filter: blur(2px); }
  20% { transform: translate(calc(-50% + var(--wave4)), -160px) scale(2.2) rotate(var(--rot4)); opacity: 0.76; filter: blur(2.6px); }
  25% { transform: translate(calc(-50% + var(--wave5)), -220px) scale(2.8) rotate(var(--rot5)); opacity: 0.76; filter: blur(3.2px); }
  30% { transform: translate(calc(-50% + var(--wave6)), -290px) scale(3.4) rotate(var(--rot6)); opacity: 0.74; filter: blur(3.8px); }
  35% { transform: translate(calc(-50% + var(--drift) * 0.1 + var(--wave7)), -370px) scale(4, 2.9) rotate(var(--rot7)); opacity: 0.7; filter: blur(4.4px); }
  40% { transform: translate(calc(-50% + var(--drift) * 0.2 + var(--wave8)), -450px) scale(4.6, 3.3) rotate(var(--rot8)); opacity: 0.66; filter: blur(5px); }
  45% { transform: translate(calc(-50% + var(--drift) * 0.3 + var(--wave9)), -530px) scale(5.3, 3.8) rotate(var(--rot9)); opacity: 0.6; filter: blur(5.6px); }
  50% { transform: translate(calc(-50% + var(--drift) * 0.4), -600px) scale(5.9, 4.1) rotate(0deg); opacity: 0.56; filter: blur(6.2px); }
  55% { transform: translate(calc(-50% + var(--drift) * 0.5 + var(--wave10)), -660px) scale(6.6, 4.4) rotate(var(--rot10)); opacity: 0.5; filter: blur(6.8px); }
  60% { transform: translate(calc(-50% + var(--drift) * 0.6 + var(--wave11)), -710px) scale(7.3, 4.7) rotate(var(--rot11)); opacity: 0.44; filter: blur(7.4px); }
  65% { transform: translate(calc(-50% + var(--drift) * 0.7 + var(--wave12)), -750px) scale(8.1, 5.1) rotate(var(--rot12)); opacity: 0.38; filter: blur(8px); }
  70% { transform: translate(calc(-50% + var(--drift) * 0.8), -780px) scale(8.9, 5.3) rotate(0deg); opacity: 0.32; filter: blur(8.6px); }
  75% { transform: translate(calc(-50% + var(--drift) * 0.9 + var(--wave13)), -800px) scale(9.7, 5.6) rotate(var(--rot13)); opacity: 0.26; filter: blur(9.2px); }
  80% { transform: translate(calc(-50% + var(--drift) * 1.0), -820px) scale(10.6, 5.9) rotate(0deg); opacity: 0.2; filter: blur(9.8px); }
  85% { transform: translate(calc(-50% + var(--drift) * 1.1), -840px) scale(11.3, 6.1) rotate(0deg); opacity: 0.14; filter: blur(10.2px); }
  90% { transform: translate(calc(-50% + var(--drift) * 1.2), -860px) scale(12.1, 6.4) rotate(0deg); opacity: 0.08; filter: blur(10.8px); }
  95% { transform: translate(calc(-50% + var(--drift) * 1.3), -880px) scale(12.9, 6.6) rotate(0deg); opacity: 0.03; filter: blur(11.2px); }
  100% { transform: translate(calc(-50% + var(--drift) * 1.4), -900px) scale(13.6, 6.9) rotate(0deg); opacity: 0; filter: blur(11.8px); }
}

/* --- TABS --- */
/* --- NAVIGATION BAR (MODERN BOTTOM NAV) --- */
.segmented-control {
  position: fixed; 
  bottom: 10px; 
  left: 50%; 
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 468px;
  z-index: 1000;
  display: flex; 
  background: rgba(14, 26, 36, 0.9); 
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 6px 6px; 
  border-radius: 30px; 
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.6); 
  justify-content: space-around;
  align-items: center;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.segmented-control.hidden { 
  transform: translate(-50%, 150%); 
  opacity: 0; 
  pointer-events: none; 
}
.segment-btn {
  flex: 1; 
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0; 
  font-size: 9px; 
  font-weight: 700; 
  color: var(--text-muted);
  border-radius: 20px; 
  background: transparent; 
  transition: all 0.3s ease; 
  border: none; 
  cursor: pointer; 
  white-space: nowrap;
  position: relative;
}
.segment-btn .nav-icon {
  font-size: 20px;
  margin-bottom: 2px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
}
.segment-btn.selected { 
  color: var(--celeste); 
}
.segment-btn.selected .nav-icon {
  transform: translateY(-5px) scale(1.1);
  filter: drop-shadow(0 0 10px rgba(117, 170, 219, 0.4));
}
.segment-btn::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  background: var(--celeste);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s ease;
  transform: scale(0);
}
.segment-btn.selected::after {
  opacity: 1;
  transform: scale(1);
}
.segment-btn:active { transform: scale(0.9); }

/* --- CARDS & COMMON --- */
.item {
  background: var(--surface); 
  border-radius: 16px; 
  padding: 8px 14px; 
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4); 
  border: 1px solid rgba(255,255,255,0.05);
  position: relative; 
  overflow: hidden; 
  transition: all 0.2s ease;
  will-change: transform;
}
.item:active { background: var(--surface-light); transform: scale(0.98); }
.item::before { 
  content: ''; 
  position: absolute; 
  left: 0; top: 0; bottom: 0; 
  width: 5px; 
  background: linear-gradient(to bottom, var(--celeste) 30%, #fff 50%, var(--celeste) 70%); 
}

.pena-header { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
}

.thumb { 
  width: 52px; 
  height: 52px; 
  border-radius: 50%; 
  object-fit: cover; 
  background: #000; 
  color: var(--gold);
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 18px;
  border: 2px solid #000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  padding: 0;
}
.thumb img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  border-radius: 50%;
  display: block;
}

.pena-info { flex: 1; min-width: 0; }
.pena-info strong { 
  display: block; 
  font-size: 15px; 
  margin-bottom: 1px; 
  color: #fff; 
  letter-spacing: 0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pena-date { 
  font-size: 11px; 
  color: var(--text-muted); 
  font-weight: 500; 
  display:flex; 
  align-items:center; 
  gap:4px;
  opacity: 0.7;
}

.action-icon { 
  color: var(--text-muted); 
  padding: 6px; 
  border-radius: 10px; 
  background: rgba(255,255,255,0.03); 
  font-size: 12px;
  cursor: pointer; 
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.05);
}
.item:active { background: var(--surface-light); transform: scale(0.98); }
.item::before { 
  content: ''; 
  position: absolute; 
  left: 0; top: 0; bottom: 0; 
  width: 6px; 
  background: linear-gradient(to bottom, var(--celeste) 30%, #fff 50%, var(--celeste) 70%); 
}

.pena-header { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
}

.thumb { 
  width: 60px; 
  height: 60px; 
  border-radius: 16px; 
  object-fit: cover; 
  background: #000; 
  color: var(--gold);
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 20px;
  border: 2px solid #000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  padding: 0;
}
.thumb img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  border-radius: 14px;
  display: block;
}
.thumb img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  border-radius: 8px;
  display: block;
}
/* Brillo sutil sobre la foto */
.thumb::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.pena-info { flex: 1; min-width: 0; }
.pena-info strong { 
  display: block; 
  font-size: 16px; 
  margin-bottom: 2px; 
  color: #fff; 
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pena-date { 
  font-size: 12px; 
  color: var(--text-muted); 
  font-weight: 500; 
  display:flex; 
  align-items:center; 
  gap:4px;
  opacity: 0.8;
}

.action-icon { 
  color: var(--text-muted); 
  padding: 8px; 
  border-radius: 12px; 
  background: rgba(255,255,255,0.03); 
  font-size: 16px; 
  cursor: pointer; 
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.05);
}
.pena-detail { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.05); animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(-10px)} to{opacity:1;transform:translateY(0)} }
.detail-section { margin-top: 12px; font-size: 15px; color: #d0d0d0; line-height: 1.5; }
.detail-label { color: var(--celeste); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 6px; }

/* INPUTS & FORMS */
.form-header-row { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.btn-back-circle {
  background: rgba(117, 170, 219, 0.1); border: 1px solid rgba(117, 170, 219, 0.2); color: var(--celeste);
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; transition: all 0.2s;
}
.btn-back-circle:active { background: var(--celeste); color: #000; }
.form-group { margin-bottom: 26px; text-align: left; }
.form-label { display: block; font-size: 11px; color: var(--gold); margin-bottom: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
input, select {
  width: 100%; padding: 18px; background: var(--surface-light); border: 2px solid transparent;
  border-radius: 16px; color: #fff; font-size: 16px; font-family: inherit; transition: all 0.2s;
}
input:focus, select:focus { border-color: var(--celeste); background: #26384a; box-shadow: 0 0 15px var(--celeste-dim); }
select.pena-selector, input.pena-selector {
  padding: 8px 12px; font-size: 13px;
}
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
.chips-container { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.chip {
  padding: 10px 20px; background: rgba(255,255,255,0.05); border-radius: 50px;
  font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer;
  border: 1px solid transparent; transition: all 0.2s; user-select: none;
}
.chip.selected { background: var(--celeste); color: #000; border-color: var(--celeste); font-weight: 700; box-shadow: 0 0 15px var(--celeste-dim); }
.chip.split-chip { padding: 8px 14px; font-size: 13px; border:1px solid rgba(255,255,255,0.1); } 

.btn-small { width: 48px; background: var(--surface-light); color: var(--gold); font-size: 24px; border-radius: 14px; border:none; cursor: pointer; display:flex; align-items:center; justify-content:center; }
.legal-open-text-btn {
  margin-top: 10px;
  padding: 8px 12px;
  min-height: 34px;
  width: auto;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(117, 170, 219, 0.35);
  background: rgba(117, 170, 219, 0.12);
  color: var(--celeste);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.upload-box { border: 2px dashed rgba(117, 170, 219, 0.3); border-radius: 16px; padding: 30px; text-align: center; color: var(--text-muted); cursor: pointer; background: rgba(0,0,0,0.2); transition: all 0.2s; }
.form-footer { display: flex; gap: 16px; margin-top: 40px; }
.btn-main { flex: 1; padding: 18px; border-radius: 16px; font-weight: 700; font-size: 16px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform 0.2s; }
.btn-main:active { transform: scale(0.97); }
.btn-cancel { background: transparent; color: #ff6b6b; border: 1px solid rgba(255, 107, 107, 0.3); }
.btn-save { background: linear-gradient(135deg, var(--celeste), #3a82c4); color: #000; box-shadow: 0 8px 20px rgba(58, 130, 196, 0.3); }

/* EDITOR PHOTO PREVIEW */
.preview-wrapper { position: relative; width: 100%; aspect-ratio: 1; }
.btn-delete-photo {
    position: absolute; top: 4px; right: 4px;
    background: rgba(0,0,0,0.6); color: #ff6b6b;
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 14px; font-weight: bold;
    border: 1px solid rgba(255,255,255,0.2);
}

/* STATS */
/* Stats Slicers */
.stats-slicers {
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid rgba(117,170,219,0.2);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 20px;
}
.stats-slicers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 700px) {
  .stats-slicers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-slicer-attendees { grid-column: 1 / -1; }
}
.stats-slicer-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 5px;
  font-weight: 700;
}
.stats-slicer-input {
  width: 100%;
  margin: 0;
  height: 38px;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 8px;
  padding: 0 10px;
  box-sizing: border-box;
  color-scheme: dark;
}
.stats-slicer-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(244,185,66,0.2);
}
.stats-slicer-dropdown {
  position: relative;
  cursor: pointer;
}
.stats-slicer-dropdown summary {
  list-style: none;
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 10px;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
}
.stats-slicer-dropdown summary::-webkit-details-marker { display: none; }
.stats-slicer-dropdown[open] summary {
  border-color: var(--gold);
  border-radius: 8px 8px 0 0;
}
.stats-slicer-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 5;
  background: #1c2b38;
  border: 1px solid rgba(117,170,219,0.3);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.stats-attendee-toolbar {
  display: flex;
  gap: 6px;
  padding: 8px;
}
.stats-attendee-toolbar button {
  flex: 1;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  cursor: pointer;
}
.stats-attendee-toolbar button:hover {
  background: rgba(255,255,255,0.1);
}
.stats-slicer-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 0 8px;
}
.stats-slicer-list {
  max-height: 190px;
  overflow-y: auto;
  padding: 6px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.stats-attendee-chip {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.stats-attendee-chip.selected {
  background: rgba(117,170,219,0.22);
  border-color: var(--celeste);
  color: #fff;
}
.stats-attendee-chip:hover {
  border-color: var(--celeste);
}

.stats-header { margin: 30px 0 15px 0; color: var(--gold); text-transform: uppercase; letter-spacing: 2px; font-size: 14px; font-weight: 800; text-align: center; border-bottom: 1px solid rgba(244, 185, 66, 0.2); padding-bottom: 8px; }
.stat-row { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; padding: 8px 12px; background: rgba(255,255,255,0.03); border-radius: 12px; animation: fadeIn 0.5s ease; border-left: 3px solid transparent; }
.stat-row.top-rank { border-left-color: var(--gold); background: linear-gradient(90deg, rgba(244, 185, 66, 0.05), transparent); }
.stat-bar-track { flex: 1; height: 10px; background: rgba(0,0,0,0.3); border-radius: 100px; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); }
.stat-bar-fill { height: 100%; background: linear-gradient(90deg, var(--celeste), #fff); border-radius: 100px; box-shadow: 0 0 10px var(--celeste-dim); transition: width 1s ease; }

.stats-linechart-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 8px 6px 4px 6px;
  box-shadow: inset 0 0 24px rgba(117, 170, 219, 0.08);
}

.stats-linechart-svg {
  width: 100%;
  height: 210px;
  display: block;
}

.stats-linechart-grid {
  stroke: rgba(255,255,255,0.1);
  stroke-width: 1;
}

.stats-linechart-y-label {
  fill: var(--text-muted);
  font-size: 10px;
  text-anchor: end;
}

.stats-linechart-x-label {
  fill: var(--text-muted);
  font-size: 10px;
  text-anchor: middle;
}

.stats-linechart-area {
  fill: rgba(117, 170, 219, 0.16);
}

.stats-linechart-line {
  fill: none;
  stroke: var(--celeste);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(117, 170, 219, 0.35));
}

.stats-linechart-dot {
  fill: var(--celeste);
  stroke: var(--gold);
  stroke-width: 1.5;
}

.stats-linechart-max {
  fill: var(--gold);
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
}

/* TABLA TRUCO DETALLE COMPACTA */
.truco-mini-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}
.truco-mini-table th {
  text-align: left;
  padding: 6px 12px;
  background: rgba(117, 170, 219, 0.12);
  color: var(--celeste);
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 1px;
  font-weight: 900;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.truco-mini-table td {
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-muted);
  font-size: 13px;
}
.truco-mini-table tr:last-child td { border-bottom: none; }
.truco-mini-table .player-name { color: #fff; font-weight: 700; }
.truco-mini-table .stat-total { font-weight: 700; color: rgba(255,255,255,0.6); }
.truco-mini-table .stat-win { color: var(--gold); font-weight: 800; }
.truco-mini-table .stat-loss { color: #ff6b6b; font-weight: 600; opacity: 0.9; }

/* TRUCO STYLES */
.truco-container { animation: fadeIn 0.4s ease; min-height: calc(100dvh - var(--header-height) - 171px); display: flex; flex-direction: column; }
.truco-board { display: flex; gap: 8px; justify-content: center; margin-top: 8px; flex: 1; min-height: 0; }
.truco-col { flex: 1; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; align-items: center; min-height: 0; }
.truco-title-row { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.truco-header { font-size: 14px; font-weight: 800; color: var(--gold); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 0; text-align: center; height: 26px; display:flex; align-items:center; }
.truco-points-badge { min-width: 44px; height: 32px; padding: 0 10px; border-radius: 12px; background: rgba(117,170,219,0.18); border: 2px solid rgba(117,170,219,0.35); color: var(--celeste); font-size: 18px; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 10px rgba(117, 170, 219, 0.2); }
.truco-points-badge.is-buenas { color: var(--gold); border-color: rgba(244,185,66,0.6); background: rgba(244,185,66,0.2); box-shadow: 0 0 12px rgba(244, 185, 66, 0.25); }
.fosforos-area { width: 100%; flex: 1; min-height: 0; overflow: hidden; background: rgba(0,0,0,0.2); border-radius: 12px; margin-bottom: 0; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; padding: 6px 4px; gap: 1px; position: relative; }
.fosforo-group { width: 60px; height: 60px; flex-shrink: 0; }
.buenas-divider { width: 80%; height: 2px; background-color: rgba(255,255,255,0.3); margin: 2px 0; position: relative; }
.truco-controls { display: flex; width: 100%; gap: 6px; margin-top: -32px; position: relative; z-index: 2; }
.btn-score { flex: 1; height: 37px; border-radius: 12px; border: none; cursor: pointer; font-size: 17px; font-weight: bold; }
.truco-start-btn {
  width: 100%;
  margin-top: 20px;
  flex: 0 0 52px;
  height: 52px;
  min-height: 52px;
  padding: 0 16px;
  font-size: 16px;
}
.truco-local-btn {
  width: 100%;
  margin-top: 8px;
  flex: 0 0 38px;
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 430px) {
  .truco-container { min-height: calc(100dvh - var(--header-height) - 161px); }
  .fosforo-group { width: 56px; height: 56px; }
}
.btn-plus { background: var(--surface-light); color: var(--celeste); border: 1px solid rgba(117,170,219,0.2); }
.btn-minus { background: var(--surface); color: var(--text-muted); }

/* RULES */
.rule-title { color: var(--gold); font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px; }
.rule-content { font-size: 15px; line-height: 1.6; color: #e0e0e0; }
.rule-link { color: var(--celeste); text-decoration: none; border-bottom: 1px solid rgba(117,170,219,0.5); }

/* LOGIN */
#login { position: fixed; inset: 0; background: #050f16; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; background-image: radial-gradient(circle at 50% 30%, #153c5e 0%, #000 70%); }
.login-card { width: 100%; max-width: 320px; text-align: center; animation: fadeIn 0.8s ease; }
.login-input { text-align: center; letter-spacing: 8px; font-size: 32px; font-weight: 700; margin-bottom: 30px; background: rgba(0,0,0,0.4); border-color: var(--gold); color: var(--gold); height: 70px; border-radius: 20px; }

.social-login-btn {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 0;
}

.social-login-btn:active { transform: scale(0.98); }
.social-login-btn:hover { filter: brightness(1.03); }

.social-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.social-facebook {
  background: linear-gradient(135deg, #1877f2, #0f5bc2);
  color: #fff;
  border-color: rgba(24,119,242,0.7);
  box-shadow: 0 8px 18px rgba(24,119,242,0.3);
}

.social-facebook .social-icon {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.social-google {
  margin-top: 12px;
  background: #ffffff;
  color: #111827;
  border-color: rgba(255,255,255,0.65);
  box-shadow: 0 8px 18px rgba(0,0,0,0.2);
}

.social-google .social-icon {
  background: #ffffff;
}

/* LOGIN LOGO EFFECTS */
.login-logo-container {
  width: 220px; 
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px auto;
  position: relative;
}

.login-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Visual Effect: Inactive, Ethereal */
  filter: grayscale(100%) opacity(0.8) drop-shadow(0 0 15px rgba(117, 170, 219, 0.3));
  /* Animation: Gentle Floating */
  animation: logo-float 6s ease-in-out infinite;
  will-change: transform;
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* UTILS & GASTOS */
.spinner { width: 22px; height: 22px; border: 3px solid rgba(0,0,0,0.1); border-top-color: #000; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to {transform: rotate(360deg);} }
.gasto-item { display:flex; justify-content:space-between; align-items:center; background:rgba(255,255,255,0.03); padding:12px; border-radius:12px; margin-bottom:8px; border:1px solid rgba(255,255,255,0.05); }

/* MODAL & LIGHTBOX */
.modal { 
  position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 10000; 
  display: none; align-items: center; justify-content: center; backdrop-filter: blur(10px);
  will-change: opacity;
}
.modal.active { display: flex; }
.modal-content { 
  position: relative; width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; touch-action: pan-y; 
}
.modal-main { 
  flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; 
  position: relative; overflow: hidden;
}
.modal-img { 
  max-width: 100%; max-height: 100%; border-radius: 8px; 
  box-shadow: 0 0 60px rgba(0,0,0,0.8); transition: transform 0.3s ease, opacity 0.3s ease;
  object-fit: contain; cursor: zoom-in;
  will-change: transform, opacity;
}
.modal-img.zoomed { transform: scale(2); cursor: zoom-out; }
.modal-nav { display: none; }

.modal-thumbs-container {
  width: 100%; padding: 12px 0; background: linear-gradient(transparent, rgba(0,0,0,0.8));
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.modal-thumb {
  width: 50px; height: 50px; border-radius: 8px; object-fit: cover;
  cursor: pointer; border: 2px solid transparent; opacity: 0.5;
  transition: all 0.2s ease; 
}
.modal-thumb:hover { opacity: 0.8; transform: scale(1.05); }
.modal-thumb.active { border-color: var(--celeste); opacity: 1; transform: scale(1.1); box-shadow: 0 0 15px var(--celeste-dim); }

.modal-counter {
  position: absolute; top: 80px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.6); color: white; padding: 6px 16px;
  border-radius: 20px; font-size: 13px; font-weight: 600;
  backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.1);
}

.modal-close { 
  position: absolute; top: 20px; right: 20px; font-size: 28px; color: #fff; 
  cursor: pointer; z-index: 10002; padding: 12px; opacity: 0.7;
  background: rgba(0,0,0,0.3); border-radius: 50%; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; border: 1px solid rgba(255,255,255,0.1);
}
.modal-close:hover { opacity: 1; background: rgba(0,0,0,0.5); transform: scale(1.1); }

.modal-actions-btn {
  position: absolute;
  top: 20px;
  right: 76px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 10002;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: all 0.2s;
}

.modal-actions-btn:hover {
  opacity: 1;
  background: rgba(0,0,0,0.5);
  transform: scale(1.1);
}

.modal-back-btn { 
  position: absolute; top: 20px; left: 20px; background: rgba(0,0,0,0.3); 
  border: 1px solid rgba(255,255,255,0.1); padding: 10px 18px; border-radius: 25px; 
  color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; z-index: 10002; 
  display: flex; align-items: center; gap: 6px; backdrop-filter: blur(4px); transition: all 0.2s;
}
.modal-back-btn:hover { background: rgba(255,255,255,0.15); }

/* TICKET GASTOS */
#ticketResult { background: linear-gradient(135deg, #1c2b38, #0e1a24); border-radius: 20px; padding: 25px; border: 1px solid var(--gold); box-shadow: 0 10px 40px rgba(0,0,0,0.6); position: relative; overflow: hidden; }
#ticketResult::before { content: ''; position: absolute; top: -50px; right: -50px; width: 100px; height: 100px; background: var(--celeste); opacity: 0.1; border-radius: 50%; filter: blur(40px); }
.ticket-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 20px; opacity: 0.5; }

/* GALERIA CARROUSEL (TIPO INSTAGRAM) */
.gallery-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 0 20px 0;
  margin-top: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  justify-content: flex-start;
  align-items: center;
}
.gallery-grid::-webkit-scrollbar { display: none; }

.gallery-img {
  width: 100%; /* Ocupa todo el ancho */
  min-width: 100%; /* Asegura que solo se vea una */
  height: auto;
  aspect-ratio: 1 / 1; /* Cuadradas para que se luzcan uniformes */
  object-fit: cover;
  border-radius: 20px;
  cursor: pointer;
  flex-shrink: 0;
  border: 1.5px solid rgba(117, 170, 219, 0.4);
  box-shadow: 0 10px 25px rgba(0,0,0,0.7);
  transition: transform 0.2s ease;
  scroll-snap-align: center; /* Centrado magnético */
  scroll-snap-stop: always; /* Evita que salte varias fotos de una */
}

/* PUNTOS INDICADORES CARROUSEL */
.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  padding-bottom: 10px;
}
.gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}
.gallery-dot.active {
  background: var(--celeste);
  transform: scale(1.3);
  box-shadow: 0 0 8px var(--celeste-dim);
}

/* GALERIA GLOBAL (TIPO INSTAGRAM) */
.gallery-header { padding: 12px 8px 8px; text-align: center; }
.gallery-title { margin: 0; font-size: 22px; color: var(--gold); font-weight: 800; letter-spacing: 1px; }
.gallery-subtitle { display: block; font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.gallery-global-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  padding: 8px 0 24px;
}

.gallery-loading,
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.gallery-global-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface-light);
}

.gallery-global-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.gallery-global-item:hover .gallery-global-img,
.gallery-global-item:active .gallery-global-img {
  transform: scale(1.05);
  filter: brightness(0.85);
}

.gallery-global-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 50%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.gallery-global-item:hover .gallery-global-overlay,
.gallery-global-item:active .gallery-global-overlay {
  opacity: 1;
}

.gallery-global-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gallery-global-pena {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-global-fecha {
  color: rgba(255,255,255,0.8);
  font-size: 11px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

@media (min-width: 480px) {
  .gallery-global-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
  }
}

@media (min-width: 768px) {
  .gallery-global-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
  }
}

@media (min-width: 1100px) {
  .gallery-global-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
  }
}

/* CIGARETTE TIP GLOW */
.cigarette-glow {
  position: fixed;
  width: 2px; /* Much smaller, precise tip */
  height: 2px;
  background: #ff5722; /* Deep orange-red hot core */
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  /* Tighter, more intense glow, less diffuse */
  box-shadow: 
    0 0 2px #ff3d00, 
    0 0 5px rgba(255, 87, 34, 0.8),
    0 0 8px rgba(255, 152, 0, 0.4); 
  /* Slow, organic smoldering pulse instead of candle flicker */
  animation: cigarette-smolder 4s infinite ease-in-out;
  display: none;
  filter: blur(0.2px); /* Less blur for definition */
  transform: translate(-50%, -50%);
  opacity: 0.9;
}

@keyframes cigarette-smolder {
  0% { 
    transform: translate(-50%, -50%) scale(1); 
    opacity: 0.85;
    background: #ff5722; /* Deep orange-red */
    box-shadow: 0 0 2px #ff3d00, 0 0 4px rgba(255, 87, 34, 0.6);
  }
  25% {
    transform: translate(-50%, -50%) scale(1.05); 
    opacity: 0.9;
    background: #ff7043; /* Lighter orange */
    box-shadow: 0 0 3px #ff5722, 0 0 5px rgba(255, 112, 67, 0.6);
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.15); 
    opacity: 1; /* Hottest moment */
    background: #ffc107; /* Yellow-Amber hot core */
    box-shadow: 0 0 3px #ffeb3b, 0 0 6px #ff9800, 0 0 10px rgba(255, 87, 34, 0.6);
  }
  75% {
    transform: translate(-50%, -50%) scale(1.05); 
    opacity: 0.95;
    background: #ff7043;
    box-shadow: 0 0 3px #ff5722, 0 0 5px rgba(255, 112, 67, 0.6);
  }
  100% { 
    transform: translate(-50%, -50%) scale(1); 
    opacity: 0.85;
    background: #ff5722;
    box-shadow: 0 0 2px #ff3d00, 0 0 4px rgba(255, 87, 34, 0.6);
  }
}

/* --- SWEETALERT DELICADO --- */
.swal-delicate-popup {
  background:
    radial-gradient(120% 95% at 0% 0%, rgba(117, 170, 219, 0.2) 0%, rgba(117, 170, 219, 0) 45%),
    linear-gradient(165deg, rgba(22, 43, 61, 0.97) 0%, rgba(16, 30, 42, 0.97) 100%) !important;
  border: 1px solid rgba(117, 170, 219, 0.26);
  border-radius: 24px !important;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(117, 170, 219, 0.1) inset !important;
}
.swal-delicate-title {
  font-size: 19px !important;
  font-weight: 800 !important;
  color: var(--gold) !important;
  letter-spacing: 0.35px;
  padding-top: 10px !important;
}
.swal-delicate-content {
  font-size: 14px !important;
  color: var(--text-muted) !important;
  line-height: 1.45 !important;
}
.swal-delicate-btn {
  padding: 10px 20px !important;
  min-height: 42px;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  letter-spacing: 0.2px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(117, 170, 219, 0.35) !important;
  background-image: linear-gradient(145deg, #7fb8eb 0%, #4f8fc8 100%) !important;
  color: #06121b !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24), 0 1px 0 rgba(255, 255, 255, 0.22) inset !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, border-color 0.2s ease !important;
}

.swal-delicate-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.3) inset !important;
}

.swal-delicate-btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.swal-delicate-btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(117, 170, 219, 0.34), 0 10px 20px rgba(0, 0, 0, 0.24) !important;
}

.swal2-confirm.swal-delicate-btn {
  background-image: linear-gradient(145deg, #86c2f8 0%, #5a9ad4 100%) !important;
  color: #06121b !important;
  border-color: rgba(148, 201, 247, 0.5) !important;
}

.swal2-actions {
  gap: 10px !important;
  margin-top: 16px !important;
}

.swal2-input,
.swal2-select,
.swal2-textarea {
  border: 1px solid rgba(117, 170, 219, 0.24) !important;
  background: rgba(10, 20, 29, 0.55) !important;
  color: #eaf3fb !important;
}

.swal2-input:focus,
.swal2-select:focus,
.swal2-textarea:focus {
  border-color: rgba(117, 170, 219, 0.56) !important;
  box-shadow: 0 0 0 3px rgba(117, 170, 219, 0.18) !important;
}

.swal2-cancel.swal-delicate-btn {
  background-image: linear-gradient(145deg, rgba(62, 83, 99, 0.95) 0%, rgba(41, 58, 70, 0.95) 100%) !important;
  color: #d7e7f6 !important;
  border-color: rgba(117, 170, 219, 0.28) !important;
}

.swal2-deny.swal-delicate-btn {
  background-image: linear-gradient(145deg, #ff9b9b 0%, #e25e5e 100%) !important;
  color: #2f1111 !important;
  border-color: rgba(255, 133, 133, 0.44) !important;
}

.swal-delicate-btn-danger {
  background-image: linear-gradient(145deg, #ff8b8b 0%, #d84747 100%) !important;
  color: #2f1111 !important;
  border-color: rgba(255, 130, 130, 0.45) !important;
}

.swal2-actions-custom {
  display: flex !important;
  align-items: stretch;
  justify-content: center;
  gap: 8px !important;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.swal2-actions-custom .swal2-styled {
  flex: 1 1 0 !important;
  min-height: 44px !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.swal2-select-custom {
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 10px 0 !important;
  height: 44px;
  padding: 0 44px 0 14px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(117, 170, 219, 0.36) !important;
  background-color: rgba(12, 24, 34, 0.9) !important;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--celeste) 50%),
    linear-gradient(135deg, var(--celeste) 50%, transparent 50%),
    linear-gradient(160deg, rgba(117, 170, 219, 0.14), rgba(117, 170, 219, 0.04)) !important;
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px),
    center !important;
  background-size: 6px 6px, 6px 6px, 100% 100% !important;
  background-repeat: no-repeat !important;
  color: #e8f3fb !important;
  font-size: 13px !important;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
}

.swal2-select-custom:focus {
  border-color: rgba(117, 170, 219, 0.58) !important;
  box-shadow: 0 0 0 3px rgba(117, 170, 219, 0.2) !important;
}

.swal2-select-custom option {
  color: #e8f3fb;
  background: #132534;
}

.swal-deny-btn-custom {
  min-width: 0 !important;
}

.swal-toast-popup {
  border-radius: 14px !important;
  padding: 10px 14px !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(117, 170, 219, 0.16) inset !important;
}

.swal-toast-title {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #eaf3fb !important;
  letter-spacing: 0.2px;
}
.swal2-icon {
  transform: scale(0.7) !important;
  margin-top: 10px !important;
  margin-bottom: 0 !important;
}

.swal-profile-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.swal-profile-actions button {
  width: 100% !important;
  margin: 0 !important;
}

.swal2-container {
  z-index: 20000 !important;
}

.swal2-popup {
  z-index: 20001 !important;
}

.swal-profile-editor-popup {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(117, 170, 219, 0.18) 0%, rgba(117, 170, 219, 0) 48%),
    linear-gradient(165deg, rgba(21, 45, 64, 0.96) 0%, rgba(17, 33, 46, 0.96) 100%) !important;
  border: 1px solid rgba(117, 170, 219, 0.28);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(117, 170, 219, 0.12) inset !important;
}

.swal-profile-editor-title {
  letter-spacing: 0.4px;
}

.swal-profile-editor-content {
  margin-top: 2px !important;
}

.swal-profile-editor-popup .swal2-footer {
  border-top: 1px solid rgba(117, 170, 219, 0.2) !important;
  margin-top: 12px !important;
  padding-top: 10px !important;
}

.profile-editor-modal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.profile-editor-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(160deg, rgba(117, 170, 219, 0.2), rgba(244, 185, 66, 0.08));
  border: 1px solid rgba(117, 170, 219, 0.32);
  padding: 11px 12px;
  border-radius: 12px;
}

.profile-editor-avatar {
  min-width: 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(244, 185, 66, 0.95), rgba(189, 134, 25, 0.9));
  color: #18242f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28);
}

.profile-editor-hero-text {
  min-width: 0;
}

.profile-editor-hero-title {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.profile-editor-hero-subtitle {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

.profile-editor-label {
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.profile-editor-input {
  border: 1px solid rgba(117, 170, 219, 0.24) !important;
  background: rgba(10, 20, 29, 0.55) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-editor-input:focus {
  border-color: rgba(117, 170, 219, 0.56) !important;
  box-shadow: 0 0 0 3px rgba(117, 170, 219, 0.18) !important;
}

.profile-editor-help {
  font-size: 12px;
  color: var(--text-muted);
}

.swal-profile-logout-link {
  border: 0;
  background: transparent;
  color: #ff8f8f;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.swal-profile-logout-link:hover {
  color: #ff6b6b;
}

.swal-profile-logout-link:disabled {
  opacity: 0.7;
  cursor: wait;
}

.swal-profile-delete-link {
  border: 0;
  background: transparent;
  color: #ff5f5f;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.swal-profile-delete-link:hover {
  color: #ff2f2f;
}

.swal-profile-delete-link:disabled {
  opacity: 0.7;
  cursor: wait;
}

@media (max-width: 420px) {
  .swal2-popup {
    width: calc(100vw - 22px) !important;
    border-radius: 18px !important;
    padding: 1.1em !important;
  }

  .swal-delicate-title {
    font-size: 17px !important;
  }

  .swal2-actions:not(.swal-profile-actions) {
    flex-direction: column;
    align-items: stretch;
  }

  .swal2-actions-custom {
    flex-direction: column;
    align-items: stretch;
  }

  .swal2-actions-custom .swal2-styled {
    width: 100% !important;
  }

  .swal2-actions:not(.swal-profile-actions) .swal2-styled {
    width: 100% !important;
    margin: 0 !important;
  }

  .swal-profile-actions {
    grid-template-columns: 1fr;
  }
}

/* --- COMMENTS FB/IG STYLE --- */
.comment-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--celeste), #3a82c4);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  flex-shrink: 0;
}
.comment-body {
  flex: 1;
  min-width: 0;
}
.comment-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.comment-author {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.comment-time {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.6;
}
.comment-text {
  font-size: 14px;
  color: #ddd;
  line-height: 1.4;
  margin-top: 2px;
  word-break: break-word;
}
.comment-delete {
  color: var(--text-muted);
  opacity: 0.3;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
  align-self: flex-start;
  line-height: 1;
  background: none;
  border: none;
  font-family: inherit;
}
.comment-delete:hover {
  opacity: 1;
  color: #ff6b6b;
}
.comment-input-area {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.comment-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
}
.comment-input:focus {
  border-color: var(--celeste);
}
.comment-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--celeste);
  color: #000;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s, opacity 0.2s;
}
.comment-send-btn:active {
  transform: scale(0.9);
}
.comment-send-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.comment-send-btn:disabled:active {
  transform: none;
}

/* --- MEMBERS POPUP --- */
.members-popup-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--gold);
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.members-popup-subtitle {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.members-popup-add {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
}
.members-popup-add-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
}
.members-popup-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.members-popup-input {
  flex: 1;
  height: 40px;
  font-size: 14px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 10px;
  padding: 0 12px;
  margin: 0;
}
.members-popup-input:focus {
  border-color: var(--celeste);
}
.members-popup-add-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: none;
  background: var(--celeste);
  color: #000;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  transition: transform 0.1s, opacity 0.2s;
}
.members-popup-add-btn:active {
  transform: scale(0.95);
}
.members-popup-add-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.members-list {
  max-height: 350px;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.member-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  transition: background 0.2s;
}
.member-row:hover {
  background: rgba(255,255,255,0.08);
}
.member-row.owner {
  border-left: 3px solid var(--gold);
  background: linear-gradient(90deg, rgba(244,185,66,0.08) 0%, rgba(255,255,255,0.05) 100%);
}
.member-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.member-name {
  font-size: 14px;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.member-role-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 6px;
}
.member-role-badge.owner {
  background: rgba(244,185,66,0.15);
  color: var(--gold);
}
.member-role-badge.admin {
  background: rgba(117,170,219,0.15);
  color: var(--celeste);
}
.member-role-badge.member {
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
}
.member-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.member-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform 0.1s;
}
.member-action-btn:hover {
  transform: scale(1.05);
}
.member-action-btn.save {
  background: rgba(76,175,80,0.12);
  color: #4caf50;
}
.member-action-btn.delete {
  background: rgba(255,107,107,0.12);
  color: #ff6b6b;
}
.member-edit-input {
  flex: 1;
  min-width: 0;
  height: 38px;
  font-size: 14px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 8px;
  padding: 0 10px;
  margin: 0;
}
.member-edit-input:focus {
  border-color: var(--celeste);
}
.member-empty {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
}
.member-empty-icon {
  font-size: 40px;
  margin-bottom: 10px;
  opacity: 0.5;
}
.member-empty-text {
  font-size: 13px;
  line-height: 1.5;
}

#pwaInstallBtn {
  position: fixed;
  bottom: 88px;
  right: 16px;
  z-index: 1001;
  background: var(--surface-light, rgba(255,255,255,0.08));
  color: var(--text, #eee);
  border: 1px solid rgba(244,185,66,0.3);
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  cursor: pointer;
  animation: pwa-install-slide-in 0.35s cubic-bezier(0.4,0,0.2,1);
  font-family: inherit;
  letter-spacing: 0.3px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.3s, transform 0.3s;
}
#pwaInstallBtn:hover {
  border-color: rgba(244,185,66,0.6);
  background: rgba(255,255,255,0.12);
}
.pwa-install-close {
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.5;
  padding: 2px 4px;
  line-height: 1;
}
.pwa-install-close:hover {
  opacity: 1;
}

.pwa-install-hiding {
  animation: pwa-install-slide-out 0.3s ease forwards;
}

@keyframes pwa-install-slide-in {
  from { transform: translateX(120px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes pwa-install-slide-out {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120px); opacity: 0; }
}

/* --- AD BANNER --- */
#app {
  padding-bottom: 180px;
}
.ad-banner {
  position: fixed;
  bottom: 86px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 468px;
  aspect-ratio: 468 / 80;
  z-index: 999;
  background: linear-gradient(135deg, #1a3a5c 0%, #0f2540 50%, #1a3a5c 100%);
  border: 1px solid rgba(79, 195, 247, 0.3);
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 24px rgba(117,170,219,0.25);
  transition: transform 0.2s, border-color 0.2s;
}
.ad-banner-hidden {
  display: none !important;
}
.ad-banner-close {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  background: rgba(14,26,36,0.95);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  z-index: 1;
  transition: background 0.2s, color 0.2s;
}
.ad-banner-close:hover {
  background: rgba(50,70,90,0.95);
  color: #fff;
}
.ad-banner:hover {
  border-color: rgba(79, 195, 247, 0.6);
  transform: translateX(-50%) translateY(-2px);
}
.ad-banner:active {
  transform: translateX(-50%) scale(0.98);
}
.ad-banner-track {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}
.ad-banner-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
}
.ad-banner-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(
    to bottom right,
    transparent 30%,
    rgba(26, 58, 92, 0.1) 42%,
    rgba(15, 37, 64, 0.25) 48%,
    rgba(10, 25, 45, 0.3) 50%,
    rgba(15, 37, 64, 0.25) 52%,
    rgba(26, 58, 92, 0.1) 58%,
    transparent 70%
  );
  pointer-events: none;
}
.ad-banner-slide.active {
  opacity: 1;
  pointer-events: auto;
}
.ad-banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.2) brightness(1.05);
}
