/* Fade-in */
body { opacity: 0; animation: fadeIn 1s ease forwards; }
@keyframes fadeIn { to { opacity: 1; } }

/* ALLES OMHOOG + CENTREREN */
body {
  margin: 0;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  font-family: 'Segoe UI', sans-serif;
  color: white;
  overflow-x: hidden;
  overflow-y: auto;
  text-align: center;
  background: linear-gradient(135deg, #0f001a, #2a004d);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  position: relative;
  padding-top: 8vh;
  padding-bottom: 140px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html {
  height: -webkit-fill-available;
  background: #0f001a;
}
#starfield { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }

/* LOGO – MEGA GROOT */
.logo-container { 
  margin-bottom: 50px; 
  position: relative; 
  display: inline-block; 
}
.logo {
  height: 320px;
  filter: drop-shadow(0 0 40px rgba(255,179,0,0.9));
  transition: transform 0.4s ease;
}
.logo-container:hover .logo { 
  transform: scale(1.08); 
}

/* Player count tooltip */
.tooltip .tooltiptext {
  visibility: hidden; 
  background: rgba(0,0,0,0.92); 
  color: #ffb300;
  padding: 12px 18px; 
  border-radius: 12px; 
  position: absolute; 
  bottom: -78px; 
  left: 50%;
  transform: translateX(-50%); 
  font-weight: bold; 
  font-size: 1.15rem; 
  opacity: 0;
  transition: opacity 0.3s; 
  white-space: nowrap; 
  z-index: 10;
}
.tooltip:hover .tooltiptext { visibility: visible; opacity: 1; }

/* WHITELIST NOTIFICATIE - RECHTERBOVENHOEK */
.whitelist-notification {
  position: fixed;
  top: 20px;
  right: -400px;
  background: #2a0040;
  padding: 20px 24px;
  border-radius: 16px;
  max-width: 360px;
  box-shadow: 0 8px 32px rgba(155,0,255,0.7);
  z-index: 1000;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: 2px solid rgba(155,0,255,0.3);
}
.whitelist-notification.show {
  right: 20px;
  opacity: 1;
}
.whitelist-notification.hide {
  right: -400px;
  opacity: 0;
}
.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.whitelist-notification h3 {
  color: #ffb300;
  margin: 0;
  font-size: 1.3rem;
  flex: 1;
}
.notification-close {
  background: none;
  border: none;
  color: #ffb300;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  margin-left: 12px;
  line-height: 1;
  transition: all 0.3s;
  flex-shrink: 0;
}
.notification-close:hover {
  color: #ff8c00;
  transform: rotate(90deg) scale(1.2);
}
.whitelist-notification p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.95);
}
.whitelist-notification a {
  color: #ffb300;
  font-weight: bold;
  text-decoration: underline !important;
  transition: color 0.3s;
}
.whitelist-notification a:hover {
  color: #ff8c00;
}

/* KNOPPEN NAAST ELKAAR */
.btn-container {
  display: flex; 
  gap: 32px; 
  flex-wrap: wrap; 
  justify-content: center; 
  margin-top: 20px;
}
.download-btn {
  position: relative; 
  padding: 18px 42px; 
  font-size: 1.4rem; 
  font-weight: bold;
  border: none; 
  border-radius: 50px; 
  cursor: pointer; 
  overflow: hidden; 
  min-width: 250px;
  background: linear-gradient(135deg, #ffb300, #ff8c00); 
  color: #000;
  box-shadow: 0 8px 28px rgba(255,179,0,0.45); 
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.4s ease;
}
.download-btn::before {
  content: ''; 
  position: absolute; 
  top: 0; 
  left: -100%; 
  width: 100%; 
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transition: 0.7s;
}
.download-btn:hover::before { left: 100%; }
.download-btn:hover { 
  transform: translateY(-7px); 
  box-shadow: 0 18px 40px rgba(255,179,0,0.7); 
}

/* GEEN ONDERSTREPINGEN */
a { text-decoration: none !important; }

/* DISCORD ICOON – PERFECT RONDE CIRKEL (versterkt met clip-path) */
.discord-footer {
  position: fixed; 
  bottom: 40px; 
  left: 50%; 
  transform: translateX(-50%); 
  z-index: 100;
}
.discord-btn {
  display: block;
  width: 84px;
  height: 84px;
  background: url('discord.png') center/cover no-repeat;
  border-radius: 50%;
  transition: all 0.4s ease;
  filter: drop-shadow(0 8px 20px rgba(88,101,242,0.6));
  overflow: hidden;
  border: 4px solid rgba(88, 101, 242, 0.4);
  box-sizing: border-box;
  clip-path: circle(50% at 50% 50%);  /* Extra clip voor perfecte cirkel, ook bij niet-vierkante images */
}
.discord-btn:hover {
  transform: translateY(-12px) scale(1.18);
  filter: drop-shadow(0 20px 40px rgba(88,101,242,0.9));
  border-color: rgba(88, 101, 242, 0.8);
}

/* MODAL */
.modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
  background: rgba(0,0,0,0.85);
  display: flex; justify-content: center; align-items: center; 
  opacity: 0; pointer-events: none;
  transition: 0.3s; backdrop-filter: blur(10px);
}
.modal:not(.hidden) { opacity: 1; pointer-events: auto; }
.modal-content {
  background: #2a0040; 
  padding: 40px; 
  border-radius: 20px; 
  width: 90%; 
  max-width: 460px;
  box-shadow: 0 0 45px rgba(155,0,255,0.6); 
  animation: popIn 0.4s ease;
  position: relative;  /* Voor absolute positionering van close-knop */
}
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* SLUIT-KNOP ALS X RECHTSBOVEN */
.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #ffb300;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.3s, transform 0.3s;
}
.modal-close:hover {
  color: #ff8c00;
  transform: rotate(90deg) scale(1.2);
}

.modal-option {
  width: 100%; 
  padding: 16px; 
  margin: 14px 0; 
  background: #9b00ff; 
  color: white;
  border: none; 
  border-radius: 12px; 
  cursor: pointer; 
  font-size: 1.15rem; 
  font-weight: bold;
  transition: 0.3s;
}
.modal-option:hover { background: #c54bff; transform: translateY(-4px); }

.install-instructions {
  margin: 25px 0; 
  background: rgba(255,255,255,0.1); 
  padding: 20px; 
  border-radius: 14px; 
  text-align: left;
}
.install-instructions h3 { 
  text-align: center; 
  color: #ffb300; 
  margin: 0 0 12px 0; 
}

/* RESPONSIVE */
@media (max-width: 640px) {
  body { 
    padding-top: max(8vh, env(safe-area-inset-top, 20px)); 
    padding-bottom: max(140px, calc(140px + env(safe-area-inset-bottom, 0px)));
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
  .logo { height: 200px; }
  .logo-container { margin-bottom: 40px; }
  .whitelist-notification {
    top: max(10px, env(safe-area-inset-top, 10px));
    right: -100%;
    max-width: calc(100% - 20px);
    padding: 16px 18px;
  }
  .whitelist-notification.show {
    right: 10px;
  }
  .whitelist-notification h3 { font-size: 1.15rem; }
  .whitelist-notification p { font-size: 0.95rem; }
  .notification-close { font-size: 20px; margin-left: 8px; }
  .btn-container { 
    flex-direction: column; 
    gap: 16px; 
    margin-top: 16px;
    padding: 0 16px;
    width: 100%;
    box-sizing: border-box;
  }
  .download-btn { 
    font-size: 1.2rem; 
    padding: 15px 30px; 
    min-width: unset;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
  .discord-footer {
    bottom: max(30px, calc(30px + env(safe-area-inset-bottom, 0px)));
  }
  .discord-btn { 
    width: 70px; 
    height: 70px; 
    border-width: 3px; 
  }
  .modal-content {
    width: 92%;
    padding: 30px 20px;
    max-width: 400px;
  }
  .modal-close { font-size: 24px; top: 10px; right: 10px; }
  .modal-option {
    font-size: 1.05rem;
    padding: 14px;
  }
  .install-instructions {
    padding: 16px;
    margin: 20px 0;
  }
  .install-instructions h3 {
    font-size: 1.15rem;
  }
  .install-instructions ol {
    font-size: 0.95rem;
    padding-left: 20px;
  }
  .tooltip .tooltiptext {
    font-size: 1rem;
    padding: 10px 14px;
    bottom: -70px;
  }
}

/* Extra kleine schermen */
@media (max-width: 380px) {
  .logo { height: 180px; }
  .whitelist-notification {
    padding: 14px 16px;
  }
  .whitelist-notification h3 { font-size: 1.05rem; }
  .whitelist-notification p { font-size: 0.9rem; }
  .download-btn {
    font-size: 1.1rem;
    padding: 14px 26px;
  }
}