/* Navigation Ribbon */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(90deg, #ffcc00, #ff6f00);
  padding: 14px 0;
  box-shadow: 0 1px 12px rgba(0,0,0,0.07);
  z-index: 100;
}
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
nav ul li {
  display: inline-block;
  margin: 0 22px;
}
nav ul li a {
  color: #1a1a1a;
  font-weight: bold;
  text-decoration: none;
  font-size: 1.15em;
  padding: 5px 14px;
  border-radius: 7px;
  transition: background 0.2s;
  cursor: pointer;
}
nav ul li a:hover {
  background: #ffe082;
}

/* Body padding to avoid invisible content behind nav */
body {
  margin: 60px 0 0 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f8f8fc;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Page sections hidden by default except active */
.page-section {
  display: none;
  max-width: 980px;
  width: 90vw;
  padding: 20px 0;
  text-align: center;
}
.page-section.active {
  display: block;
}

/* Header styling */
header h1 {
  background: linear-gradient(90deg, #4a90e2, #50e3c2);
  color: white;
  padding: 18px 32px;
  border-radius: 35px;
  font-size: 2.8em;
  margin: 10px auto 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: inline-block;
}
header p {
  font-size: 1.4em;
  color: #333;
  margin-bottom: 40px;
}

/* Grid styles */
#grid {
  display: grid;
  grid-template-columns: repeat(100, 8px);
  grid-gap: 1px;
  margin: 0 auto 40px;
  width: fit-content;
}
.box {
  width: 8px;
  height: 8px;
  background: white;
  border: 1px solid #e0e0e0;
}

/* Modal popup */
.modal {
  display: none;
  position: fixed;
  z-index: 110;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background: rgba(0, 0, 0, 0.25);
}
.modal-content {
  background: white;
  margin: 10% auto;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(77, 144, 226, 0.15);
  width: 340px;
  position: relative;
}
.close {
  color: #aaa;
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover {
  color: #4a90e2;
}
form input,
form textarea,
form button {
  width: 90%;
  margin: 12px auto;
  padding: 10px;
  border-radius: 9px;
  border: 1px solid #4a90e2;
  font-size: 1.1em;
  display: block;
}
form button {
  background: #4a90e2;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
}
