/* --- VARIABLES GLOBALES Y RESET --- */
:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    /* Colores base de Tailwind para degradados */
    --color-red-900: #7f1d1d;
    --color-gray-900: #111827;
    --color-black: #000;
    --color-blue-900: #1e3a8a;
    --color-indigo-900: #312e81;
    --color-gray-800: #1f2937;
    --color-red-950: #450a0a;
    --color-yellow-900: #713f12;
    --color-teal-900: #134e4a;
    --color-blue-950: #172554;
    --color-gray-200: #e5e7eb;
    --color-red-700: #b91c1c;
    --color-orange-800: #9a3412;
    /* Colores de acento */
    --color-red-500: #ef4444;
    --color-red-600: #dc2626;
    --color-blue-400: #60a5fa;
    --color-blue-600: #2563eb;
    --color-blue-500: #3b82f6;
    --color-teal-400: #2dd4bf;
    --color-teal-600: #0d9488;
    --color-teal-500: #14b8a6;
    --color-orange-500: #f97316;
    --color-orange-600: #ea580c;
    --color-yellow-500: #eab308;
    --color-yellow-600: #ca8a04;
    --color-yellow-400: #facc15;
    --color-white: #ffffff;
    --color-gray-400: #9ca3af;
    --color-gray-600: #4b5563;
}

*, *::before, *::after {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    font-family: var(--font-sans);
    line-height: 1.5;
}

body {
    background-color: var(--color-black);
    color: var(--color-white);
    min-height: 100vh;
}

/* --- CLASES DE TEMAS Y ACENTOS (Traducción de Tailwind) --- */
.text-red-500 {
    color: var(--color-red-500);
}

.text-blue-400 {
    color: var(--color-blue-400);
}

.text-teal-400 {
    color: var(--color-teal-400);
}

.text-orange-500 {
    color: var(--color-orange-500);
}

.text-yellow-500 {
    color: var(--color-yellow-500);
}

.text-white {
    color: var(--color-white);
}

.text-gray-400 {
    color: var(--color-gray-400);
}

.text-yellow-400 {
    color: var(--color-yellow-400);
}

.bg-red-600 {
    background-color: var(--color-red-600);
}

.bg-blue-600 {
    background-color: var(--color-blue-600);
}

.bg-teal-600 {
    background-color: var(--color-teal-600);
}

.bg-orange-600 {
    background-color: var(--color-orange-600);
}

.bg-yellow-600 {
    background-color: var(--color-yellow-600);
}

.bg-white {
    background-color: var(--color-white);
}

.bg-gray-600 {
    background-color: var(--color-gray-600);
}

.from-red-500 {
    --tw-gradient-from: var(--color-red-500);
}

.from-blue-500 {
    --tw-gradient-from: var(--color-blue-500);
}

.from-teal-500 {
    --tw-gradient-from: var(--color-teal-500);
}

.from-orange-500 {
    --tw-gradient-from: var(--color-orange-500);
}

.from-yellow-500 {
    --tw-gradient-from: var(--color-yellow-500);
}

.from-white {
    --tw-gradient-from: var(--color-white);
}

.from-gray-500 {
    --tw-gradient-from: var(--color-gray-400);
}


/* Temas de Fondo */
.from-red-900 {
    --tw-gradient-from: var(--color-red-900);
}

.via-gray-900 {
    --tw-gradient-via: var(--color-gray-900);
}

.to-black {
    --tw-gradient-to: var(--color-black);
}

.from-blue-900 {
    --tw-gradient-from: var(--color-blue-900);
}

.via-indigo-900 {
    --tw-gradient-via: var(--color-indigo-900);
}

.from-gray-900 {
    --tw-gradient-from: var(--color-gray-900);
}

.via-red-950 {
    --tw-gradient-via: var(--color-red-950);
}

.from-teal-900 {
    --tw-gradient-from: var(--color-teal-900);
}

.from-red-950 {
    --tw-gradient-from: var(--color-red-950);
}

.via-yellow-900 {
    --tw-gradient-via: var(--color-yellow-900);
}

.from-gray-800 {
    --tw-gradient-from: var(--color-gray-800);
}

.from-blue-950 {
    --tw-gradient-from: var(--color-blue-950);
}

.from-red-900 {
    --tw-gradient-from: var(--color-red-900);
}

.from-gray-200 {
    --tw-gradient-from: var(--color-gray-200);
}

.via-blue-900 {
    --tw-gradient-via: var(--color-blue-900);
}

.from-red-700 {
    --tw-gradient-from: var(--color-red-700);
}

.from-orange-800 {
    --tw-gradient-from: var(--color-orange-800);
}

/* --- ANIMACIONES --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(1.5rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(-4px); /* <-- MODIFICA ESTA LÍNEA */
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }

    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* --- ESTRUCTURA PRINCIPAL --- */
.main-container {
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    transition: color 1000ms ease-in-out;
}

    .main-container::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: linear-gradient(to bottom right, var(--tw-gradient-from), var(--tw-gradient-via), var(--tw-gradient-to));
        opacity: 0.4;
        transition: all 1000ms ease-in-out;
        z-index: 0;
    }

.background-texture {
    position: absolute;
    inset: 0;
    background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
    opacity: 0.1;
    z-index: 0;
    mix-blend-mode: overlay;
}

.content-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    backdrop-filter: blur(4px);
}

/* --- HEADER --- */
.header {
    padding-top: 1.5rem;
    padding-bottom: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
}

.header-content {
    max-width: 80rem; /* max-w-7xl */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-icon {
    width: 2rem;
    height: 2rem;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.3));
}

.header-title {
    font-size: 1.5rem; /* 2xl */
    font-weight: 800; /* extrabold */
    letter-spacing: -0.05em; /* tracking-tighter */
    text-transform: uppercase;
}

    .header-title span {
        transition: color 500ms;
    }

/* Selector de Año */
.year-selector-wrapper {
    width: 100%;
    overflow-x: auto;
    padding: 0.5rem 0.5rem 0.5rem 0.5rem; /* padding top, right, bottom, left */
    /* Efecto de máscara */
    mask-image: linear-gradient(to right, transparent, black 5%, black 98%, transparent);
    /* Ocultar scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE y Edge */
    /* Evita que el texto de los años se seleccione al arrastrar */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
    .year-selector-wrapper.is-dragging {
        /* El cursor 'grabbing' se muestra MIENTRAS se está arrastrando */
        cursor: grabbing;
    }
    .year-selector-wrapper::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }
    .year-selector-wrapper.is-dragging a.year-button {
        /* 2. Mantiene la manito sobre los enlaces para evitar el parpadeo */
        cursor: grabbing;
    }
.year-selector {
    display: flex;
    width: auto;
    gap: 1rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    overflow: visible; /* Evita scroll */
    max-width: 100%; /* Ajusta al ancho del elemento padre */
}

.year-button {
    padding: 0.375rem 1rem; /* px-4 py-1.5 */
    border-radius: 9999px; /* rounded-full */
    font-size: 0.875rem; /* text-sm */
    font-weight: 700; /* font-bold */
    transition: all 300ms;
    flex-shrink: 0;
    text-decoration: none;
}

    .year-button.inactive {
        background-color: rgba(255, 255, 255, 0.05);
        color: #d1d5db; /* text-gray-300 */
    }

        .year-button.inactive:hover {
            background-color: rgba(255, 255, 255, 0.2);
            color: white;
        }

    .year-button.active {
        color: black;
        transform: scale(1.1);
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    }

/* --- MAIN CONTENT --- */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 72rem; /* max-w-6xl */
    margin: 0 auto;
    width: 100%;
    padding: 1rem;
    gap: 2rem;
}

/* --- HERO SECTION --- */
.hero-section {
    width: 100%;
    text-align: center;
    /* Animación de entrada */
    animation: fadeIn 0.5s ease-out;
}

.hero-title {
    font-size: 3.75rem; /* 6xl */
    font-weight: 900; /* font-black */
    letter-spacing: -0.05em; /* tracking-tighter */
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.hero-title-blur {
    position: absolute;
    inset: -0.25rem;
    filter: blur(1.5rem); /* blur-2xl */
    opacity: 0.3;
    background-image: linear-gradient(to right, white, transparent);
    border-radius: 9999px;
}

.hero-title-text {
    position: relative;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5)); /* drop-shadow-2xl */
}

.hero-subtitle-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.hero-subtitle-year {
    font-size: 1.25rem; /* text-xl */
    font-weight: 700;
    padding: 0.25rem 1rem;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.1em; /* tracking-widest */
}

.hero-subtitle-region {
    color: #9ca3af; /* text-gray-400 */
    font-weight: 600;
    font-size: 1.125rem; /* text-lg */
}

/* --- CONTENT GRID --- */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    /* Animación de entrada con retraso */
    animation: fadeIn 0.7s 0.1s ease-out both; /* both = mantiene estado final */
}

.grid-col-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    order: 2;
}

.grid-col-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    order: 1;
}

.col-title {
    font-size: 1.5rem; /* 2xl */
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em; /* tracking-wider */
}

.col-title-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #9ca3af; /* text-gray-400 */
}

/* --- PYRAMID PATH (Col Izquierda) --- */
.pyramid-path {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 28rem; /* max-w-md */
}

.pyramid-node {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.pyramid-line {
    position: absolute;
    height: 1rem;
    width: 2px;
    background-image: linear-gradient(to bottom, var(--tw-gradient-from), rgba(255, 255, 255, 0.1));
    opacity: 0.5;
    top: 100%; /* <-- ESTA ES LA SOLUCIÓN */
    z-index: 0;
    transition: height 300ms;
}

.pyramid-card {
    position: relative;
    z-index: 10;
    width: 100%;
    border-radius: 0.75rem; /* rounded-xl */
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3); /* shadow-2xl */
    transition: transform 300ms;
}

    .pyramid-card:hover {
        transform: scale(1.05);
    }

    .pyramid-card.is-final-border {
        padding: 2px;
        background-image: linear-gradient(to right, #eab308, #ffffff, #eab308);
    }

    .pyramid-card.is-normal-border {
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

.pyramid-card-content {
    padding: 1rem;
    backdrop-filter: blur(12px);
    border-radius: 0.65rem; /* rounded-[10px] */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .pyramid-card-content.is-final-bg {
        background-color: #1f2937; /* bg-gray-900 */
    }

    .pyramid-card-content.is-normal-bg {
        background-color: rgba(0, 0, 0, 0.4);
    }

.pyramid-card-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* <-- AÑADE ESTA LÍNEA */
}

.pyramid-stage {
    font-size: 0.75rem; /* text-xs */
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em; /* tracking-wider */
}

.pyramid-matchup {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.pyramid-winner {
    font-size: 1.25rem; /* text-xl */
    font-weight: 900; /* font-black */
}

.pyramid-matchup-icon {
    width: 1rem; /* w-4 */
    height: 1rem; /* h-4 */
    color: #4b5563; /* text-gray-600 */
}

.pyramid-opponent {
    font-size: 1.125rem; /* text-lg */
    font-weight: 700;
    color: #d1d5db; /* text-gray-300 */
}

.pyramid-score {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 900;
    letter-spacing: -0.05em; /* tracking-tighter */
}

    .pyramid-score.text-white {
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    }

.pyramid-crown {
    position: absolute;
    top: -1.25rem; /* -top-5 */
    width: 2rem; /* w-8 */
    height: 2rem; /* h-8 */
    color: var(--color-yellow-400);
    fill: rgba(234, 179, 8, 0.2); /* fill-yellow-500/20 */
    animation: bounce-slow 3s infinite;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

/* --- INFO CARDS (Col Derecha) --- */
.info-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 1rem; /* rounded-2xl */
    backdrop-filter: blur(12px);
    transition: background-color 300ms;
}

    .info-card:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .info-card.info-card-fact {
        background-image: linear-gradient(to bottom right, rgba(255, 255, 255, 0.05), transparent);
        flex-grow: 1; /* Para que ocupe el espacio restante */
    }

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.info-card-icon {
    width: 1.5rem; /* w-6 (star) or w-8 (medal) */
    height: 1.5rem;
}

[data-lucide="medal"] {
    width: 2rem;
    height: 2rem;
}

.info-card-title {
    font-size: 1.25rem; /* text-xl */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em; /* tracking-wider */
}

.info-card-title-alt {
    font-size: 1.125rem; /* text-lg */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em; /* tracking-wider */
    color: #d1d5db; /* text-gray-300 */
}

.mvp-name {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 900;
    letter-spacing: -0.025em; /* tracking-tight */
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    background-image: linear-gradient(to right, white, #6b7280); /* to-gray-500 */
}

.fact-text {
    font-size: 1.125rem; /* text-lg */
    line-height: 1.75; /* leading-relaxed */
    color: #e5e7eb; /* text-gray-200 */
    font-weight: 500;
}


/* --- RESPONSIVE (Media Queries) --- */
@media (min-width: 768px) { /* md: */
    .header {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .header-content {
        flex-direction: row;
        gap: 1rem;
    }

    .header-icon {
        width: 2rem;
        height: 2rem;
    }

    .header-title {
        font-size: 1.875rem; /* 3xl */
    } 

    .year-button {
        padding: 0.5rem 1.25rem; /* md:px-5 md:py-2 */
        font-size: 1rem; /* md:text-base */
    }

    .main-content {
        padding: 2rem;
        gap: 3rem;
    }

    .hero-title {
        font-size: 8rem; /* md:text-9xl */
    }

    .hero-subtitle-group {
        margin-top: 1rem;
    }

    .hero-subtitle-year {
        font-size: 1.875rem; /* md:text-3xl */
    }

    .pyramid-card-content {
        padding: 1.25rem;
    }

    .pyramid-stage {
        font-size: 0.875rem; /* md:text-sm */
    }

    .pyramid-winner {
        font-size: 1.875rem; /* md:text-3xl */
    }

    .pyramid-matchup-icon {
        width: 1.25rem; /* md:w-5 */
        height: 1.25rem; /* md:h-5 */
    }

    .pyramid-opponent {
        font-size: 1.5rem; /* md:text-2xl */
    }

    .pyramid-score {
        font-size: 2.25rem; /* md:text-4xl */
    }

    .pyramid-crown {
        top: -1.5rem; /* md:-top-6 */
        width: 2.5rem; /* md:w-10 */
        height: 2.5rem; /* md:h-10 */
    }

    .mvp-name {
        font-size: 3rem; /* md:text-5xl */
    }

    .fact-text {
        font-size: 1.25rem; /* md:text-xl */
    }
    .year-selector {
        gap: 2rem; 
    }
}

@media (min-width: 1024px) { /* lg: */
    .content-grid {
        /* lg:grid-cols-12 */
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }
    .year-selector {
        gap: 2rem;
    }

    .grid-col-left {
        grid-column: span 7 / span 7; /* lg:col-span-7 */
        order: 1; /* lg:order-1 */
    }

    .grid-col-right {
        grid-column: span 5 / span 5; /* lg:col-span-5 */
        order: 2; /* lg:order-2 */
    }
}

.col-title-icon-crown {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--color-yellow-400);
    margin-left: 0.5rem;
    /* Efecto sutil de brillo */
    filter: drop-shadow(0 0 4px rgba(250, 204, 21, 0.5));
}

.hero-title-link {
    text-decoration: none; /* Quita el subrayado */
    color: inherit; /* Hereda el color (blanco) */
    display: inline-block;
    position: relative;
    /* Efecto de "pulsar" al pasar el mouse */
    transition: transform 300ms ease;
}

    .hero-title-link:hover {
        transform: scale(1.03);
    }

    .hero-title-link .hero-title-text {
        /* Añadimos un pequeño indicador visual de que es un enlace */
        transition: filter 300ms;
    }

    .hero-title-link:hover .hero-title-text {
        /* Un pequeño brillo al pasar el mouse */
        filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
    }
/* Quita el subrayado del nuevo enlace del título */
.header-title-link {
    text-decoration: none;
    color: inherit;
}