/* ==========================================================================
   HA777 GAMING - MASTER STYLESHEET
   Design System: Bright Luxury / Soft Glassmorphism
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-primary: #f8fafc;
  --bg-surface: rgba(255, 255, 255, 0.85);
  --bg-surface-solid: #ffffff;
  
  --primary-blue: #0284c7;    /* Sky Blue */
  --secondary-blue: #38bdf8;  /* Light Blue */
  --accent-royal: #1d4ed8;    /* Royal Blue Accent */
  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%);
  --soft-gradient: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-light: rgba(226, 232, 240, 0.8);
  --glass-border: rgba(255, 255, 255, 0.6);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(148, 163, 184, 0.1);
  --shadow-md: 0 8px 24px rgba(148, 163, 184, 0.15);
  --shadow-lg: 0 16px 32px rgba(2, 132, 199, 0.12);
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);

  /* Dimensions & Transitions */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* Global Container & Typography */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.section { padding: 80px 0; position: relative; }
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 48px auto;
  font-size: 1.1rem;
}

/* Glassmorphism Surface */
.glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glass);
}

/* Buttons & UI Elements */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: var(--transition-normal);
  cursor: pointer;
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
}

.btn-secondary {
  background: #ffffff;
  color: var(--primary-blue);
  border: 1px solid var(--primary-blue);
}
.btn-secondary:hover {
  background: var(--soft-gradient);
  transform: translateY(-2px);
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition-normal);
  padding: 20px 0;
}
.header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 12px 0;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  font-weight: 600;
  color: var(--text-main);
  transition: var(--transition-fast);
}
.nav-link:hover, .nav-link.active {
  color: var(--primary-blue);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: var(--transition-fast);
}
.hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
  padding: 160px 0 100px 0;
  background: radial-gradient(circle at 10% 20%, rgba(224, 242, 254, 0.6) 0%, rgba(248, 250, 252, 1) 90%);
  position: relative;
  overflow: hidden;
  
}
body{
    background:#fff !important;
}
.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-text h1 {
  font-size: 3.5rem;
  line-height: 1.15;
  font-weight: 900;
  margin-bottom: 20px;
}
.hero-text p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.hero-btns { display: flex; gap: 16px; }

.hero-image-wrapper {
  position: relative;
  text-align: center;
}

.hero-img {
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
}

/* Features Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.feature-card {
  padding: 32px;
  text-align: center;
  transition: var(--transition-normal);
}
.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 60px;
  height: 60px;
  background: var(--soft-gradient);
  color: var(--primary-blue);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  font-size: 1.5rem;
  font-weight: bold;
}

/* Games Grid & Cards */
.game-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
}
.game-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.game-img-holder {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background-color: #e2e8f0;
}

.game-img-holder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.game-card:hover .game-img-holder img {
  transform: scale(1.08);
}

.game-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-royal);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.game-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.game-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.game-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
  flex-grow: 1;
}

.game-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--text-light);
}

.game-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.game-actions .btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.85rem;
}

/* Stats Counter */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  background: var(--accent-gradient);
  border-radius: var(--radius-lg);
  padding: 48px;
  color: #fff;
  text-align: center;
}
.stat-number { font-size: 3rem; font-weight: 900; }
.stat-label { font-size: 0.95rem; opacity: 0.9; }

/* Contact Section & Form */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.9);
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.error-msg {
  color: #ef4444;
  font-size: 0.8rem;
  display: none;
}

/* FAQ Accordion */
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.faq-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-fast);
}
.faq-question {
  width: 100%;
  padding: 20px;
  text-align: left;
  background: var(--bg-surface-solid);
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-answer {
  padding: 0 20px 20px 20px;
  background: var(--bg-surface-solid);
  color: var(--text-muted);
  display: none;
}
.faq-item.active .faq-answer { display: block; }

/* Footer */
.footer {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 60px 0 20px 0;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col h4 { margin-bottom: 16px; font-weight: 700; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: var(--text-muted); transition: var(--transition-fast); }
.footer-col ul li a:hover { color: var(--primary-blue); }

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  color: var(--text-light);
  font-size: 0.85rem;
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Rules */
@media (max-width: 992px) {
  .hero-content, .contact-wrapper { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-text h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - 70px);
    background: #ffffff;
    flex-direction: column;
    padding: 40px 20px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
  }
  .nav-links.active { right: 0; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   INTERACTIVE GAME CONSOLE MODAL
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  background: var(--bg-surface-solid);
  width: 90%;
  max-width: 700px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}
.modal-overlay.active .modal-content {
  transform: scale(1);
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--soft-gradient);
}
.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-fast);
}
.modal-close:hover {
  color: #ef4444;
}
.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: #0b0f19; /* Cool arcade dark background */
}
#gameCanvas {
  background: #020617;
  border: 3px solid var(--primary-blue);
  border-radius: var(--radius-md);
  box-shadow: 0 0 20px rgba(2, 132, 199, 0.4);
  width: 100%;
  max-width: 600px;
  aspect-ratio: 3 / 2;
  cursor: pointer;
}
.game-controls {
  color: #94a3b8;
  font-size: 0.95rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.game-instructions {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
}
.game-mobile-btn-container {
  display: none;
  gap: 16px;
  margin-top: 8px;
  width: 100%;
  justify-content: center;
}
@media (max-width: 768px) {
  .game-mobile-btn-container {
    display: flex;
  }
}
.game-btn {
  padding: 12px 28px;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
  transition: transform 0.1s ease;
}
.game-btn:active {
  transform: scale(0.95);
}