/* Outer master frame */
.page-frame {
  width: min(1150px, calc(100% - 2rem));
  margin: 2rem auto;
  padding: 1.5rem;
  background: #161022;
  border: 8px ridge #646BD9;
  position: relative;
}

/* Header Panel */
.header-panel {
  display: grid;
  grid-template-columns: 120px 1fr;
  overflow: hidden;
  background-image: url('../images/stars.gif');
  border: 8px ridge #646BD9;
  box-shadow: inset 0 0 0 6px #161022;
}

.logo{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 8px solid #161022;
}

.logo-box{
  width: 120px;
  height: 100%;
  background: #000;
  border: 8px ridge #646BD9;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 6px #161022;
}

.logo-title{
  margin: 0;
  letter-spacing: 0.03em;
  text-shadow: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  text-align: left;
}

.logo-title .citybar {
  color: #646BD9;
}

/* Stack layout */
.home-stack{
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* 2-up on desktop, stack on mobile */
.nav-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 800px) {
  .nav-row {
    grid-template-columns: 1fr;
  }
}

/* Dropdown button */
.drop-btn {
  width: 100%;
  background-image: url('../images/stars.gif');
  border: 2px solid #646BD9;
  color: white;
  font-family: inherit;
  font-size: 2rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: inset 0 0 0 6px #161022;
}

.drop-btn:active {
  transform: translateY(1px);
}

.drop-btn:hover {
  border-color: #FF2FCB;
  color: #FF2FCB;
}

.drop-btn:hover .drop-caret {
  color: #FF2FCB;
}

.drop-btn:focus {
  outline: none;
}

.drop-btn:focus-visible {
  outline: 3px solid #FF2FCB;
  outline-offset: 2px;
}

.drop-caret {
  font-size: 1.5rem;
  line-height: 1;
}

/* Dropdown menu (closed by default) */
.drop-menu {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transform: none;
  transition: height 220ms ease, opacity 160ms ease, transform 200ms ease;
  will-change: height;
}

.drop-menu.is-open {
  opacity: 1;
  transform: translateY(0);
}

.drop-menu-inner {
  margin-top: 0.5rem;
  padding: 0.75rem;
  display: grid;
  gap: 0.75rem;
  box-shadow: inset 0 0 0 6px #161022;
  transform: translateZ(0);
  -webkit-font-smoothing: none;
  text-rendering: geometricPrecision;
}

/* Links */
.drop-menu a {
  display: block;
  text-decoration: none;
  color: white;
  padding: 0.75rem 1rem;
  border: 2px solid #646BD9;
  background-image: url('../images/stars.gif');
  text-align: center;
  font-size: 1.7rem;
}

.drop-menu a:focus {
  outline: none;
}

/* Keyboard-only focus style */
.drop-menu a:focus-visible {
  outline: 3px solid #FF2FCB;
  outline-offset: 2px;
}

/* Hover state */
.drop-menu a:hover {
  border-color: #FF2FCB;
  color: #FF2FCB;
}

/* Settings buttons */
.drop-item {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  color: white;
  font: inherit;
  font-size: 2rem;
  padding: 0.6rem 1rem;
  text-align: center;
  cursor: pointer;
  appearance: none;
}

/* Remove default button focus */
.drop-item:focus {
  outline: none;
}

.drop-item[data-state="on"] {
  color: #FF2FCB;
}

/* Contact panel */
.contact-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  border: 8px ridge #646BD9;
  padding: 1rem 2rem;
  align-items: center;
}

.contact-right h3 {
    margin: 0;
    line-height: 1.1;
}

/* About panel */
.about-panel {
  background: #161022;
  border: 8px ridge #646BD9;
  padding: 1rem 2.5rem;
}

.about-panel h2 {
  margin: 0;
  text-align: center;
  padding-bottom: 0.5rem;
}

.about-panel h3 {
  margin: 0;
  text-align: center;
  line-height: 1.4;
}

.about-panel p {
  text-align: center;
  margin: 2rem 0 2rem 0;
}

.about-divider {
  border-bottom: 6px dashed #646BD9;
  margin: 0.75rem 0 1.5rem 0;
}

.about-content {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.about-content h3 {
  flex: 1;
  min-width: 0;
  text-align: center;
  margin: 0;
}

.about-content p {
  margin: 0;
  line-height: 1.6;
  flex: 1;
}

.about-image {
  width: 450px;
  flex: 0 0 450px;
}

@media (max-width: 800px) {
  .about-content {
    flex-direction: column;
  }

  .about-image {
    width: 100%;
  }
}

.about-bottom-images {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10rem;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}

.about-bottom-images img {
  width: 300px;
  height: auto;
  display: block;
}

/* Map wrapper */
.map-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 8px ridge #646BD9;
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Updates panel */
.updates-panel {
  background: #161022;
  border: 8px ridge #646BD9;
  padding: 1rem 2.5rem;
}

.updates-panel h2 {
  margin: 0;
  text-align: center;
}

.updates-divider {
  border-bottom: 6px solid #646BD9;
  margin: 0.75rem 0 1.5rem 0;
}

.updates-content {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

#bouncyBall {
  position: fixed;
  left: 40px;
  top: 60%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: url("../images/basketball.gif") center/cover no-repeat;
  cursor: grab;
  z-index: 9500;
  user-select: none;
}

/* Rain layer */
.rain-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  overflow: hidden;
}

.raindrop {
  position: absolute;
  top: -30px;
  width: 2px;
  height: 18px;
  background: rgba(255, 255, 255, 0.65);
  transform: rotate(20deg);
  animation: rain-fall linear forwards;
}

@keyframes rain-fall {
  to { transform: rotate(20deg) translateY(120vh); }
}

/* CRT Scanlines */
body.crt-on::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: overlay;
  opacity: 0.65;

  background:
  radial-gradient(ellipse at center,
    rgba(0,0,0,0) 60%,
    rgba(0,0,0,0.25) 100%
  ),
  repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.30) 0px,
    rgba(0,0,0,0.30) 2px,
    rgba(0,0,0,0.0) 2px,
    rgba(0,0,0,0.0) 4px
  );
}

