@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    /* Paleta e-sports Modo Oscuro + Salmón */
    --paper: #130f10;
    --white: #1e1718;
    --ink: #fcf4f1;
    --muted: #a69591;
    --line: #382725;
    --salmon: #f39b89;
    --salmon-deep: #d56e60;
    --salmon-pale: #2e1d1b;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    --font: 'DM Sans', sans-serif;
    --display: 'Space Grotesk', sans-serif;

    /* Variables Admin */
    --cyan: #55e2d0;
    --red: #ff667d;
    --gold: #f2d99b;
    --text: #e2e8f4;
    color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; font-family: var(--font); }

/* CORRECCIÓN TIPOGRAFÍA FEA EN BOTONES Y TEXTOS */
body, button, input, select, textarea { font-family: var(--font); color: var(--ink); }
h1, h2, h3, h4, h5, h6, .lives-number, .roster-modal-title { font-family: var(--display); }

body {
    margin: 0; background: linear-gradient(145deg, #130f10, #1e1718 60%, #100b0c);
    min-height: 100vh; overflow-x: hidden;
}

body:before {
    content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
    opacity: 0.12; background-image: radial-gradient(var(--salmon-deep) 1px, transparent 1.1px);
    background-size: 20px 20px;
}

.grain { position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: 0.04; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"); }
.ambient { position: fixed; pointer-events: none; z-index: -1; border-radius: 50%; filter: blur(3px); opacity: 0.25; animation: ambient-drift 18s ease-in-out infinite alternate; }
.ambient-one { width: 540px; height: 540px; top: 80px; right: -190px; background: radial-gradient(circle at 40% 40%, var(--salmon-deep), transparent 68%); }
.ambient-two { width: 520px; height: 520px; top: 780px; left: -250px; background: radial-gradient(circle at 50% 50%, var(--salmon), transparent 68%); animation-delay: -8s; opacity: 0.15; }
@keyframes ambient-drift { 0% { transform: translate3d(0,0,0) scale(1); } 100% { transform: translate3d(28px,-34px,0) scale(1.08); } }

/* Guardianes borde */
.galar-guardians { position: fixed; z-index: 0; inset: 95px 0 0; pointer-events: none; overflow: hidden; display: flex; align-items: center; justify-content: space-between; }
.galar-guardians img { position: absolute; width: clamp(400px, 45vw, 850px) !important; height: clamp(400px, 45vw, 850px) !important; object-fit: contain; opacity: 0.12 !important; filter: saturate(0.85) drop-shadow(0 12px 18px rgba(0,0,0,0.5)); animation: guardian-drift 8s ease-in-out infinite; }
.guardian-zacian { left: 0 !important; transform: translateX(-50%) rotate(-5deg) scale(1.1) !important; }
.guardian-zamazenta { right: 0 !important; transform: translateX(50%) rotate(5deg) scale(1.1) !important; animation-delay: -4s; }
@keyframes guardian-drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }

.page-wrap { max-width: 1240px; margin: auto; padding: 0 30px; position: relative; z-index: 1; }

.intro-banner {
    min-height: 250px; padding: 40px 25px;
    display: grid; grid-template-columns: 1fr 0.85fr; gap: 20px; align-items: center;
    border: 1px solid var(--line); border-radius: 28px;
    background: linear-gradient(112deg, rgba(30,23,24,0.95), rgba(40,27,28,0.9), rgba(46,29,27,0.9));
    box-shadow: inset 0 1px rgba(255,255,255,0.05), 0 20px 70px rgba(0,0,0,0.5);
    position: relative; overflow: hidden;
}
.intro-banner::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='40' cy='40' r='1' fill='%23d56e60' opacity='0.4'/%3E%3C/svg%3E") repeat;
    animation: star-drift 30s linear infinite; opacity: 0.6; z-index: 0;
}
@keyframes star-drift { from { background-position: 0 0; } to { background-position: -100px 100px; } }

.meteor-shower { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.meteor { position: absolute; width: 2px; height: 70px; background: linear-gradient(to bottom, rgba(213,110,96,0), var(--salmon-deep)); transform: rotate(35deg); opacity: 0; animation: meteor-fall linear infinite; }
.meteor:nth-child(1) { left: 5%; animation-duration: 3.1s; animation-delay: 0.5s; height: 90px; }
.meteor:nth-child(2) { left: 15%; animation-duration: 4.2s; animation-delay: 1.5s; height: 110px; }
.meteor:nth-child(3) { left: 25%; animation-duration: 2.8s; animation-delay: 0.2s; height: 60px; }
.meteor:nth-child(4) { left: 35%; animation-duration: 3.5s; animation-delay: 2.1s; height: 85px; }
.meteor:nth-child(5) { left: 45%; animation-duration: 4.8s; animation-delay: 1.1s; height: 130px; }
.meteor:nth-child(6) { left: 20%; animation-duration: 3.2s; animation-delay: 1.5s; height: 70px; }
.meteor:nth-child(7) { left: 40%; animation-duration: 2.8s; animation-delay: 0.8s; height: 120px; }
.meteor:nth-child(8) { left: 70%; animation-duration: 3.7s; animation-delay: 2.5s; height: 95px; }
.meteor:nth-child(9) { left: 95%; animation-duration: 4.1s; animation-delay: 0.3s; height: 100px; }
.meteor:nth-child(10) { left: 5%; animation-duration: 2.9s; animation-delay: 1.2s; height: 80px; }
.meteor:nth-child(11) { left: 10%; animation-duration: 3.8s; animation-delay: 3.0s; height: 120px; }
.meteor:nth-child(12) { left: 20%; animation-duration: 2.4s; animation-delay: 1.6s; height: 55px; }
.meteor:nth-child(13) { left: 30%; animation-duration: 4.1s; animation-delay: 0.9s; height: 90px; }
.meteor:nth-child(14) { left: 40%; animation-duration: 3.2s; animation-delay: 2.7s; height: 80px; }
.meteor:nth-child(15) { left: 50%; animation-duration: 4.6s; animation-delay: 1.4s; height: 110px; }
.meteor:nth-child(16) { left: 60%; animation-duration: 2.7s; animation-delay: 0.6s; height: 60px; }
.meteor:nth-child(17) { left: 70%; animation-duration: 3.6s; animation-delay: 2.2s; height: 100px; }
.meteor:nth-child(18) { left: 80%; animation-duration: 4.3s; animation-delay: 0.3s; height: 115px; }
.meteor:nth-child(19) { left: 90%; animation-duration: 2.5s; animation-delay: 1.9s; height: 65px; }
.meteor:nth-child(20) { left: 100%; animation-duration: 3.4s; animation-delay: 1.2s; height: 85px; }
@keyframes meteor-fall { 0% { transform: translate(100px, -150px) rotate(35deg); opacity: 1; } 100% { transform: translate(-300px, 400px) rotate(35deg); opacity: 0; } }

.intro-copy { position: relative; z-index: 2; }
.eyebrow { font-size: 9px; letter-spacing: 0.2em; font-weight: 800; color: var(--salmon-deep); display: flex; align-items: center; gap: 9px; margin: 0 0 15px; }
.eyebrow-line { width: 30px; height: 1px; background: var(--salmon-deep); }
.intro-banner h1 { font-family: var(--display); font-size: clamp(40px, 5.5vw, 65px); line-height: 0.99; letter-spacing: -0.075em; margin: 0; font-weight: 600; color: #fff3ef; }
.intro-banner h1 em { font-style: normal; color: var(--salmon-deep); position: relative; white-space: nowrap; display: inline-block; }
.intro-banner h1 em:after { content: ""; position: absolute; height: 10px; left: 2px; right: -2px; bottom: 0; background: rgba(0,0,0,0.15); z-index: -1; border-radius: 12px; transform: rotate(-1.8deg); }
.intro-banner p { max-width: 450px; line-height: 1.85; color: #c4b0aa; font-size: 13px; margin: 20px 0 10px; }

.intro-art { height: 260px; position: relative; isolation: isolate; display: flex; align-items: center; justify-content: center; }
.hero-glow { position: absolute; width: 220px; height: 220px; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(102,58,56,0.8) 0%, rgba(66,41,41,0.6) 48%, transparent 74%); filter: blur(3px); animation: glow-breathe 6s ease-in-out infinite; }
@keyframes glow-breathe { 0%, 100% { transform: translate(-50%, -50%) scale(0.94); opacity: 0.78; } 50% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; } }
.hero-orbit { position: absolute; border: 1px solid #75443f; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-22deg); }
.orbit-a { width: 330px; height: 130px; }
.orbit-b { width: 250px; height: 220px; transform: translate(-50%, -50%) rotate(34deg); border-style: dashed; }
.hero-mon { position: absolute; object-fit: contain; filter: drop-shadow(0 18px 14px rgba(0,0,0,0.5)); z-index: 2; animation: mon-float 5.5s ease-in-out infinite; width: 180px; height: 180px; }
.hero-hariyama { left: 0; bottom: 15px; animation-delay: -1.6s; }
.hero-tyranitar { right: 0; bottom: 20px; animation-delay: -3.1s; }
.hero-caption { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 900; letter-spacing: 0.17em; color: var(--salmon-deep); white-space: nowrap; text-shadow: 0 1px rgba(0,0,0,0.8); }
.hero-star { position: absolute; color: var(--salmon-deep); font-size: 24px; z-index: 3; animation: twinkle 3s ease-in-out infinite; }
.star-a { left: 13%; top: 30px; }
.star-b { right: 9%; top: 78px; animation-delay: -1.2s; }
@keyframes mon-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(2deg); } }
@keyframes twinkle { 0%, 100% { opacity: 0.45; transform: scale(0.9) rotate(0); } 50% { opacity: 1; transform: scale(1.16) rotate(14deg); } }

.trainer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-top: 28px; }
.trainer-card {
    display: grid; grid-template-columns: minmax(185px, 38%) minmax(0, 1fr);
    background: linear-gradient(180deg, #181113, #110b0d); 
    border: 1px solid var(--line); border-radius: 22px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6), inset 0 2px 10px rgba(213,110,96,0.05);
    overflow: hidden; transform: translateZ(0); transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    position: relative; z-index: 1;
}
.trainer-card:hover { transform: translateY(-8px); box-shadow: 0 35px 85px rgba(0,0,0,0.8), inset 0 2px 15px rgba(213,110,96,0.1); border-color: var(--salmon-deep); }

/* Mapa de Galar de Fondo en la tarjeta */
.trainer-card::before {
    content: ""; position: absolute; inset: 0;
    background: url('https://images.wikidexcdn.net/mwuploads/wikidex/thumb/3/30/latest/20190526010041/Galar.png/1200px-Galar.png') center/cover no-repeat;
    opacity: 0.05; z-index: -1; pointer-events: none;
}

.trainer-photo-wrap { min-height: 100%; position: relative; overflow: hidden; background: linear-gradient(155deg, #493132, #211c1d); border-right: 1px solid var(--line); z-index: 1; }
.trainer-photo { width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(0.9); transition: transform 0.7s, filter 0.7s; }
.trainer-card:hover .trainer-photo { transform: scale(1.045); filter: saturate(1.1); }
.photo-sheen { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent 42%); pointer-events: none; z-index: 2; }

.trainer-main { padding: 25px 22px 22px; z-index: 1; }
.trainer-top-layout { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.trainer-top-left { display: flex; flex-direction: column; align-items: flex-start; flex: 1; }
.trainer-top-left h3 { font-family: var(--display); font-size: clamp(27px, 2.3vw, 34px); letter-spacing: -0.075em; margin: 0 0 5px; color: #fff; }
.trainer-subtitle { display: block; font-size: 8px; letter-spacing: 0.16em; color: #b29b95; font-weight: 800; margin-top: 4px; }

/* Redes Sociales Originales Blancas con Fondos de Color Oficiales */
.trainer-socials { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.social-icon-link { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.social-icon-link:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 6px 15px rgba(0,0,0,0.5); filter: brightness(1.2); }
.social-icon-link svg { width: 15px; height: 15px; fill: #fff; }

.twitch-link { background: #9146FF; border: 1px solid #7a31df; }
.youtube-link { background: #FF0000; border: 1px solid #d40000; }
.x-link { background: #000000; border: 1px solid #333; }
.instagram-link { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); border: 1px solid #dc2743; }

.trainer-top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 15px; }
.trainer-mascot { width: 64px; height: 64px; display: grid; place-items: center; background: linear-gradient(145deg, #2a1b1d, #1e1315); border: 1px solid var(--line); border-radius: 20px; transform: rotate(4deg); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.trainer-mascot img { width: 61px; height: 61px; object-fit: contain; filter: drop-shadow(0 4px 3px rgba(0,0,0,0.5)); animation: mascot-bob 3.8s ease-in-out infinite; }
@keyframes mascot-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-4px) rotate(3deg); } }

/* --- CORAZÓN Y VIDAS --- */
.roster-lives-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 20px; }
.btn-roster-glow { flex: 1; background: linear-gradient(90deg, var(--salmon-deep), var(--salmon)); border: none; border-radius: 14px; padding: 14px; color: #fff; font-size: 13px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 25px rgba(213, 110, 96, 0.25); transition: 0.3s; letter-spacing: 0.05em; text-align: center; text-transform: uppercase; font-family: var(--font); }
.btn-roster-glow:hover { transform: translateY(-3px); box-shadow: 0 12px 35px rgba(213, 110, 96, 0.4); filter: brightness(1.1); }

.lives-counter-inner { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; background: var(--white); border: 1px solid var(--line); border-radius: 100px; padding: 4px 18px 4px 0; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.luvdisc-heart { width: 65px !important; margin-left: -15px; margin-right: -2px; margin-top: -10px; margin-bottom: -10px; filter: drop-shadow(0 5px 10px rgba(213, 110, 96, 0.3)); animation: heartbeat 1.3s ease-in-out infinite; transform-origin: center; position: relative; z-index: 2; }
.lives-info { display: flex; flex-direction: column; align-items: center; line-height: 0.9; }
.lives-number { font-size: 36px; font-family: var(--display); font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(213, 110, 96, 0.2); }
.lives-label { font-size: 9px; letter-spacing: 0.15em; color: var(--salmon-deep); font-weight: 800; margin-top: 2px; font-family: var(--font); }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.15); } 30% { transform: scale(1); } 45% { transform: scale(1.15); } }

/* --- EQUIPO Y CAJAS --- */
.team-container { border: 1px solid var(--line); border-radius: 18px; background: rgba(0,0,0,0.3); padding: 18px; box-shadow: inset 0 2px 10px rgba(0,0,0,0.2); margin-top: 20px; }
.team-header { display: flex; justify-content: space-between; align-items: center; }
.team-title { font-size: 12px; font-weight: 800; letter-spacing: 0.2em; color: var(--salmon-deep); }
.team-reveal-btn { background: var(--salmon-pale); border: 1px solid var(--salmon-deep); color: var(--salmon-deep); border-radius: 100px; padding: 6px 16px; font-size: 10px; font-weight: 800; cursor: pointer; transition: 0.3s; font-family: var(--font); text-transform: uppercase; }
.team-reveal-btn:hover { background: var(--salmon-deep); color: #fff; box-shadow: 0 5px 15px rgba(213,110,96,0.3); }

.pokemon-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pokemon-chip { display: grid; place-items: center; padding: 5px; }
.pokemon-sprite-wrap { width: 100%; max-width: 60px; aspect-ratio: 1; border-radius: 18px; background: radial-gradient(circle at 50% 38%, #fff 0%, #fff7f1 65%, #f8e8df 100%); border: 1px solid #f0e2db; display: grid; place-items: center; transition: 0.2s; }
.pokemon-chip:hover .pokemon-sprite-wrap { border-color: var(--salmon-deep); transform: translateY(-3px); box-shadow: 0 5px 15px rgba(213, 110, 96, 0.2); }
.roster-pokemon-sprite { width: 100%; height: 100%; max-width: 50px; max-height: 50px; object-fit: contain; }
.pokemon-chip.dead .pokemon-sprite-wrap { filter: grayscale(1); opacity: 0.62; background: #302426; border-color: #4b3535; }
.pokemon-chip.dead .pokemon-sprite-wrap:hover { border-color: var(--salmon-deep); }
.pokemon-empty { font-size: 11px; color: var(--muted); padding: 15px 5px; text-align: center; grid-column: 1/-1; }
@keyframes drawer-cool-reveal { 0% { opacity: 0; transform: translateY(-15px) scale(0.97); filter: blur(4px); } 100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }

/* --- MODAL DE CAJAS --- */
.roster-modal-frame {
    position: relative; width: min(100%, 700px); background: var(--paper);
    border: 1px solid var(--line); border-radius: 20px; padding: 35px 30px;
    max-height: 85vh; overflow-y: auto; box-shadow: 0 25px 80px rgba(0,0,0,0.8);
}
.roster-modal-title { margin-top: 0; font-family: var(--display); font-size: 26px; color: var(--ink); letter-spacing: -0.05em; margin-bottom: 20px; }
.pretty-tabs { display: flex; gap: 10px; margin-bottom: 20px; background: rgba(0,0,0,0.2); padding: 8px; border-radius: 100px; border: 1px solid var(--line); }
.pretty-tab { flex: 1; background: transparent; border: none; color: var(--muted); font-weight: 800; font-size: 13px; padding: 12px; border-radius: 100px; cursor: pointer; transition: 0.3s; display: flex; justify-content: center; align-items: center; gap: 8px; font-family: var(--font); }
.pretty-tab.active { background: var(--salmon-deep); color: #fff; box-shadow: 0 4px 15px rgba(213,110,96,0.3); }
.pretty-tab span { background: rgba(0,0,0,0.2); color: inherit; padding: 2px 8px; border-radius: 20px; font-size: 11px; }
.pretty-tab.active span { background: rgba(0,0,0,0.3); }
.roster-close-btn { position: absolute; right: 20px; top: 20px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; transition: 0.2s; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(0,0,0,0.2); font-family: var(--font); }
.roster-close-btn:hover { background: var(--salmon-deep); border-color: var(--salmon-deep); color: #fff; transform: rotate(90deg); }

/* --- MEDALLAS Y LOGRO --- */
.medal-area { margin-top: 25px; position: relative; z-index: 1; }
.section-mini-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-mini-row h4 { font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin: 0; }
.section-mini-row span { font-size: 10px; font-weight: 800; color: var(--salmon-deep); }
.medals { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.medal { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,0.2); display: grid; place-items: center; overflow: hidden; padding: 4px; }
.medal img { width: 100%; height: 100%; object-fit: contain; }
.medal.obtained { background: var(--salmon-pale); border-color: var(--salmon-deep); box-shadow: 0 0 10px rgba(213,110,96,0.15); }

.achievement { margin-top: 20px; padding: 15px; border-radius: 15px; background: rgba(0,0,0,0.2); border: 1px solid var(--line); display: flex; gap: 12px; align-items: center; position: relative; z-index: 1; }
.achievement-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--salmon-pale); flex: 0 0 auto; border: 1px solid var(--line); }
.achievement-icon img { width: 28px; height: 28px; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5)); }
.achievement-content { min-width: 0; }
.achievement-label { font-size: 8px; color: var(--salmon-deep); font-weight: 800; letter-spacing: 0.15em; margin-bottom: 5px; }
.achievement-text { font-size: 12px; line-height: 1.5; color: var(--ink); }

/* --- CLIPS --- */
.clips-section { padding-top: 60px; position: relative; }
.clips-section::before { content: ""; position: absolute; inset: 0 -20px 0; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(30,23,24,0.6), transparent 70%); pointer-events: none; z-index: -1; }
.clips-duo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.clip-trainer-section { padding: 22px; border: 1px solid var(--line); border-radius: 24px; background: var(--white); box-shadow: var(--shadow); }
.clip-trainer-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; position: relative; z-index: 1; }
.clip-avatar { width: 48px; height: 48px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--salmon-pale); }
.clip-avatar img { width: 100%; height: 100%; object-fit: cover; }
.clip-trainer-heading h3 { margin: 0; font-family: var(--display); font-size: 18px; color: #fff; }
.view-all { margin-left: auto; font-size: 10px; font-weight: 800; padding: 8px 12px; border: 1px solid var(--salmon-deep); border-radius: 100px; background: transparent; color: var(--salmon-deep); text-decoration: none; transition: 0.2s; position: relative; z-index: 1; text-transform: uppercase; }
.view-all:hover { background: var(--salmon-pale); color: #fff; }

.clips-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; position: relative; z-index: 1; }
.clip-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; overflow: hidden; transition: 0.2s; }
.clip-card:hover { border-color: var(--salmon-deep); transform: translateY(-4px); box-shadow: 0 10px 25px rgba(213,110,96,0.15); }
.clip-preview { display: block; position: relative; width: 100%; aspect-ratio: 16/9; background: #000; cursor: pointer; border: 0; padding: 0; overflow: hidden; border-radius: 11px 11px 0 0; }
.clip-thumbnail { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: 0.3s ease; }
.clip-preview:hover .clip-thumbnail { transform: scale(1.05); opacity: 0.8; }
.clip-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--ink); font-size: 14px; box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.clip-info { padding: 12px; }
.clip-info h3 { font-size: 12px; line-height: 1.4; color: #fff; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; font-family: var(--font); }
.clip-open { font-size: 9px; font-weight: 800; color: var(--salmon-deep); text-decoration: none; }
.clip-open:hover { text-decoration: underline; color: #fff; }

.site-footer { margin-top: 60px; padding: 30px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 15px; position: relative; z-index: 1; }
.footer-mascot { width: 70px; height: 70px; display: grid; place-items: center; background: transparent; border: none; box-shadow: none; }
.footer-mascot img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 5px 5px rgba(0,0,0,0.5)); }
.site-footer p { font-size: 11px; color: var(--muted); margin: 0; flex: 1; }
.site-footer strong { color: #fff; }
.footer-tag { margin-left: auto; font-size: 7px; font-weight: 800; letter-spacing: 0.16em; color: var(--salmon-deep); }

.clips-archive { padding-top: 40px; min-height: calc(100vh - 90px); }
.back-link { display: inline-block; text-decoration: none; color: var(--salmon-deep); font-size: 11px; font-weight: 800; margin-bottom: 30px; }
.archive-heading { padding-bottom: 35px; }
.archive-heading h1 { font-family: var(--display); font-size: clamp(40px, 5vw, 65px); margin: 0; color: #fff; letter-spacing: -0.05em; }
.archive-heading h1 span { color: var(--salmon-deep); }
.archive-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding-bottom: 50px; }
.empty-state, .loading-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 30px; text-align: center; color: var(--muted); font-size: 13px; grid-column: 1/-1; }

.clip-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); animation: modal-fade 0.2s ease-out; }
.clip-modal-frame { width: min(100%, 1000px); aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 25px 80px rgba(0,0,0,0.8); animation: modal-pop 0.22s ease-out; }
.clip-modal-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.clip-modal-close { position: absolute; right: 25px; top: 25px; width: 45px; height: 45px; border-radius: 50%; background: var(--salmon-pale); border: 1px solid var(--salmon-deep); color: var(--salmon-deep); font-size: 28px; cursor: pointer; transition: 0.2s; z-index: 10; display: grid; place-items: center; font-family: var(--font); }
.clip-modal-close:hover { background: var(--salmon-deep); color: #fff; transform: rotate(90deg); }
body.modal-open { overflow: hidden; }

@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { transform: scale(0.96) translateY(8px); opacity: 0.5; } to { transform: scale(1) translateY(0); opacity: 1; } }

@media(max-width: 1050px) {
    .archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .trainer-card { grid-template-columns: minmax(140px, 30%) minmax(0, 1fr); }
}

@media(max-width: 850px) {
    .intro-banner { grid-template-columns: 1fr 0.8fr; padding: 25px 20px; }
    .intro-banner h1 { font-size: clamp(35px, 6vw, 45px); }
    .intro-art { height: 180px; }
    .hero-mon { width: 140px; height: 140px; }
    .trainer-grid { grid-template-columns: 1fr; }
    .clips-duo-grid { grid-template-columns: 1fr; }
    .trainer-top-layout { flex-direction: column; align-items: stretch; gap: 20px; }
}

@media(max-width: 600px) {
    .page-wrap { padding: 0 15px; }
    .intro-banner { display: flex; flex-direction: column; padding: 25px 15px 10px; margin-top: 15px; text-align: center; }
    .intro-banner p { margin: 15px auto; }
    .intro-art { height: 160px; width: 100%; }
    .hero-mon { width: 125px; height: 125px; bottom: 10px; }
    
    /* ESCONDER ESTRELLA EN MÓVIL */
    .star-a { display: none !important; }
    /* ESCONDER MASCOTA EN MÓVIL */
    .trainer-mascot { display: none !important; }

    .trainer-card { grid-template-columns: 1fr; }
    .trainer-photo-wrap { height: 220px; border-right: none; border-bottom: 1px solid var(--line); }
    /* FORZAR LA IMAGEN DESDE ARRIBA PARA VER LAS CARAS */
    .trainer-photo { object-position: center top !important; }

    .trainer-main { padding: 20px; }
    .pokemon-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .clips-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .clip-modal { padding: 15px; }
    .clip-modal-close { right: 15px; top: 15px; width: 35px; height: 35px; font-size: 22px; }
    .roster-lives-row { flex-direction: column; align-items: stretch; gap: 15px; }
    .lives-counter-inner { justify-content: center; }
}

@media(prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}