/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0b1020;
  --bg-soft: #121934;
  --card: #111936;
  --card-2: #0f1530;
  --text: #e8edf6;
  --muted: #a7b0c2;
  --brand: #42b883;
  --brand-2: #3a7bd5;
  --accent: #ffb020;
  --ring: rgba(66, 184, 131, 0.45);
  --shadow-1: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius-sm: 10px;
  --radius: 16px;
}

/* General body and font styling */
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(
      1200px 600px at 20% -10%,
      #223264 0%,
      transparent 60%
    ),
    radial-gradient(1200px 600px at 120% 10%, #1a2b54 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #0a0f1e 100%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header Styles */
header {
  background: linear-gradient(90deg, var(--bg-soft), var(--card-2));
  color: var(--text);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
}

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

/* Prefer vector icon logo via CSS; hide bitmap if present */
.logo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}
.logo img {
  display: none;
}
.logo::before {
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: radial-gradient(
      8px 8px at 22px 10px,
      #7cf29a 35%,
      transparent 36%
    ),
    radial-gradient(7px 7px at 12px 21px, #7cf29a 35%, transparent 36%),
    radial-gradient(40px 18px at 18px 30px, #2a3f76 40%, transparent 41%),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), var(--shadow-1);
}
.logo::after {
  content: "AI Land";
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--text);
}

/* Flexbox container for menu and login icon */
nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hamburger Menu Icon */
.menu-icon {
  cursor: pointer;
  display: inline-block;
  margin-right: 20px; /* Add space between menu icon and login icon */
}

.menu-icon .menu-line {
  display: block;
  width: 26px;
  height: 3px;
  border-radius: 3px;
  background: var(--text);
  opacity: 0.9;
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.menu-icon.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-icon.active .menu-line:nth-child(2) {
  opacity: 0;
}

.menu-icon.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Login Icon */
.login-icon {
  font-size: 22px;
  cursor: pointer;
  display: inline-block;
  color: var(--text);
  opacity: 0.9;
}
.login-icon:hover {
  opacity: 1;
}

/* Nav Links Styling */
.nav-links {
  display: none;
  position: absolute;
  top: 60px;
  right: 20px;
  background: var(--card);
  padding: 10px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-links.active {
  display: block;
}

.nav-links a {
  display: block;
  margin: 6px 0;
  color: var(--text);
  opacity: 0.92;
  text-decoration: none;
  font-size: 16px;
  text-align: right;
  padding: 6px 8px;
  border-radius: 8px;
}
.nav-links a:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 56px 20px;
  position: relative;
  overflow: hidden;
  color: var(--text);
  background: linear-gradient(
      180deg,
      rgba(66, 184, 131, 0.08),
      rgba(58, 123, 213, 0.08)
    ),
    radial-gradient(
      1200px 400px at 50% -10%,
      rgba(66, 184, 131, 0.18),
      transparent 60%
    ),
    linear-gradient(180deg, var(--bg-soft), transparent 60%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.15;
  pointer-events: none;
  background-image: linear-gradient(
      transparent 31px,
      rgba(255, 255, 255, 0.2) 32px
    ),
    linear-gradient(90deg, transparent 31px, rgba(255, 255, 255, 0.2) 32px);
  background-size: 32px 32px;
}

.hero p {
  margin: 10px 0;
  font-size: 24px;
}

/* Grids Section */
.grids {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  padding: 20px;
}

.grid {
  grid-column: span 6 / span 6;
  padding: 22px 18px 18px 18px;
  background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.grid:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.45);
  border-color: rgba(66, 184, 131, 0.45);
}

.grid h3 {
  color: var(--text);
  margin: 10px 0 4px 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.grid img {
  display: none !important;
}
.grid::before {
  content: "";
  display: inline-block;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  margin-bottom: 10px;
  background: radial-gradient(
      20px 14px at 60% 40%,
      rgba(255, 255, 255, 0.25),
      transparent 50%
    ),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 24 24" fill="white"><path d="M4 12l7-7 9 9-7 7-9-9zm2.5 0L13 4.5 19.5 11 13 17.5 6.5 11z"/></svg>')
    center / 70% 70% no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 24 24" fill="white"><path d="M4 12l7-7 9 9-7 7-9-9zm2.5 0L13 4.5 19.5 11 13 17.5 6.5 11z"/></svg>')
    center / 70% 70% no-repeat;
}

/* Footer Styles */
footer {
  background: var(--bg-soft);
  color: var(--muted);
  padding: 24px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Responsive Styles
@media (max-width: 768px) {
    .grid {
        width: 100%;
    }
} */

/* Media Queries */
@media (max-width: 768px) {
  header .nav-links {
    display: none;
    position: absolute;
    flex-direction: column;
    background: var(--card);
    top: 60px;
    right: 10px;
    width: 220px;
    border: 1px solid rgba(255, 255, 255, 0.06);
  }
  header .nav-links.active {
    display: flex;
  }

  .grids {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .grid {
    grid-column: span 6 / span 6;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 34px 12px;
  }
  .grid h3 {
    font-size: 1rem;
  }
  footer {
    font-size: 14px;
    padding: 16px;
  }
}
