/* ==========================================================================
   ENVELOPEHOST BRAND THEME FOR ANIME BATTLE
   Inherited directly from envelopehost.site design system
   ========================================================================== */

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

:root {
  --eh-neon-primary: #00F0FF;
  --eh-neon-secondary: #9D4EDD;
  --eh-neon-glow: rgba(0, 240, 255, 0.85);
  --eh-neon-glow-secondary: rgba(157, 78, 221, 0.7);
  --eh-bg-deep: #080B11;
  --eh-surface: rgba(13, 20, 32, 0.82);
  --eh-surface-card: rgba(15, 23, 42, 0.78);
  --eh-border: rgba(0, 240, 255, 0.15);
  --eh-border-active: rgba(0, 240, 255, 0.5);
  --eh-text: #e2e8f0;
  --eh-muted: #8E9BAE;
}

/* ===== GLOBAL BACKGROUND & SHELL ===== */
html, body.site-shell, #app-view {
  background-color: var(--eh-bg-deep) !important;
  background-image: radial-gradient(circle at 50% 10%, rgba(0, 240, 255, 0.08), transparent 60%),
                    linear-gradient(rgba(4, 6, 12, 0.78), rgba(4, 6, 12, 0.85)),
                    url('/images/envelopehost-bg.jpg') !important;
  background-size: cover !important;
  background-position: center top !important;
  background-attachment: fixed !important;
  color: var(--eh-text) !important;
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif !important;
}

/* Background overlay */
body.site-shell::before {
  content: ;
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(157, 78, 221, 0.06), transparent 50%),
              radial-gradient(ellipse at 20% 80%, rgba(0, 240, 255, 0.06), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Content wrapper above backdrop */
.app-shell, .app-main, .app-sidebar, .app-header {
  position: relative;
  z-index: 1;
}

/* ===== APP HEADER ===== */
.app-header {
  background: rgba(6, 9, 16, 0.88) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid var(--eh-border) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

.app-search {
  background: rgba(13, 20, 32, 0.75) !important;
  border: 1px solid var(--eh-border) !important;
  border-radius: 10px !important;
  transition: all 0.25s ease !important;
}

.app-search:focus-within {
  border-color: var(--eh-neon-primary) !important;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.3) !important;
}

.app-search input {
  color: #FFFFFF !important;
}

.app-search input::placeholder {
  color: var(--eh-muted) !important;
}

.app-language select {
  background: rgba(13, 20, 32, 0.8) !important;
  border: 1px solid var(--eh-border) !important;
  color: var(--eh-neon-primary) !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
}

/* Header Auth Buttons */
.auth-nav-btn, .header-account button {
  border-radius: 8px !important;
  font-weight: 700 !important;
  transition: all 0.25s ease !important;
}

#account-open {
  background: var(--eh-neon-primary) !important;
  color: var(--eh-bg-deep) !important;
  font-weight: 800 !important;
  border: none !important;
  padding: 8px 18px !important;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.35) !important;
}

#account-open:hover {
  animation: neonPulse 1s ease-in-out infinite !important;
  transform: translateY(-1px) !important;
}

/* ===== APP SIDEBAR ===== */
.app-sidebar {
  background: rgba(8, 11, 20, 0.88) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-right: 1px solid var(--eh-border) !important;
}

.app-nav-link, .app-nav a {
  color: var(--eh-muted) !important;
  border-radius: 8px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  font-weight: 600 !important;
}

.app-nav-link:hover, .app-nav a:hover {
  color: var(--eh-neon-primary) !important;
  background: rgba(0, 240, 255, 0.08) !important;
  transform: translateX(3px) !important;
}

.app-nav-link.active, .app-nav a.active, .app-nav-link[aria-current=page] {
  color: var(--eh-neon-primary) !important;
  background: rgba(0, 240, 255, 0.12) !important;
  border-left: 3px solid var(--eh-neon-primary) !important;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6) !important;
  box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.05) !important;
}

.app-nav-link svg, .app-nav a svg {
  color: inherit !important;
}

/* ===== CARDS & PANELS ===== */
.game-mode-card, .mode-card, .home-feature-card, .roster-card,
.community-card, .control-group, .info-card, .auth-form-box {
  background: var(--eh-surface) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid var(--eh-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.game-mode-card:hover, .mode-card:hover, .home-feature-card:hover,
.community-card:hover, .roster-card:hover {
  border-color: var(--eh-border-active) !important;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.22), 0 12px 30px rgba(0, 0, 0, 0.6) !important;
  transform: translateY(-3px) !important;
}

/* Card CTA Buttons */
.mode-card-btn, .game-mode-card button, .auth-submit-btn,
.home-play-now, [data-action=play] {
  background: var(--eh-neon-primary) !important;
  color: var(--eh-bg-deep) !important;
  font-weight: 800 !important;
  border: none !important;
  border-radius: 8px !important;
  transition: all 0.25s ease !important;
}

.mode-card-btn:hover, .game-mode-card button:hover, .auth-submit-btn:hover,
.home-play-now:hover, [data-action=play]:hover {
  animation: neonPulse 1s ease-in-out infinite !important;
  transform: translateY(-2px) !important;
}

/* Neon Pulse Animation from Envelopehost */
@keyframes neonPulse {
  0%   { box-shadow: 0 0 6px #00F0FF, 0 0 12px #00F0FF; }
  50%  { box-shadow: 0 0 18px #00F0FF, 0 0 35px #00F0FF; }
  100% { box-shadow: 0 0 6px #00F0FF, 0 0 12px #00F0FF; }
}

/* Character roster cards */
.roster-card:hover .roster-portrait-wrap {
  border-color: var(--eh-neon-primary) !important;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.4) !important;
}

/* Keymap controls badge */
.key-badge, .control-key {
  background: rgba(13, 20, 32, 0.9) !important;
  border: 1px solid var(--eh-neon-primary) !important;
  color: var(--eh-neon-primary) !important;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.25) !important;
  font-family: 'Space Grotesk', monospace !important;
  font-weight: 700 !important;
}

/* ==========================================================================
   ANIMATED ENVELOPEHOST LOGO SYSTEM
   Extracted from /var/www/envelopehost.site/assets/css/portal-light.css
   ========================================================================== */

.envelopehost-logo {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  position: relative;
  font-size: 7.5px;
  line-height: 1;
  padding: 8px 12px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
}

.envelopehost-logo:hover {
  transform: translateY(-2px);
}

.envelopehost-logo .eh-inner {
  display: flex;
  align-items: center;
  gap: 1em;
  position: relative;
  padding: 0.5em 1em;
  border-radius: 12px;
  overflow: hidden;
}

/* Quầng sáng Neon nền (Ambient Glow) */
.envelopehost-logo .eh-ambient-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(0, 240, 255, 0.25), transparent 70%);
  filter: blur(15px);
  opacity: 0.7;
  pointer-events: none;
  animation: ehGlowBreathe 3s ease-in-out infinite alternate;
}
@keyframes ehGlowBreathe {
  0% { opacity: 0.5; transform: scale(0.95); }
  100% { opacity: 0.9; transform: scale(1.05); }
}

/* Biểu tượng Phong bì Isometric 3D */
.envelopehost-logo .eh-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.envelopehost-logo .eh-isometric-envelope {
  width: 3.8em;
  height: 3.6em;
  filter: drop-shadow(0 0 10px var(--eh-neon-glow));
  transition: filter 0.3s;
}

/* Hiệu ứng đèn LED & dữ liệu chạy trong phong bì */
.envelopehost-logo .eh-data-pulse {
  stroke-dasharray: 3 3;
  animation: ehDataStream 1.8s linear infinite;
}
@keyframes ehDataStream {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 20; }
}

.envelopehost-logo .eh-led-blink {
  animation: ehLedPulse 1.2s ease-in-out infinite alternate;
}
@keyframes ehLedPulse {
  0% { opacity: 0.3; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.1); filter: drop-shadow(0 0 5px currentColor); }
}

.envelopehost-logo .eh-hologram-letter {
  animation: ehFloatHologram 2.5s ease-in-out infinite alternate;
  transform-origin: center;
}
@keyframes ehFloatHologram {
  0% { transform: translateY(0); opacity: 0.8; }
  100% { transform: translateY(-7px); opacity: 1; filter: drop-shadow(0 -4px 10px var(--eh-neon-primary)); }
}

/* Typography Tên Thương Hiệu */
.envelopehost-logo .eh-text-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.envelopehost-logo .eh-brand-title {
  display: flex;
  align-items: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 2.1em;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #FFFFFF;
  text-shadow: 
    0 0 10px rgba(0, 240, 255, 0.4),
    0 2px 10px rgba(0, 0, 0, 0.9);
  line-height: 1;
  transition: all 0.3s ease;
}

.envelopehost-logo .eh-word-envelope {
  color: #FFFFFF;
  letter-spacing: 0.5px;
}

.envelopehost-logo .eh-word-host {
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  margin-left: 0.18em;
  letter-spacing: 0.5px;
}

.envelopehost-logo .eh-stylized-o {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 1px;
  vertical-align: middle;
}

.envelopehost-logo .eh-fan-housing {
  width: 0.86em;
  height: 0.86em;
  filter: drop-shadow(0 0 8px var(--eh-neon-glow));
}

.envelopehost-logo .eh-fan-blades {
  transform-origin: 13px 13px;
  animation: ehFanSpin 3.5s linear infinite;
}
@keyframes ehFanSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Slogan / Subtitle: ANIME BATTLE */
.envelopehost-logo .eh-brand-tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65em;
  font-weight: 800;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--eh-neon-primary);
  margin-top: 0.45em;
  white-space: nowrap;
  line-height: 1.2;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

/* =========================================================
   HIỆU ỨNG TIA CHỚP LASER NEON QUÉT (NEON SWEEP ANIMATION)
   ========================================================= */

.envelopehost-logo .eh-neon-beam {
  position: absolute;
  top: -20%;
  left: -30%;
  width: 100px;
  height: 140%;
  pointer-events: none;
  opacity: 0;
  transform: skewX(-25deg);
  z-index: 10;
}

.envelopehost-logo .eh-laser-head {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 5px;
  background: #FFFFFF;
  box-shadow: 
    0 0 15px #FFFFFF,
    0 0 30px var(--eh-neon-primary),
    0 0 60px var(--eh-neon-primary),
    0 0 90px var(--eh-neon-secondary);
}

.envelopehost-logo .eh-laser-trail {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 5px;
  width: 95px;
  background: linear-gradient(to left, 
    rgba(255, 255, 255, 0.95) 0%,
    var(--eh-neon-glow) 25%, 
    var(--eh-neon-glow-secondary) 65%, 
    transparent 100%);
  filter: blur(3px);
}

/* Khi kích hoạt class .is-flashing */
.envelopehost-logo.is-flashing .eh-neon-beam {
  animation: ehNeonSweep 0.8s cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
}

.envelopehost-logo.is-flashing .eh-isometric-envelope {
  animation: ehIconShock 0.8s ease-out;
}

.envelopehost-logo.is-flashing .eh-brand-title {
  animation: ehTextFlash 0.8s ease-out;
}

.envelopehost-logo.is-flashing .eh-brand-tagline {
  animation: ehTaglineFlash 0.8s ease-out;
}

.envelopehost-logo.is-flashing .eh-fan-blades {
  animation: ehFanFastSpin 0.8s cubic-bezier(0.2, 0.8, 0.25, 1), ehFanSpin 3.5s linear infinite;
}

@keyframes ehNeonSweep {
  0%   { left: -30%; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { left: 130%; opacity: 0; }
}

@keyframes ehIconShock {
  0%   { filter: drop-shadow(0 0 10px var(--eh-neon-glow)); transform: scale(1); }
  30%  { filter: drop-shadow(0 0 30px var(--eh-neon-primary)) drop-shadow(0 0 50px var(--eh-neon-secondary)); transform: scale(1.08); }
  100% { filter: drop-shadow(0 0 10px var(--eh-neon-glow)); transform: scale(1); }
}

@keyframes ehTextFlash {
  0%   { color: #FFFFFF; text-shadow: 0 0 10px rgba(0, 240, 255, 0.4), 0 2px 10px rgba(0, 0, 0, 0.9); }
  35%  { color: #FFFFFF; text-shadow: 0 0 20px #FFFFFF, 0 0 40px var(--eh-neon-primary), 0 0 70px var(--eh-neon-secondary); }
  100% { color: #FFFFFF; text-shadow: 0 0 10px rgba(0, 240, 255, 0.4), 0 2px 10px rgba(0, 0, 0, 0.9); }
}

@keyframes ehTaglineFlash {
  0%   { color: var(--eh-neon-primary); }
  50%  { color: #FFFFFF; text-shadow: 0 0 14px var(--eh-neon-primary); }
  100% { color: var(--eh-neon-primary); }
}

@keyframes ehFanFastSpin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(720deg); }
}

/* Ensure site brand header container displays smoothly */
.site-brand {
  display: flex !important;
  align-items: center !important;
  text-decoration: none !important;
  padding: 4px !important;
}

.site-brand #brand-logo {
  display: none !important; /* Hide old static image logo in favor of live animated SVG logo */
}
