/* Import premium Google Fonts for coding/gaming vibes */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --font-title: 'Space Grotesk', 'Montserrat', sans-serif;
  --font-body: 'Montserrat', sans-serif;

  --bg-dark: #070312;
  --bg-card: rgba(255, 255, 255, 0.02);
  --border-light: rgba(255, 255, 255, 0.07);
  --text-white: #ffffff;
  --text-gray: #a0aec0;
  --text-muted: #64748b;
  
  /* Game Program Themes (Cyan/Blue) */
  --game-color: #00f2fe;
  --game-gradient: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
  --game-glow: rgba(0, 198, 255, 0.3);

  /* Game Art Program Themes (Magenta/Pink/Purple) */
  --art-color: #ff007f;
  --art-gradient: linear-gradient(135deg, #ff007f 0%, #7928ca 100%);
  --art-glow: rgba(255, 0, 127, 0.3);

  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  font-family: var(--font-body);
  color: var(--text-white);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Background grid patterns and glow elements */
.bg-animations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.bg-animations::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  opacity: 0.6;
}

.glow-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.25;
  transition: var(--transition-smooth);
}

.glow-sphere-left {
  top: 20%;
  left: 10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--game-color) 0%, transparent 70%);
}

.glow-sphere-right {
  bottom: 20%;
  right: 10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--art-color) 0%, transparent 70%);
}

/* Header style */
header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(7, 3, 18, 0.7) 0%, transparent 100%);
  border-bottom: none;
  backdrop-filter: none;
  pointer-events: none;
}

header .brand, header .lang-toggle {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logos {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.brand-text {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #ffffff, #a0aec0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}

/* Language switch styling */
.lang-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  padding: 4px;
  border-radius: 30px;
  position: relative;
  gap: 4px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-gray);
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.lang-btn img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.lang-btn:hover:not(.active) {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}

/* Split Screen Portal Layout */
.split-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  z-index: 1; /* Sits below the footer and logo */
  overflow: hidden;
}

.split-side {
  position: relative;
  flex: 1;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.side-left {
  background-color: #c1272d; /* Match the red background of gameart.png */
}

.side-right {
  background-color: #2e3493; /* Match the blue background of tkptgame.png */
}

.side-left .side-bg {
  background-image: url('image_start_monitor/gameart.png');
  background-position: right center;
}

.side-right .side-bg {
  background-image: url('image_start_monitor/tkptgame.png');
  background-position: left center;
}

/* Aura Glow System (Only glowing borders and ambient vignette, no scaling) */
.aura-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 2;
}

/* Left side Aura (Enhanced Vibrant Crimson Red Border and Inner Glow) */
.side-left .aura-glow {
  background: radial-gradient(circle at 35% 50%, rgba(255, 0, 60, 0.22) 0%, rgba(255, 0, 60, 0.08) 50%, transparent 80%);
  box-shadow: inset 0 0 80px rgba(255, 0, 60, 0.9), inset 0 0 140px rgba(255, 0, 60, 0.45);
  border: 6px solid transparent;
  border-image: linear-gradient(to bottom, #ff0055 0%, #ff003c 100%) 1;
}

/* Right side Aura (Neon Blue/Cyan Border and Inner Glow) */
.side-right .aura-glow {
  background: radial-gradient(circle at 65% 50%, rgba(0, 191, 255, 0.22) 0%, rgba(0, 191, 255, 0.08) 50%, transparent 80%);
  box-shadow: inset 0 0 80px rgba(0, 191, 255, 0.9), inset 0 0 140px rgba(0, 191, 255, 0.45);
  border: 6px solid transparent;
  border-image: linear-gradient(to bottom, #00f2fe 0%, #0072ff 100%) 1;
}

/* Hover Interaction - Only show Aura, No flex scaling or brightness reduction */
.split-side:hover .aura-glow {
  opacity: 1;
}

/* Pulsing aura border glow keyframes */
@keyframes aura-pulse-left {
  0% {
    box-shadow: inset 0 0 50px rgba(255, 0, 60, 0.65), inset 0 0 100px rgba(255, 0, 60, 0.3);
    opacity: 0.85;
  }
  100% {
    box-shadow: inset 0 0 120px rgba(255, 0, 60, 1.0), inset 0 0 160px rgba(255, 0, 60, 0.6);
    opacity: 1;
  }
}

@keyframes aura-pulse-right {
  0% {
    box-shadow: inset 0 0 50px rgba(0, 191, 255, 0.65), inset 0 0 100px rgba(0, 191, 255, 0.3);
    opacity: 0.85;
  }
  100% {
    box-shadow: inset 0 0 120px rgba(0, 191, 255, 1.0), inset 0 0 160px rgba(0, 191, 255, 0.6);
    opacity: 1;
  }
}

.side-left:hover .aura-glow {
  animation: aura-pulse-left 2s infinite alternate ease-in-out;
}

.side-right:hover .aura-glow {
  animation: aura-pulse-right 2s infinite alternate ease-in-out;
}

/* Center Logo Badge Styles */
.center-logo-container {
  position: absolute;
  bottom: 140px; /* Positions logo vertically on the top border of the footer banner */
  left: 50%;
  transform: translate(-50%, 50%); /* Center horizontally and center vertically on top-border line */
  z-index: 10; /* Highest z-index to overlay on top of footer (z-index 5) and split container (z-index 1) */
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.5s ease;
}

.logo-wrapper {
  width: 204px; /* Increased 20% from 170px */
  height: 204px; /* Increased 20% from 170px */
  border-radius: 50%;
  background: #ffffff;
  padding: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
  position: relative;
  transition: all 0.5s ease;
}

.logo-wrapper::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7928ca 0%, #ff007f 50%, #00f2fe 100%);
  z-index: -1;
  transition: all 0.5s ease;
  box-shadow: 0 0 25px rgba(121, 40, 202, 0.4);
}

.center-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Dynamic Logo Interaction via Sibling selector (Only border glow color changes, no scaling) */
.split-container:has(.side-left:hover) ~ .center-logo-container .logo-wrapper::before {
  background: linear-gradient(135deg, #ff007f 0%, #dc143c 100%);
  box-shadow: 0 0 40px rgba(255, 0, 60, 0.95);
}

.split-container:has(.side-right:hover) ~ .center-logo-container .logo-wrapper::before {
  background: linear-gradient(135deg, #00f2fe 0%, #0072ff 100%);
  box-shadow: 0 0 40px rgba(0, 191, 255, 0.95);
}

/* Footer Section */
.footer-banner {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 140px;
  z-index: 5; /* Overlaps split-container (z-index 1) but stays below logo-container (z-index 10) */
  pointer-events: none;
  overflow: hidden;
}

.footer-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.footer-text {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 6;
  color: var(--text-muted);
  font-size: 0.82rem;
  pointer-events: none;
}

/* Language Selection System (Zero Dependency) */
[lang="en"] .lang-vi {
  display: none !important;
}

[lang="vi"] .lang-en {
  display: none !important;
}

/* Responsiveness adjustments */
@media (max-width: 768px) {
  header {
    padding: 16px 20px;
  }
  
  .brand-text {
    font-size: 0.9rem;
  }
  
  .split-container {
    flex-direction: column;
  }
  
  .split-side {
    width: 100%;
    height: 50%;
  }
  
  .side-left .side-bg {
    background-position: center bottom;
  }

  .side-right .side-bg {
    background-position: center top;
  }
  
  .center-logo-container {
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  
  .logo-wrapper {
    width: 144px; /* Increased 20% from 120px */
    height: 144px; /* Increased 20% from 120px */
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }
  
  .logo-wrapper::before {
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
  }

  .footer-banner {
    height: auto;
  }

  .footer-img {
    display: none;
  }
  
  .footer-text {
    bottom: 12px;
    font-size: 0.72rem;
    padding: 0 10px;
  }
}
