html {
  scroll-behavior: smooth;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 23, 53, 0.45);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  width: 90%;
  max-width: 520px;
  background: white;
  padding: 32px;
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
  position: relative;
  animation: popup 0.25s ease;
}

.close-modal {
  position: absolute;
  top: 16px;
  right: 18px;
  border: none;
  background: #f1efff;
  color: #5b4be8;
  font-size: 26px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
}

.modal-box h2 {
  color: #5b4be8;
  margin-bottom: 18px;
}

.modal-box p,
.modal-box li {
  color: #5f5f78;
  line-height: 1.7;
  font-size: 15px;
}

.modal-box ul {
  padding-left: 20px;
}

@keyframes popup {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: #fbfaff;
  color: #171735;
  padding: 30px 60px;
}

/* NAVBAR */
.navbar {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: #5b4be8;
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo h2 {
  font-size: 20px;
  line-height: 1;
}

.logo p {
  font-size: 12px;
  font-weight: 600;
}

.nav-menu {
  display: flex;
  gap: 50px;
  list-style: none;
}

.nav-menu a {
  text-decoration: none;
  color: #4d4d68;
  font-weight: 500;
}

.nav-menu a:hover {
  color: #5b4be8;
}

.login-btn {
  padding: 12px 24px;
  border: 2px solid #b8aefc;
  background: white;
  color: #5b4be8;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* HERO */
.hero {
  min-height: 560px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 50px;
}

.hero-left h1 {
  font-size: 56px;
  line-height: 1.2;
  margin-bottom: 22px;
}

.hero-left h1 span {
  color: #5b4be8;
}

.hero-left > p {
  max-width: 520px;
  color: #696981;
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 38px;
}

.role-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 580px;
}

.role-card {
  background: white;
  border: 1.5px solid #e2defa;
  border-radius: 18px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(91, 75, 232, 0.08);
}

.role-card:hover {
  transform: translateY(-5px);
  transition: 0.3s;
}

.role-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
}

.host-icon {
  background: #5b4be8;
}

.player-icon {
  background: #43c47a;
}

.role-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.role-card p {
  color: #66677a;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 22px;
}

.host-btn,
.player-btn {
  width: 100%;
  border: none;
  padding: 14px;
  color: white;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.login-modal {
  position: fixed;
  inset: 0;
  background: rgba(23, 23, 53, 0.45);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.login-modal.active {
  display: flex;
}

.login-box {
  width: 90%;
  max-width: 420px;
  background: white;
  padding: 35px;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  position: relative;
  text-align: center;
}

.close-login {
  position: absolute;
  top: 16px;
  right: 18px;
  border: none;
  background: #f1efff;
  color: #5b4be8;
  font-size: 26px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
}

.login-box h2 {
  color: #171735;
  margin-bottom: 10px;
}

.login-box p {
  color: #696981;
  margin-bottom: 24px;
}

.login-box input {
  width: 100%;
  padding: 15px;
  border: 1.5px solid #e1dcff;
  border-radius: 14px;
  margin-bottom: 20px;
  outline: none;
  font-size: 15px;
}

.submit-login {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 14px;
  background: #5b4be8;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.host-btn {
  background: #5b4be8;
}

.player-btn {
  background: #43c47a;
}

.hero-right img {
  width: 100%;
  max-width: 600px;
}

/* STATS */
.stats {
  margin-top: 20px;
  background: white;
  border: 1px solid #eeeafd;
  border-radius: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 26px 20px;
  box-shadow: 0 10px 25px rgba(91, 75, 232, 0.06);
}

.stat-box {
  text-align: center;
  border-right: 1px solid #eeeafd;
}

.stat-box:last-child {
  border-right: none;
}

.stat-box h2 {
  color: #171735;
  font-size: 22px;
}

.stat-box p {
  color: #696981;
  font-size: 13px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  body {
    padding: 20px;
  }

  .nav-menu {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-left h1 {
    font-size: 40px;
  }

  .hero-left > p {
    margin-left: auto;
    margin-right: auto;
  }

  .role-container {
    margin: auto;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .stat-box {
    border-right: none;
  }
}

@media (max-width: 600px) {
  .role-container {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}