:root {
  --bg: #0b1220;
  --card: #111827;
  --glass: rgba(59, 130, 246, 0.08);
  --accent: #0f3777;
  --accent-2: #103088;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --muted: #94a3b8;
  --white: #f8fafc;
  --radius: 14px;
  --gradient-primary: linear-gradient(45deg, #11356e, #1d4ed8);
  --gradient-glass: linear-gradient(145deg, rgba(15, 23, 42, 0.7), rgba(29, 78, 216, 0.25));
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.35);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--white);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(80px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  font-size: 1.25rem;
}

.logo {
  height: 32px;
  width: auto;
}

.brand-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-menu a:hover {
  color: var(--accent);
  transition: var(--transition-smooth);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.25rem;
  cursor: pointer;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-card);
}

.btn-hero:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.btn-hero i {
  transition: transform 0.3s ease;
}

.btn-hero:hover i {
  transform: translateX(4px);
}

.btn-portal,
.btn-portal-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  transition: var(--transition-smooth);
}

.btn-portal-hero {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-portal:hover,
.btn-portal-hero:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 70%, rgba(0, 0, 0, 0.6) 100%),
    url("https://baycity.meridiannetwork.org/assets/img/backgrounds/bg0.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(59, 130, 246, 0.08) 60%, rgba(29, 78, 216, 0.45) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 1000px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 2rem;
  line-height: 1.1;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  color: var(--white);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.server-ip {
  color: var(--white);
  font-size: 1rem;
}

.ip-text {
  color: var(--accent);
  font-family: "Monaco", monospace;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background: rgba(17, 24, 39, 0.4);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.step-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition-smooth);
}

.step-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateY(-4px);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent-soft);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 12px;
  color: var(--accent);
  font-weight: bold;
  font-size: 1.125rem;
}

.step-icon {
  color: var(--accent);
  font-size: 1.5rem;
}

.step-card h4 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.step-card p {
  color: var(--muted);
  line-height: 1.6;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition-smooth);
}

.feature-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent-soft);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 12px;
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1.25rem;
  transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon {
  background: rgba(59, 130, 246, 0.25);
}

.feature-card h4 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: var(--transition-smooth);
  opacity: 1;
  transform: translateY(0);
}

.gallery-item.hidden {
  display: none;
  opacity: 0;
  transform: translateY(20px);
}

.gallery-item.show {
  display: block;
  animation: fadeInUp 0.5s forwards;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery-item:hover {
  border-color: rgba(59, 130, 246, 0.6);
  transform: translateY(-4px);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

#loadMoreBtn {
  display: block;
  margin: 2rem auto;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-card);
}

#loadMoreBtn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

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

.lightbox-image {
  max-width: 95vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: var(--shadow-glow);
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 10;
}

.lightbox-close:hover {
  color: var(--accent);
  transform: scale(1.1);
}

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 1.5rem;
}

.lightbox-btn {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  padding: 0.75rem;
}

.lightbox-btn:hover {
  color: var(--accent);
  transform: scale(1.2);
}

.lightbox-counter {
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 9999px;
  color: white;
  font-size: 0.875rem;
  backdrop-filter: blur(8px);
}

.footer {
  padding: 3rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--card);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.footer-content {
  max-width: 600px;
}

.footer-brand {
  margin-bottom: 1rem;
}

.footer-brand .brand-text {
  font-size: 1.5rem;
  font-weight: bold;
}

.footer-description {
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.footer-copyright {
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 20px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.25);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 100;
  }

  .nav-menu.active {
    display: flex;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn-hero,
  .btn-portal-hero {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .nav-inner {
    padding: 1rem;
  }

  .hero-content {
    padding: 2rem 0;
  }

  .section {
    padding: 3rem 0;
  }

  .steps-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}