/* ==========================================================
   PokeHUB Theme v6
   Rediseño visual compatible: dark gaming UI + paleta del logo
   ========================================================== */

:root {
  --ph-bg: #03070c;
  --ph-bg-2: #07111b;
  --ph-surface: rgba(15, 25, 36, .92);
  --ph-surface-2: rgba(20, 32, 45, .94);
  --ph-surface-3: rgba(8, 15, 23, .96);
  --ph-card: rgba(15, 25, 36, .88);
  --ph-card-2: rgba(9, 17, 26, .94);
  --ph-border: rgba(255, 255, 255, .09);
  --ph-border-soft: rgba(255, 255, 255, .06);
  --ph-border-gold: rgba(245, 218, 119, .22);

  --ph-text: #f3f7fb;
  --ph-text-soft: #c6d2dc;
  --ph-text-muted: #8293a1;

  --ph-blue: #26acd7;
  --ph-blue-2: #5de1ff;
  --ph-navy: #02212a;
  --ph-red: #d91828;
  --ph-coral: #fd4b32;
  --ph-gold: #d1a654;
  --ph-gold-2: #f5da77;
  --ph-green: #52d27a;
  --ph-danger: #ff4d57;

  --ph-radius-sm: 10px;
  --ph-radius: 18px;
  --ph-radius-lg: 28px;
  --ph-shadow: 0 24px 70px rgba(0,0,0,.48);
  --ph-shadow-soft: 0 16px 36px rgba(0,0,0,.34);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ph-bg); }
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  color: var(--ph-text-soft);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  background:
    radial-gradient(circle at 8% 16%, rgba(217,24,40,.28), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(38,172,215,.25), transparent 30%),
    radial-gradient(circle at 76% 88%, rgba(245,218,119,.13), transparent 28%),
    linear-gradient(135deg, #14050f 0%, #06101a 42%, #02060a 100%) !important;
  background-attachment: fixed !important;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  opacity: .42;
  background-image:
    url('/layout/img/ph-particles.svg?v=pokehub-v6'),
    linear-gradient(rgba(255,255,255,.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.032) 1px, transparent 1px);
  background-size: 580px 580px, 64px 64px, 64px 64px;
  animation: phParticles 36s linear infinite;
  mask-image: radial-gradient(circle at center, #000 0%, #000 55%, transparent 100%);
}

body::after {
  background:
    radial-gradient(circle at 15% 48%, transparent 0 72px, rgba(245,218,119,.06) 73px 96px, transparent 97px),
    radial-gradient(circle at 88% 38%, transparent 0 90px, rgba(38,172,215,.06) 91px 124px, transparent 125px),
    linear-gradient(90deg, rgba(0,0,0,.68) 0%, transparent 18%, transparent 82%, rgba(0,0,0,.72) 100%);
  opacity: .86;
}

@keyframes phParticles {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 580px -580px, 64px 64px, -64px 64px; }
}

@keyframes phGradientDrift {
  0%,100% { transform: translate3d(0,0,0) scale(1); opacity: .72; }
  50% { transform: translate3d(-2%,1%,0) scale(1.05); opacity: .95; }
}

@keyframes phHeroOne { 0%, 27% { opacity: 1; transform: scale(1.02); } 33%, 94% { opacity: 0; transform: scale(1.09); } 100% { opacity: 1; transform: scale(1.02); } }
@keyframes phHeroTwo { 0%, 27% { opacity: 0; transform: scale(1.08); } 33%, 60% { opacity: 1; transform: scale(1.02); } 66%, 100% { opacity: 0; transform: scale(1.08); } }
@keyframes phHeroThree { 0%, 60% { opacity: 0; transform: scale(1.08); } 66%, 94% { opacity: 1; transform: scale(1.02); } 100% { opacity: 0; transform: scale(1.08); } }
@keyframes phPulse { 0%,100% { opacity: .24; transform: translate3d(0,0,0) rotate(0deg); } 50% { opacity: .38; transform: translate3d(8px,-8px,0) rotate(4deg); } }

/* Base */
a { color: var(--ph-blue-2); text-decoration: none; }
a:hover { color: var(--ph-gold-2); }
img { max-width: 100%; height: auto; }
p { margin: 0 0 14px; }
ul { margin: 0; padding: 0; }
li { list-style: none; }
button, input, select, textarea, a { transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }

.pageShell,
.main {
  width: min(1180px, calc(100% - 42px));
  margin: 14px auto 30px;
  position: relative;
  z-index: 1;
}

.preventCollapse::after,
ul.linkbuttons::after,
.search_widget form::after { content: ""; display: block; clear: both; }
.pull-left, .pull-right { float: none !important; }
.centralizeContent { text-align: center; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relative { position: relative; }
.well { width: auto; }

/* Navbar */
.phNavbar {
  min-height: 88px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 0 0 var(--ph-radius-lg) var(--ph-radius-lg);
  background:
    linear-gradient(180deg, rgba(12,20,30,.98), rgba(6,11,18,.98));
  box-shadow: var(--ph-shadow-soft), inset 0 1px 0 rgba(245,218,119,.11);
  position: sticky;
  top: 0;
  z-index: 80;
  overflow: visible;
  backdrop-filter: blur(14px);
}

.phNavbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(217,24,40,.22), transparent 24%, transparent 72%, rgba(38,172,215,.22));
  opacity: .42;
}

.phLogo {
  position: relative;
  z-index: 1;
  width: 170px;
  min-width: 170px;
  display: flex;
  align-items: center;
}
.phLogo img {
  display: block;
  width: 150px;
  max-height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.45));
}

.phNavLinks {
  position: relative;
  z-index: 1;
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.phNavLinks > li { position: relative; display: block; }
.phNavLinks > li > a {
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  color: var(--ph-text-soft);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0,0,0,.5);
}
.phNavLinks > li > a i { color: var(--ph-gold); font-size: 13px; }
.phNavLinks > li > a:hover,
.phNavLinks > li:hover > a {
  color: var(--ph-text);
  background: rgba(255,255,255,.07);
  box-shadow: inset 0 0 0 1px rgba(245,218,119,.16);
  transform: translateY(-1px);
}
.phNavLinks > li > a.phDownloadLink {
  color: #fff;
  background: linear-gradient(135deg, var(--ph-red), var(--ph-coral));
  box-shadow: 0 14px 28px rgba(217,24,40,.26), inset 0 1px 0 rgba(255,255,255,.22);
}
.phNavLinks > li > a.phDownloadLink i { color: #fff; }
.phNavLinks > li > a.phDownloadLink:hover { box-shadow: 0 18px 38px rgba(217,24,40,.38), inset 0 1px 0 rgba(255,255,255,.28); }
.phNavLinks > li > ul {
  display: none;
  position: absolute;
  z-index: 90;
  top: calc(100% + 12px);
  left: 0;
  min-width: 215px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  background: rgba(6,11,18,.98);
  box-shadow: var(--ph-shadow);
  backdrop-filter: blur(12px);
}
.phNavLinks > li:hover > ul { display: block; }
.phNavLinks > li > ul::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 26px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: rgba(6,11,18,.98);
  border-left: 1px solid rgba(255,255,255,.10);
  border-top: 1px solid rgba(255,255,255,.10);
}
.phNavLinks > li > ul a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ph-text-soft);
  font-weight: 750;
}
.phNavLinks > li > ul a:hover { color: var(--ph-gold-2); background: rgba(255,255,255,.06); }

/* Hero */
.phHero {
  min-height: 288px;
  margin: 28px 0 24px;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(245,218,119,.20);
  background: #06111b;
  box-shadow: var(--ph-shadow), inset 0 1px 0 rgba(255,255,255,.08);
  isolation: isolate;
}
.phHero__slider,
.phHero__slide,
.phHero__motion {
  position: absolute;
  inset: 0;
}
.phHero__slide {
  opacity: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  will-change: opacity, transform;
}
.phHero__slide--one { background-image: url('/layout/img/ph-hero-aurora.svg?v=pokehub-v6'); animation: phHeroOne 21s ease-in-out infinite; }
.phHero__slide--two { background-image: url('/layout/img/ph-hero-arena.svg?v=pokehub-v6'); animation: phHeroTwo 21s ease-in-out infinite; }
.phHero__slide--three { background-image: url('/layout/img/ph-hero-league.svg?v=pokehub-v6'); animation: phHeroThree 21s ease-in-out infinite; }
.phHero__slider::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3,7,12,.92) 0%, rgba(3,7,12,.50) 42%, rgba(3,7,12,.84) 100%),
    linear-gradient(180deg, rgba(3,7,12,.18), rgba(3,7,12,.64));
}
.phHero__motion {
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 76% 50%, transparent 0 95px, rgba(245,218,119,.07) 96px 126px, transparent 127px),
    radial-gradient(circle at 83% 52%, transparent 0 58px, rgba(217,24,40,.08) 59px 79px, transparent 80px),
    radial-gradient(circle at 20% 22%, rgba(38,172,215,.17), transparent 30%);
  animation: phPulse 8s ease-in-out infinite;
}
.phHero__content {
  position: relative;
  z-index: 2;
  min-height: 288px;
  max-width: 625px;
  padding: 44px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.phHero__eyebrow {
  width: fit-content;
  margin-bottom: 14px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(245,218,119,.30);
  border-radius: 999px;
  color: var(--ph-gold-2);
  background: rgba(245,218,119,.09);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.phHero h1 {
  margin: 0;
  color: var(--ph-text);
  font-size: clamp(44px, 5vw, 72px);
  line-height: .95;
  letter-spacing: -.05em;
  text-transform: none;
  text-shadow: 0 16px 40px rgba(0,0,0,.76);
}
.phHero p {
  max-width: 540px;
  margin: 18px 0 0;
  color: #e6eef5;
  font-size: 16px;
  text-shadow: 0 5px 16px rgba(0,0,0,.75);
}
.phHero__badges {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.phHero__badges span {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  color: var(--ph-text-soft);
  background: rgba(5,10,16,.54);
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}
.phHero__badges i { color: var(--ph-gold-2); }

/* Content shell */
.feedContainer {
  margin: 0;
  padding: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: flex-start;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(12,23,35,.92), rgba(5,10,16,.98));
  box-shadow: var(--ph-shadow), inset 0 1px 0 rgba(255,255,255,.045);
  backdrop-filter: blur(8px);
}
.topPane { width: 100%; margin: 0; padding: 0; }
.topPane .well { padding: 0; margin: 0; background: transparent; }
#countDownTimer {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(253,75,50,.32);
  border-radius: 999px;
  color: #fff !important;
  background: linear-gradient(135deg, rgba(217,24,40,.25), rgba(253,75,50,.14));
  box-shadow: 0 0 30px rgba(217,24,40,.20);
  font-weight: 900;
}
#countDownTimer::before { content: "\f017"; font-family: FontAwesome; color: var(--ph-gold-2); }
.leftPane {
  flex: 1 1 0;
  min-width: 0;
  width: auto !important;
  min-height: 690px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(16,29,42,.92), rgba(8,15,23,.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 12px 36px rgba(0,0,0,.20);
}
.rightPane {
  flex: 0 0 305px;
  width: 305px !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Widgets/cards */
.header {
  position: relative;
  padding: 13px 15px 13px 19px;
  color: var(--ph-text);
  border-radius: 17px 17px 0 0;
  background:
    linear-gradient(135deg, rgba(2,33,42,.96), rgba(20,34,49,.98));
  border-bottom: 1px solid rgba(245,218,119,.16);
  font-weight: 900;
  letter-spacing: .01em;
}
.header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 4px;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(180deg, var(--ph-gold-2), var(--ph-coral));
}
.body { padding: 15px; }
.widget,
.search_widget,
.loginContainer,
.myaccount_widget,
.vote_widget {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(20,34,49,.94), rgba(8,15,23,.98));
  box-shadow: 0 15px 34px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.045);
}
.widget .body,
.search_widget .body,
.loginContainer .body { padding: 15px; }
.widget center,
.search_widget center { margin: auto; }
.widget h3 { margin: 10px 0 4px; }
.loginForm { display: flex; flex-direction: column; gap: 12px; }
.loginForm .well,
.loginForm center { width: 100%; }
.loginForm label,
.search_widget label {
  display: block;
  margin-bottom: 6px;
  color: var(--ph-text-soft);
  font-size: 13px;
  font-weight: 800;
}
.loginForm center p { color: var(--ph-text-muted); font-size: 13px; }
.loginForm center h3 a { color: var(--ph-gold-2); }
.searchForm,
.search_widget form { width: 100%; }
.search_widget input,
.searchForm input { width: 100%; }
.search_widget #name_suggestion {
  position: absolute;
  z-index: 70;
  top: 6px;
  left: 0;
  right: 0;
  display: none;
  padding: 8px;
  border: 1px solid rgba(245,218,119,.18);
  border-radius: 14px;
  background: rgba(6,10,15,.98);
  box-shadow: var(--ph-shadow);
}
.search_widget #name_suggestion.show { display: block; }
.search_widget .sname a {
  display: block;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--ph-text-soft);
}
.search_widget .sname a:hover { color: var(--ph-gold-2); background: rgba(255,255,255,.06); }

/* Tables/news */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ph-text-soft);
}
td, th { padding: 11px 12px; border-bottom: 1px solid rgba(255,255,255,.055); }
th { color: var(--ph-text); background: rgba(2,33,42,.62); font-weight: 900; }
tr:nth-child(2n+1) { background: rgba(255,255,255,.018); }
tr:hover { background: rgba(38,172,215,.055); }
.widget table,
.search_widget table { overflow: hidden; border-radius: 12px; background: rgba(0,0,0,.14); }
.widget table td:first-child {
  width: 45px;
  color: var(--ph-gold-2);
  text-align: center;
  font-weight: 900;
  background: rgba(255,255,255,.025);
}
#news,
#changelogTable,
.page_characterprofile #characterProfileTable {
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(12,27,39,.96), rgba(7,14,22,.96));
  box-shadow: 0 14px 32px rgba(0,0,0,.25);
}
#news tr,
#news tr:hover { background: transparent; }
#news td { border-bottom: 0; }
#news .yellow,
#changelogTable .yellow { background: linear-gradient(135deg, rgba(2,33,42,.98), rgba(21,32,44,.98)); }
#news .zheadline,
#changelogTable .yellow td {
  color: var(--ph-text-soft);
  font-size: 14px;
  border-bottom: 1px solid rgba(245,218,119,.14);
}
#news .zheadline b,
#changelogTable .yellow td { color: var(--ph-gold-2); }
#news p { padding: 8px 2px; color: var(--ph-text-soft); }
#news img {
  display: block;
  max-width: min(100%, 760px) !important;
  max-height: 430px;
  width: auto !important;
  height: auto !important;
  margin: 16px auto;
  border-radius: 16px;
  object-fit: contain;
}

/* Forms/buttons */
input,
select,
textarea {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  outline: none;
  color: var(--ph-text);
  background: rgba(3,8,13,.64);
  font-size: 14px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(245,218,119,.44);
  box-shadow: 0 0 0 3px rgba(245,218,119,.08);
}
input[type="submit"],
button,
.submitButton {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--ph-red), var(--ph-coral));
  box-shadow: 0 13px 24px rgba(217,24,40,.22), inset 0 1px 0 rgba(255,255,255,.20);
  font-weight: 900;
}
.loginForm input[type="submit"],
.loginForm button { width: 100%; }
input[type="submit"]:hover,
button:hover,
.submitButton:hover {
  cursor: pointer;
  transform: translateY(-1px);
  box-shadow: 0 17px 32px rgba(217,24,40,.32), inset 0 1px 0 rgba(255,255,255,.24);
}
input[type="checkbox"],
input[type="radio"] { width: auto; min-height: auto; }

/* Link buttons / account */
ul.linkbuttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
ul.linkbuttons li,
ul.linkbuttons li:nth-child(odd) { width: auto; margin: 0; float: none; border: 0; }
ul.linkbuttons li a,
div .displayPoints a {
  min-height: 42px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 12px;
  color: var(--ph-text-soft);
  background: rgba(255,255,255,.045);
  font-size: 13px;
  font-weight: 800;
}
ul.linkbuttons li a:hover,
div .displayPoints a:hover {
  color: var(--ph-text);
  border-color: rgba(245,218,119,.28);
  background: rgba(245,218,119,.08);
  transform: translateY(-1px);
}

/* Alerts */
.alert-box {
  max-width: 620px;
  margin: 0 auto 16px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--ph-border);
  text-align: center;
  color: var(--ph-text);
  background: rgba(255,255,255,.055);
}
.alert-default { background: rgba(245,218,119,.08); color: var(--ph-gold-2); border-color: rgba(245,218,119,.22); }
.alert-info { background: rgba(38,172,215,.10); color: #bdeeff; border-color: rgba(38,172,215,.25); }
.alert-success { background: rgba(82,210,122,.10); color: #b6f7c8; border-color: rgba(82,210,122,.22); }
.alert-warning { background: rgba(209,166,84,.12); color: var(--ph-gold-2); border-color: rgba(209,166,84,.25); }
.alert-danger { background: rgba(255,77,87,.11); color: #ffd1d4; border-color: rgba(255,77,87,.28); }
.alert-collapse { display:inline-block; }
.alert-size1 { font-size: 12px; }
.alert-size2 { font-size: 15px; }
.alert-size3 { font-size: 18px; }
.alert-size4 { font-size: 20px; }

/* Footer */
.siteFooter,
footer {
  margin-top: 22px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 20px;
  color: var(--ph-text-muted);
  background: linear-gradient(180deg, rgba(16,29,42,.90), rgba(6,11,18,.96));
  box-shadow: var(--ph-shadow-soft);
}
.siteFooter p,
footer p { margin: 0; font-size: 13px; }

/* Legacy fixes */
.modIcon > i:nth-child(2),
.modIcon:hover > i:nth-child(1) { display: none; }
.modIcon:hover > i:nth-child(2) { display: inline-block; }
.smedia { font-size: 20px; }
.smedia a { padding: 8px; }
.page_credits .feedContainer .pull-left.leftPane { box-sizing: border-box; padding-left: 18px; padding-right: 18px; }
.page_characterprofile #characterProfileTable thead th:first-of-type { position: relative; width: 28%; }
.page_characterprofile #characterProfileTable thead th:last-of-type { text-align: left; padding-left: 16px; }
.page_characterprofile .outfit { position: absolute; top: 0; left: 0; }
.page_characterprofile .flag { position: absolute; top: 16px; right: 16px; }
.postHolder iframe { display: block; margin: auto; }
.youtube .aspectratio { position: relative; width: 100%; height: 0; padding-bottom: 56.25%; }
.youtube .aspectratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
nav:not(.phNavbar) ul { display: flex; flex-wrap: wrap; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
