.g-id-container { display:flex; justify-content:center; }

/* Estilos para mensaje de error en login */
.error-message {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border: 1px solid #f87171;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 12px;
  margin: 16px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}

.theme-dark .error-message {
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
  border-color: #dc2626;
  color: #fca5a5;
}
:root {
  /* Tema CLARO (predeterminado) */
  --bg: #f7f8fa;
  --bg-elev: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --card: #ffffff;
  --card-2: #f3f4f6;
  --ring: #14b8a633;
  --border: #e5e7eb;
  --btn: #e5e7eb;
}

/* Tema OSCURO (usa la paleta actual) */
.theme-dark {
  --bg: #0b0f14;
  --bg-elev: #111826;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --card: #0f172a;
  --card-2: #0b1323;
  --ring: #2dd4bf33;
  --border: #1f2937;
  --btn: #1f2937;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 70% -10%, #c7d2fe 0%, transparent 60%), var(--bg);
  color: var(--text);
}

/* Ajuste de fondo en oscuro */
.theme-dark {
  background: radial-gradient(1200px 600px at 70% -10%, #1b2440 0%, transparent 60%), var(--bg);
}

.site-header {
  max-width: 1120px;
  margin: 32px auto 8px auto;
  padding: 0 20px;
}

.title {
  font-size: 40px;
  font-weight: 700;
  margin: 0 0 16px 0;
}

.search-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--muted);
}

.search-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 16px;
  outline: none;
}

.tabs {
  display: flex;
  gap: 20px;
  margin-top: 18px;
  border-bottom: 1px solid var(--border);
}

.tab {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 10px 0;
  font-size: 15px;
  cursor: pointer;
}

.tab.active { color: var(--text); }
.theme-toggle {
  margin-left: auto;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: var(--card-2);
  color: var(--text);
  border-color: var(--muted);
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.category-chip {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.category-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Estado seleccionado - más bonito para modo claro */
.category-chip[aria-pressed="true"] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* En modo oscuro, usar un gradiente más sutil */
.theme-dark .category-chip[aria-pressed="true"] {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-color: #4f46e5;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.grid {
  max-width: 1120px;
  margin: 20px auto 48px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
}

.card {
  background: linear-gradient(160deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 26px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 30px -12px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.02) inset;
}

.icon { filter: drop-shadow(0 10px 18px rgba(0,0,0,0.4)); }

.name {
  font-size: 28px;
  margin: 16px 0 8px 0;
}

.rating { color: var(--muted); display: flex; align-items: center; gap: 10px; }
.rating .meta { font-size: 14px; }

.desc {
  color: var(--muted);
  line-height: 1.6;
  margin: 12px 0 18px 0;
}

.actions { display: flex; gap: 12px; }
.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--btn);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 16px -12px rgba(0,0,0,0.7); }
.btn:active { transform: translateY(0); }
.btn.primary { background: #334155; border-color: #3b475a; }

/* Variante primaria en tema claro */
body:not(.theme-dark) .btn.primary {
  background: #111827; border-color: #0f172a; color: #fff;
}

.site-footer {
  max-width: 1120px;
  margin: 0 auto 40px auto;
  padding: 0 20px;
  color: var(--muted);
}

/* Modal */
.modal[aria-hidden="true"] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,0.72);
  backdrop-filter: blur(6px);
}
.modal-content {
  position: relative;
  max-width: 640px;
  margin: 8vh auto;
  background: linear-gradient(160deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.7);
}
.modal-body { padding: 24px; }
.modal-title { font-size: 24px; margin: 0 0 8px 0; }
.modal-desc { color: var(--muted); margin: 0 0 14px 0; }
.modal-meta { color: var(--muted); display:flex; gap:10px; align-items:center; margin-bottom:16px; }
.chip { border: 1px solid var(--border); padding: 4px 8px; border-radius: 999px; }
.modal-actions { display:flex; gap:12px; }
.modal-close { position:absolute; right:10px; top:8px; background:transparent; border:none; color:var(--muted); font-size:24px; cursor:pointer; }

/* Login */
.login-body { display:flex; min-height:100vh; align-items:center; justify-content:center; background: var(--bg); }
.login-wrap { padding: 24px; }
.login-card {
  position: relative;
  width: min(440px, 92vw);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--bg-elev), var(--card-2));
  border: 1px solid var(--border);
  box-shadow: 0 20px 80px -30px rgba(0,0,0,.4), 0 6px 16px rgba(0,0,0,.08);
  padding: 32px 28px 24px 28px;
  text-align: center;
}
.login-theme-btn {
  position: absolute; top: 16px; right: 16px;
  background: var(--bg-elev); border: 1px solid var(--border);
  width: 40px; height: 40px; border-radius: 12px; color: var(--muted);
  display:flex; align-items:center; justify-content:center;
}
.login-title { margin: 6px 0 4px 0; font-size: 34px; line-height:1.1; }
.login-subtitle { margin: 0 0 16px 0; color: var(--muted); font-size: 18px; }
.login-link { display:inline-block; margin-bottom: 14px; color: #3b82f6; text-decoration: none; font-weight:600; }
.theme-dark .login-link { color:#93c5fd; }
.login-status {
  display:flex; align-items:center; gap:10px;
  background: #d1fae5; color:#065f46; border: 2px solid #a7f3d0;
  padding: 12px 14px; border-radius: 22px; width: 100%; max-width: 360px; margin-left:auto; margin-right:auto;
}
.theme-dark .login-status { background:#062e1f; color:#a7f3d0; border-color:#0f4d35; }
.login-status .dot { width:10px; height:10px; background:#10b981; border-radius:999px; display:inline-block; }
.login-status .chev { margin-left:auto; color: currentColor; }

.login-cta { margin-top:14px; width:100%; max-width: 360px; padding:16px; border-radius:18px; border:1px solid var(--border); background: var(--bg-elev); color: var(--muted); font-size:16px; margin-left:auto; margin-right:auto; }
.login-account { margin-top:12px; display:flex; align-items:center; gap:10px; background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:10px 12px; width:100%; max-width:360px; box-shadow: 0 8px 20px rgba(0,0,0,0.08); margin-left:auto; margin-right:auto; }
.theme-dark .login-account { background:#0b1220; border-color:#1f2937; }
.avatar { width:28px; height:28px; border-radius:999px; background:#ef4444; color:white; display:flex; align-items:center; justify-content:center; font-weight:700; }
.acct-info { flex:1; min-width:0; }
.acct-title { font-weight:700; color: var(--text); }
.acct-mail { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-drop { color:#9aa3b2; }
.g-logo { margin-left: auto; width:20px; height:20px; }
.login-divider { margin: 22px 0; border: none; border-top: 1px solid var(--border); }
.login-note { color: var(--muted); text-align:center; margin:0; }


