/* Krafton Page Styling */

/* Header - Diegetic HUD Element */
.krafton-header {
  position: relative;
  width: 100%;
  padding: 0;
  margin: 0;
  /* Frosted glass background */
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* Clip-path to create the centered dip/notch */
  clip-path: polygon(
    0% 0%,
    100% 0%,
    100% calc(100% - 20px),
    calc(50% + 80px) calc(100% - 20px),
    calc(50% + 60px) 100%,
    calc(50% + 40px) calc(100% - 15px),
    calc(50% + 10px) calc(100% - 20px),
    calc(50% - 10px) calc(100% - 20px),
    calc(50% - 40px) calc(100% - 15px),
    calc(50% - 60px) 100%,
    calc(50% - 80px) calc(100% - 20px),
    0% calc(100% - 20px),
    0% 100%
  );
  /* Cyan-to-teal inner glow */
  box-shadow: 
    inset 0 0 0 1px rgba(0, 255, 255, 0.3),
    inset 0 0 10px rgba(0, 255, 255, 0.15),
    inset 0 0 30px rgba(0, 255, 255, 0.05),
    0 4px 30px rgba(0, 255, 255, 0.1);
  border-bottom: 1px solid rgba(0, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Inner border glow overlay */
.krafton-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 255, 255, 0.03) 50%,
    rgba(0, 255, 255, 0.08) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Pulsing glow animation for the HUD effect */
@keyframes hudPulse {
  0%, 100% {
    box-shadow: 
      inset 0 0 0 1px rgba(0, 255, 255, 0.3),
      inset 0 0 10px rgba(0, 255, 255, 0.15),
      inset 0 0 30px rgba(0, 255, 255, 0.05),
      0 4px 30px rgba(0, 255, 255, 0.1);
  }
  50% {
    box-shadow: 
      inset 0 0 0 1px rgba(0, 255, 255, 0.5),
      inset 0 0 15px rgba(0, 255, 255, 0.25),
      inset 0 0 40px rgba(0, 255, 255, 0.1),
      0 4px 30px rgba(0, 255, 255, 0.15);
  }
}

.krafton-header {
  animation: hudPulse 4s ease-in-out infinite;
}

/* Logo notch area */
.krafton-logo {
  position: relative;
  z-index: 2;
  color: #00FFFF;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 8px;
  text-transform: uppercase;
  text-shadow: 
    0 0 10px rgba(0, 255, 255, 0.8),
    0 0 20px rgba(0, 255, 255, 0.4),
    0 0 40px rgba(0, 255, 255, 0.2);
  padding: 1.5rem 3rem;
  font-family: 'Segoe UI', 'Arial Black', sans-serif;
  /* Center the logo in the notch */
  margin-left: auto;
  margin-right: auto;
  transform: translateX(calc(-50% + 120px));
}

/* Glowing corner accents for HUD feel */
.krafton-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 60px;
  border-top: 2px solid rgba(0, 255, 255, 0.4);
  border-left: 2px solid rgba(0, 255, 255, 0.4);
  z-index: 3;
}

/* Close button styled as HUD element */
.krafton-header .close-button {
  position: absolute;
  top: 15px;
  right: 20px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(0, 255, 255, 0.05);
  color: #00FFFF;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
  text-decoration: none;
}

.krafton-header .close-button:hover {
  background: rgba(0, 255, 255, 0.15);
  border-color: rgba(0, 255, 255, 0.6);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Corner decorations */
.hud-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  z-index: 3;
}

.hud-corner--tl {
  top: 8px;
  left: 8px;
  border-top: 1px solid rgba(0, 255, 255, 0.5);
  border-left: 1px solid rgba(0, 255, 255, 0.5);
}

.hud-corner--tr {
  top: 8px;
  right: 60px;
  border-top: 1px solid rgba(0, 255, 255, 0.5);
  border-right: 1px solid rgba(0, 255, 255, 0.5);
}

.hud-corner--bl {
  bottom: 8px;
  left: 8px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.5);
  border-left: 1px solid rgba(0, 255, 255, 0.5);
}

.hud-corner--br {
  bottom: 8px;
  right: 60px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.5);
  border-right: 1px solid rgba(0, 255, 255, 0.5);
}

/* Sub scanline overlay for HUD feel */
@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.krafton-header .scanline-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 255, 0.008) 2px,
    rgba(0, 255, 255, 0.008) 4px
  );
  pointer-events: none;
  z-index: 2;
}

.header h1 {
  color: white;
  font-size: 2.5rem;
  margin: 0;
}

/* Main Banner */
.banner {
  background: url('https://example.com/banner.jpg') center/cover;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.banner h2 {
  color: white;
  font-size: 3rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

/* Close Button */
.close-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #ff4d4f;
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1.2rem;
  z-index: 2;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  margin-top: 2rem;
}

.game-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.game-card:hover {
  transform: translateY(-5px);
}

.game-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.game-card h3 {
  padding: 1rem;
  color: #333;
  font-size: 1.2rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .games-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.footer {
  text-align: center;
  padding: 1rem;
  background: #f8f9fa;
  border-top: 1px solid #eaeaea;
}

.footer p {
  color: #6c757d;
  font-size: 0.9rem;
}
