:root {
    /* Fase 1 del portal: los mismos colores del juego que css/arte-furtivo.css */
    --bg: var(--noche);
    --panel: color-mix(in srgb, var(--noche-profunda) 82%, transparent);
    --line: color-mix(in srgb, var(--oro) 18%, transparent);
    --line-strong: color-mix(in srgb, var(--oro) 40%, transparent);
    --text: var(--marfil);
    --muted: var(--marfil-suave);
    --gold: var(--oro);
    --shadow: 0 24px 80px color-mix(in srgb, var(--velo) 35%, transparent);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background-color: var(--bg);
    color: var(--text);
    font-family: "Alegreya Sans", "Gill Sans", "Segoe UI", system-ui, sans-serif;
}

body {
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

code {
    font-family: Consolas, "Courier New", monospace;
}

.gallery-hero,
.gallery-section,
.state-shell {
    width: min(1180px, calc(100% - 2rem));
    margin-inline: auto;
}

.gallery-hero {
    display: grid;
    gap: 2rem;
    padding: 4.5rem 0 2.5rem;
    align-items: end;
}

.gallery-copy h1,
.state-shell h1 {
    margin: 0;
    font-family: "Alegreya", Georgia, serif;
    font-size: clamp(2.9rem, 6vw, 5.5rem);
    line-height: 0.94;
    letter-spacing: -0.04em;
}

.gallery-eyebrow,
.state-eyebrow,
.gallery-section-label {
    margin: 0 0 0.9rem;
    color: var(--gold);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.gallery-summary,
.state-shell p {
    max-width: 48rem;
    margin: 1.25rem 0 0;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.75;
}

.gallery-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.gallery-metrics article,
.template-card,
.state-shell {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(24, 19, 14, 0.86), rgba(12, 10, 8, 0.96));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.gallery-metrics article {
    padding: 1.25rem 1.4rem;
    border-radius: 1.2rem;
}

.gallery-metrics strong {
    display: block;
    font-size: 1.7rem;
    font-weight: 800;
}

.gallery-metrics span {
    display: block;
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.gallery-section {
    padding-bottom: 2.75rem;
}

.gallery-section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.gallery-section-head h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    line-height: 1.1;
}

.gallery-section-head span {
    color: var(--muted);
    font-size: 0.9rem;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
}

.template-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 1.35rem;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.template-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
}

.template-shot {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--noche-profunda);
    border-bottom: 1px solid var(--line);
}

.template-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.template-card-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.15rem 1.15rem 1.3rem;
}

.template-card-topline {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.template-card h3 {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.2;
}

.template-card h3 a {
    color: inherit;
}

.template-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.65;
}

.template-card-plan {
    display: grid;
    gap: 0.55rem;
}

.template-card-plan-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid color-mix(in srgb, var(--oro) 12%, transparent);
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.78rem;
}

.template-card-plan-row span {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.template-card-plan-row a {
    color: var(--text);
    font-weight: 700;
    text-align: right;
}

.template-card-render {
    padding: 0.9rem 1rem;
    border: 1px solid color-mix(in srgb, var(--oro) 12%, transparent);
    border-radius: 1rem;
    background: color-mix(in srgb, var(--oro) 5%, transparent);
}

.template-card-render strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.template-card-render p {
    font-size: 0.85rem;
    line-height: 1.55;
}

.template-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.template-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border: 1px solid color-mix(in srgb, var(--oro) 12%, transparent);
    border-radius: 999px;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 700;
    transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.template-chip:hover {
    border-color: var(--line-strong);
    color: var(--gold);
    background: color-mix(in srgb, var(--oro) 6%, transparent);
}

.template-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: auto;
    padding-top: 0.4rem;
}

.template-card-link {
    color: var(--gold);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.template-secondary-link {
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.state-shell {
    margin-top: 10vh;
    padding: 2rem;
    border-radius: 1.5rem;
}

.state-link {
    display: inline-flex;
    margin-top: 1.4rem;
    padding: 0.85rem 1.2rem;
    border-radius: 999px;
    background: var(--gold);
    color: #17120d;
    font-weight: 800;
}

.glass-panel {
    background: color-mix(in srgb, var(--oro) 5%, transparent);
    backdrop-filter: blur(10px);
    border: 1px solid color-mix(in srgb, var(--oro) 10%, transparent);
    box-shadow: 0 0 40px color-mix(in srgb, var(--oro) 4%, transparent);
}

.template-canvas {
    min-height: 100vh;
}

@media (max-width: 800px) {
    .gallery-hero {
        padding-top: 3.3rem;
    }
}
.profile-avatar-dropzone {
  border: 1px dashed color-mix(in srgb, var(--oro) 24%, transparent);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1.5rem;
  min-height: 12rem;
  padding: 1.5rem;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.profile-avatar-dropzone:hover,
.profile-avatar-dropzone.dz-drag-hover {
  border-color: color-mix(in srgb, var(--oro) 70%, transparent);
  background: color-mix(in srgb, var(--oro) 8%, transparent);
}

.profile-avatar-dropzone .dz-preview,
.profile-avatar-dropzone .dz-success-mark,
.profile-avatar-dropzone .dz-error-mark,
.profile-avatar-dropzone .dz-error-message {
  display: none;
}

.profile-avatar-dropzone .dz-message {
  margin: 0;
}
/* 
=============================================================================
   ARTE FURTIVO - GLOBAL GRAPHIC LINE (Text & Buttons)
=============================================================================
   Enforcing maximum contrast text against the dark theme, and standardizing 
   the brand's gold accent for buttons and dynamic elements.
=============================================================================
*/

/* 1. Global Typography: Force High-Contrast Defaults */
body {
    color: var(--text);
}

/* Ensure headings maintain crispness */
h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-weight: 800;
}

/* Ensure small texts remain muted but legible */
.text-muted, small, .help-text {
    color: var(--muted);
}

/* 2. ArteFurtivo Branded Buttons */
.btn-artefurtivo {
    background-color: var(--gold);
    color: var(--tinta); /* Tinta: texto oscuro sobre el oro */
    font-family: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.25rem;
    box-shadow: 0 0 15px color-mix(in srgb, var(--oro) 20%, transparent);
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-artefurtivo:hover, .btn-artefurtivo:focus {
    background-color: #ffffff;
    color: #000000;
    box-shadow: 0 0 25px color-mix(in srgb, var(--oro) 40%, transparent);
    transform: translateY(-2px) scale(0.99);
}

.btn-artefurtivo:active {
    transform: translateY(0) scale(0.97);
}

/* 3. Secondary/Outline Button */
.btn-artefurtivo-outline {
    background-color: transparent;
    color: var(--gold);
    font-family: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 1rem 2rem;
    border: 1px solid color-mix(in srgb, var(--oro) 50%, transparent);
    border-radius: 0.25rem;
    transition: all 300ms ease;
    cursor: pointer;
}

.btn-artefurtivo-outline:hover {
    background-color: color-mix(in srgb, var(--oro) 10%, transparent);
    border-color: var(--gold);
    box-shadow: 0 0 15px color-mix(in srgb, var(--oro) 10%, transparent);
}

/* 4. Fix global Tailwind background override issues in dynamic content */
.bg-white {
    /* To prevent any accidental white backgrounds killing the dark text when components inject it */
    background-color: rgba(255,255,255,0.05) !important;
}

.text-slate-900, .text-gray-900, .text-black {
    /* Ensure elements that hardcode dark text accidentally inside generic panels are white */
    /* Note: Only applies to non-buttons since buttons handle their own text natively */
}

/* Exemptions for when black text is legitimately needed (e.g. inside gold backgrounds) */
.bg-primary > *, .btn-artefurtivo > * {
    color: var(--tinta) !important;
}
