/**
 * CriollosUY — Base Styles
 * Reset, tipografía, componentes comunes, utilidades
 */

/* ============================================================
   RESET
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--amber);
  text-decoration: none;
}

a:hover {
  color: var(--amber-hover);
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}


/* ============================================================
   FONTS (Google Fonts)
   ============================================================ */

@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/bebasneue/v14/JTUSjIg69CK48gW7PXoo9Wlhyw.woff2') format('woff2');
}


/* ============================================================
   TIPOGRAFÍA
   ============================================================ */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--text);
}

.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-amber { color: var(--amber); }
.text-female { color: var(--female); }
.text-male { color: var(--male); }
.text-red { color: var(--red); }
.text-green { color: var(--green); }


/* ============================================================
   LAYOUT — App Shell
   ============================================================ */

.app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: var(--content-max);
  margin: 0 auto;
  position: relative;
}

.app-content {
  flex: 1;
  padding-top: calc(var(--header-h) + var(--safe-top));
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  padding-left: 16px;
  padding-right: 16px;
}


/* ============================================================
   HEADER
   ============================================================ */

.header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--content-max);
  height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
  padding-right: 16px;
  background: var(--header-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
  z-index: var(--z-header);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.header-logo-img {
  height: 36px;
  width: auto;
  filter: var(--logo-filter, none);
}

.header-logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--text);
}

/* Lockup de marca: ACCCF (display) + Florida (subtítulo, no compite) */
.brand-lockup { display: flex; flex-direction: column; justify-content: center; line-height: 1; }
.brand-lockup .b-acccf { font-family: var(--font-display); font-size: 22px; letter-spacing: 0.12em; color: var(--text); }
.brand-lockup .b-florida { font-family: var(--font-body); font-size: 9.5px; font-weight: 600; letter-spacing: 0.30em; text-transform: uppercase; color: var(--amber); margin-top: 3px; }

/* Logo por tema (blanco en oscuro / negro en claro) — solo carga el activo */
.brand-logo { display:inline-block; height:46px; aspect-ratio:708/600; flex:none; background:center/contain no-repeat var(--logo-l); }
[data-theme="dark"] .brand-logo { background-image: var(--logo-d); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo { background-image: var(--logo-d); } }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--duration) var(--ease);
}

.header-btn:hover {
  background: var(--surface-hover);
}

.header-btn svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ============================================================
   BOTTOM NAV
   ============================================================ */

.nav-bottom {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--content-max);
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--header-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--border);
  z-index: var(--z-header);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  color: var(--text-dim);
}

.nav-item.active {
  color: var(--amber);
}

.nav-item:hover {
  color: var(--text-muted);
}

.nav-item svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item span {
  font-size: 10px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.02em;
}


/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card-body {
  padding: 16px;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semibold);
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: all var(--duration) var(--ease);
}

.btn-primary {
  background: var(--amber);
  color: var(--text-on-accent);
  box-shadow: 0 2px 8px var(--amber-glow);
}

.btn-primary:hover {
  background: var(--amber-hover);
  box-shadow: 0 4px 16px var(--amber-glow);
}

.btn-outline {
  border: 1px solid var(--amber-border);
  color: var(--amber);
  background: var(--amber-soft);
}

.btn-outline:hover {
  background: var(--amber-border);
}


/* ============================================================
   BADGES
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-live {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
  animation: pulse-live 2s ease-in-out infinite;
}

.badge-programado {
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.badge-finalizado {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}


/* ============================================================
   SECTION TITLES
   ============================================================ */

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title h2 {
  font-size: 22px;
}

.section-title a {
  font-size: 13px;
  color: var(--amber);
  font-weight: var(--fw-medium);
}


/* ============================================================
   SKELETON (loading states)
   ============================================================ */

.skeleton {
  background: linear-gradient(90deg,
    var(--surface-hover) 0%,
    var(--card-border) 50%,
    var(--surface-hover) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ============================================================
   SIDE MENU (hamburger)
   ============================================================ */

.menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--menu-overlay);
  z-index: var(--z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-slow) var(--ease);
}

.menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.menu-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: var(--menu-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border);
  z-index: var(--z-menu);
  transform: translateX(-100%);
  transition: transform var(--duration-slow) var(--ease);
  padding: calc(var(--safe-top) + 20px) 20px 20px;
  overflow-y: auto;
}

.menu-panel.active {
  transform: translateX(0);
}

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

.menu-header h3 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--amber);
}

.menu-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.menu-close:hover {
  background: var(--surface-hover);
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: var(--fw-medium);
  font-size: 15px;
  transition: all var(--duration) var(--ease);
}

.menu-link:hover,
.menu-link.active {
  background: var(--amber-soft);
  color: var(--amber);
}

.menu-link svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.menu-divider {
  height: 1px;
  background: var(--divider);
  margin: 12px 0;
}


/* ============================================================
   THEME TOGGLE
   ============================================================ */

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.theme-toggle-track {
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  position: relative;
  transition: background var(--duration) var(--ease);
}

.theme-toggle-thumb {
  width: 20px;
  height: 20px;
  background: var(--amber);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform var(--duration) var(--ease);
}

[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(20px);
}

.theme-toggle-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: var(--fw-medium);
}


/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 12px;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  stroke: var(--text-dim);
  fill: none;
  stroke-width: 1.5;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 14px;
}


/* ============================================================
   UTILITIES
   ============================================================ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
