@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,300;0,400;0,600;0,800;1,800&display=swap');

:root {
  /* Cinematic Color Palette */
  --overlay: rgba(0, 0, 0, 0.65);
  /* Darken the bg image */
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-glow: rgba(255, 255, 255, 0.15);
  --accent: #FFD700;
  /* Gold */
  --accent-glow: #ffae00;
  --text: #e0e0e0;
  --text-dim: #a0a0b0;

  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Kanit', sans-serif;
  color: var(--text);
  background: #000;
  /* Fallback */
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Image Layer */
.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../img/fa+ma.png') center/cover no-repeat;
  z-index: -2;
}

/* Overlay darker to make text pop */
.bg-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.8));
  backdrop-filter: blur(2px);
  /* Very slight blur to image */
}

/* Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 500px;
  background: rgba(20, 20, 25, 0.9);
  /* Darker panel */
  border: 1px solid var(--accent);
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.2);
  padding: 30px;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 16px;
}

.modal-header h3 {
  margin: 0;
  color: var(--accent);
  font-size: 1.5rem;
}

.dl-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.dl-option:last-child {
  margin-bottom: 0;
}

.dl-option:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: var(--accent);
  transform: translateX(5px);
}

.dl-info {
  display: flex;
  flex-direction: column;
}

.dl-info strong {
  color: #fff;
  font-size: 1.1rem;
}

.dl-info span {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.dl-option .material-symbols-outlined {
  color: var(--accent);
}

/* Particle Canvas handled by JS (z-index: -1) */

/* Layout Wrapper */
.main-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Shared Glass Styles */
.glass {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border-radius: var(--radius);
}

/* Header */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  margin-top: 20px;
  border-radius: 999px;
  /* Pill shape */
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.brand img {
  height: 40px;
  width: auto;
}

.nav-cta {
  text-decoration: none;
  color: #000;
  background: var(--accent);
  padding: 10px 24px;
  border-radius: 99px;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.nav-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
  background: #fff;
}

/* Hero Section */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 0;
}

h1.hero-title {
  font-size: clamp(3rem, 10vw, 7rem);
  /* Huge cinematic title */
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -2px;
  margin: 0;
  /* Gradient: White -> Cyan -> Green -> Yellow */
  background: linear-gradient(90deg, #FFFFFF 0%, #A0F0FF 40%, #B0FFB0 70%, #FFD700 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.8));
  animation: float 6s ease-in-out infinite;
}

h1.hero-title span {
  display: block;
  font-size: 0.4em;
  font-weight: 400;
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
  -webkit-text-fill-color: initial;
  /* allow color override */
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

/* IP Copy Pill */
.ip-pill {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  margin-top: 30px;
  padding: 12px 12px 12px 24px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.ip-pill code {
  color: #fff;
  font-family: monospace;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.icon-btn {
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
  position: relative;
  /* For tooltip positioning */
}

.icon-btn:hover {
  background: var(--accent);
  color: #000;
}

/* Copy Tooltip */
.copy-feedback {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--accent);
  color: #000;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.copy-feedback.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.copy-feedback::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: var(--accent);
}

/* Quick Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* Adjusted to 2 cols */
  gap: 20px;
  margin: 60px 0;
  width: 100%;
  max-width: 600px;
  /* Reduced max-width to keep them tighter */
}

.info-card {
  padding: 24px;
  text-align: center;
  transition: transform 0.3s;
}

.info-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
}

.info-card h3 {
  opacity: 0.6;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  margin: 0 0 8px;
}

.info-card p {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

/* Downloads */
.dl-section {
  width: 100%;
  max-width: 900px;
  margin-bottom: 60px;
}

.dl-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.dl-box {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  /* Stretch to fill width */
  min-height: 180px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s;
}

.dl-box:hover {
  transform: scale(1.02);
  border-color: rgba(255, 255, 255, 0.3);
}

.dl-box h2 {
  font-size: 1.8rem;
  margin: 0 0 5px;
  color: #fff;
  z-index: 2;
}

.dl-box p {
  color: var(--text-dim);
  margin-top: 0;
  z-index: 2;
  margin-bottom: 20px;
}

.dl-btn {
  text-decoration: none;
  padding: 12px 30px;
  background: #fff;
  color: #000;
  border-radius: 12px;
  font-family: 'Kanit', sans-serif;
  /* Fix for <button> */
  font-size: 1rem;
  /* Ensure consistent size */
  display: flex;
  /* Changed to flex for centering */
  justify-content: center;
  /* Center text */
  width: 100%;
  /* Full width */
  align-items: center;
  gap: 10px;
  z-index: 2;
  transition: all 0.2s;
}

.dl-btn:hover {
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.dl-icon {
  position: absolute;
  bottom: -20px;
  right: -20px;
  font-size: 10rem !important;
  /* Material icon size */
  opacity: 0.05;
  color: #fff;
  pointer-events: none;
  z-index: 1;
}

/* Contact Section */
.contact-section {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 40px;
  /* Center with margin auto */
}

.contact-grid {
  display: flex;
  gap: 20px;
}

.contact-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 15px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.contact-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.1);
}

.contact-card img {
  width: 28px;
  height: 28px;
}

.discord:hover {
  border-color: #5865F2;
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.3);
}

.facebook:hover {
  border-color: #1877F2;
  box-shadow: 0 0 20px rgba(24, 119, 242, 0.3);
}

/* Footer */
.footer {
  padding: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: auto;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dl-row {
    grid-template-columns: 1fr;
  }

  h1.hero-title {
    font-size: 15vw;
  }

  .nav {
    padding: 15px;
  }
}

/* Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 500px;
  background: rgba(20, 20, 25, 0.9);
  border: 1px solid var(--accent);
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.2);
  padding: 30px;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: var(--radius);
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 16px;
}

.modal-header h3 {
  margin: 0;
  color: var(--accent);
  font-size: 1.5rem;
}

.dl-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.dl-option:last-child {
  margin-bottom: 0;
}

.dl-option:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: var(--accent);
  transform: translateX(5px);
}

.dl-info {
  display: flex;
  flex-direction: column;
}

.dl-info strong {
  color: #fff;
  font-size: 1.1rem;
}

.dl-info span {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.dl-option .material-symbols-outlined {
  color: var(--accent);
}