@import url('https://fonts.googleapis.com/css2?family=VT323&family=Courier+Prime:wght@400;700&display=swap');

:root {
  --pink: #ff69b4;
  --hotpink: #ff1493;
  --purple: #9400d3;
  --cyan: #00ffff;
  --yellow: #ffff00;
  --lime: #00ff00;
  --bg: #000080;
  --white: #ffffff;
}

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

html {
  font-size: 16px;
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(circle, #ffffff22 1px, transparent 1px);
  background-size: 20px 20px;
  font-family: 'Courier Prime', monospace;
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* MARQUEE */
.marquee-bar {
  background: var(--hotpink);
  color: var(--yellow);
  font-family: 'VT323', monospace;
  font-size: clamp(0.9rem, 3vw, 1.2rem);
  padding: 4px 0;
  border-top: 3px solid var(--yellow);
  border-bottom: 3px solid var(--yellow);
  overflow: hidden;
  position: relative;
  z-index: 10001;
}

.marquee-inner {
  display: flex;
  width: max-content;
}

.marquee-inner > span {
  white-space: nowrap;
  flex-shrink: 0;
}

/* HEADER */
.site-header {
  text-align: center;
  padding: clamp(12px, 3vw, 20px);
  background: linear-gradient(180deg, #000033, #000080);
  border-bottom: 4px dashed var(--pink);
  position: relative;
}

.site-title {
  font-family: 'VT323', monospace;
  font-size: clamp(2.2rem, 8vw, 4rem);
  color: var(--pink);
  text-shadow:
    3px 3px 0 var(--purple),
    0 0 20px var(--pink),
    0 0 40px var(--hotpink);
  letter-spacing: clamp(1px, 1vw, 4px);
  animation: flicker 4s infinite;
  word-break: break-word;
}

.site-subtitle {
  font-family: 'VT323', monospace;
  font-size: clamp(1rem, 3.5vw, 1.4rem);
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
  margin-top: 4px;
  letter-spacing: clamp(0px, 0.5vw, 2px);
}

@keyframes flicker {
  0%, 95%, 100% { opacity: 1; }
  96% { opacity: 0.7; }
  97% { opacity: 1; }
  98% { opacity: 0.5; }
  99% { opacity: 1; }
}

/* STARS */
.stars {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 3px; height: 3px;
  background: white;
  border-radius: 50%;
  animation: twinkle var(--d, 2s) infinite var(--delay, 0s);
}

@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.1; transform: scale(0.5); }
}

/* NAV */
.main-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  background: #000033;
  border-bottom: 3px solid var(--purple);
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
}

.main-nav a {
  font-family: 'VT323', monospace;
  font-size: clamp(1rem, 3.5vw, 1.3rem);
  color: var(--yellow);
  text-decoration: none;
  padding: 4px 12px;
  border: 2px solid var(--yellow);
  background: #000055;
  transition: all 0.1s;
  letter-spacing: 1px;
  white-space: nowrap;
}

.main-nav a:hover, .main-nav a.active {
  background: var(--yellow);
  color: #000000;
  box-shadow: 0 0 10px var(--yellow);
}

/* LAYOUT */
.page-container {
  position: relative;
  z-index: 5;
  max-width: 900px;
  margin: 16px auto;
  padding: 0 12px;
}

/* PANEL */
.panel {
  background: rgba(0, 0, 51, 0.9);
  border: 3px solid var(--pink);
  margin-bottom: 16px;
  position: relative;
}

.panel-title {
  background: var(--pink);
  color: #000;
  font-family: 'VT323', monospace;
  font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  padding: 4px 12px;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-body {
  padding: clamp(10px, 3vw, 16px);
}

/* ALBUM GRID */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  padding: 12px;
}

.album-card {
  border: 3px solid var(--cyan);
  background: #000033;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.album-card:hover {
  border-color: var(--yellow);
  box-shadow: 0 0 16px var(--cyan);
  transform: translateY(-3px);
}

.album-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: #000055;
}

.album-thumb-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #000055, #000033);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.album-name {
  font-family: 'VT323', monospace;
  font-size: clamp(1.1rem, 3.5vw, 1.3rem);
  color: var(--cyan);
  padding: 6px;
  letter-spacing: 1px;
}

.album-count {
  font-size: 0.8rem;
  color: #aaa;
  padding-bottom: 8px;
}

/* PHOTO GRID */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
  padding: 10px;
}

.photo-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 3px solid var(--purple);
  cursor: pointer;
  transition: all 0.15s;
  display: block;
}

.photo-thumb:hover {
  border-color: var(--pink);
  box-shadow: 0 0 12px var(--pink);
  transform: scale(1.03);
}

/* LIGHTBOX */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 16px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border: 3px solid var(--pink);
  box-shadow: 0 0 40px var(--pink);
}

.lightbox-close {
  position: absolute;
  top: 12px; right: 20px;
  font-family: 'VT323', monospace;
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--pink);
  cursor: pointer;
  line-height: 1;
  padding: 8px;
  z-index: 1001;
}

.lightbox-nav {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.lightbox-nav button {
  font-family: 'VT323', monospace;
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  background: var(--purple);
  color: white;
  border: 2px solid var(--pink);
  padding: 8px 20px;
  cursor: pointer;
  min-height: 44px;
}

.lightbox-nav button:hover {
  background: var(--hotpink);
}

/* BACK LINK */
.back-link {
  font-family: 'VT323', monospace;
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  color: var(--cyan);
  text-decoration: none;
  letter-spacing: 1px;
  display: inline-block;
  margin: 12px;
  padding: 4px 0;
}

.back-link:hover {
  color: var(--yellow);
  text-shadow: 0 0 8px var(--yellow);
}

/* UNDER CONSTRUCTION */
.under-construction {
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: clamp(0.95rem, 3vw, 1.1rem);
  color: var(--yellow);
  padding: 8px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* DIVIDER */
.divider {
  border: none;
  border-top: 2px dashed var(--purple);
  margin: 12px 0;
}

/* FOOTER */
.site-footer {
  text-align: center;
  padding: 16px;
  font-family: 'VT323', monospace;
  color: var(--purple);
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  letter-spacing: 2px;
  border-top: 3px dashed var(--purple);
  margin-top: 30px;
  position: relative;
  z-index: 5;
}

/* LOADING */
.loading {
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  color: var(--cyan);
  padding: 40px;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: clamp(1rem, 3.5vw, 1.3rem);
  color: #666;
  padding: 40px 20px;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000033; }
::-webkit-scrollbar-thumb { background: var(--purple); border: 2px solid var(--pink); }
::-webkit-scrollbar-thumb:hover { background: var(--hotpink); }

/* ALBUM HEADER */
.album-header {
  padding: clamp(10px, 3vw, 16px);
  border-bottom: 2px dashed var(--purple);
}

.album-header h2 {
  font-family: 'VT323', monospace;
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  color: var(--pink);
  text-shadow: 2px 2px 0 var(--purple);
  letter-spacing: 2px;
  word-break: break-word;
}

.album-header p {
  color: #aaa;
  font-size: clamp(0.8rem, 2.5vw, 0.9rem);
  margin-top: 4px;
}

/* ADMIN STYLES */
.admin-form label {
  display: block;
  font-family: 'VT323', monospace;
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  color: var(--cyan);
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  background: #000033;
  border: 2px solid var(--purple);
  color: white;
  padding: 10px 8px;
  font-family: 'Courier Prime', monospace;
  font-size: clamp(0.9rem, 2.5vw, 0.95rem);
  margin-bottom: 14px;
  outline: none;
  -webkit-appearance: none;
  border-radius: 0;
  min-height: 44px;
}

.admin-form input:focus,
.admin-form textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 8px var(--pink);
}

.btn {
  font-family: 'VT323', monospace;
  font-size: clamp(1.1rem, 3.5vw, 1.3rem);
  letter-spacing: 2px;
  padding: 10px 20px;
  border: 3px solid;
  cursor: pointer;
  transition: all 0.1s;
  min-height: 44px;
  touch-action: manipulation;
}

.btn-pink {
  background: var(--hotpink);
  color: white;
  border-color: var(--pink);
}

.btn-pink:hover, .btn-pink:active {
  background: var(--pink);
  box-shadow: 0 0 12px var(--pink);
}

.btn-cyan {
  background: #003333;
  color: var(--cyan);
  border-color: var(--cyan);
}

.btn-cyan:hover, .btn-cyan:active {
  background: var(--cyan);
  color: #000;
}

.btn-danger {
  background: #330000;
  color: #ff4444;
  border-color: #ff4444;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.btn-danger:hover, .btn-danger:active {
  background: #ff4444;
  color: white;
}

.status-msg {
  font-family: 'VT323', monospace;
  font-size: clamp(1rem, 3vw, 1.2rem);
  padding: 10px;
  margin-top: 10px;
  text-align: center;
  letter-spacing: 1px;
}

.status-ok { color: var(--lime); border: 2px solid var(--lime); background: #001100; }
.status-err { color: #ff4444; border: 2px solid #ff4444; background: #110000; }

.upload-area {
  border: 3px dashed var(--purple);
  padding: clamp(16px, 5vw, 30px);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 14px;
  font-family: 'VT323', monospace;
  font-size: clamp(1rem, 3vw, 1.2rem);
  color: #888;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-area:hover, .upload-area.dragover {
  border-color: var(--pink);
  color: var(--pink);
  background: rgba(255,20,147,0.05);
}

.upload-area input[type=file] {
  display: none;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}

.preview-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid var(--purple);
}

.admin-album-list {
  list-style: none;
}

.admin-album-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #222;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-album-item:last-child { border-bottom: none; }

.admin-album-name {
  font-family: 'VT323', monospace;
  font-size: clamp(1.1rem, 3.5vw, 1.3rem);
  color: var(--cyan);
}

.admin-album-meta {
  font-size: clamp(0.7rem, 2vw, 0.8rem);
  color: #888;
}

.progress-bar-wrap {
  background: #000033;
  border: 2px solid var(--purple);
  height: 20px;
  margin-bottom: 14px;
  overflow: hidden;
  display: none;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--hotpink));
  width: 0%;
  transition: width 0.3s;
}

/* PASSWORD GATE */
.password-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  padding: 16px;
}

.password-box {
  background: rgba(0,0,51,0.95);
  border: 3px solid var(--pink);
  padding: clamp(20px, 5vw, 40px);
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.password-box h2 {
  font-family: 'VT323', monospace;
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: var(--pink);
  margin-bottom: 20px;
  letter-spacing: 3px;
}

.password-box input {
  width: 100%;
  background: #000033;
  border: 2px solid var(--purple);
  color: white;
  padding: 12px;
  font-family: 'Courier Prime', monospace;
  font-size: 1rem;
  margin-bottom: 14px;
  text-align: center;
  letter-spacing: 4px;
  min-height: 44px;
  -webkit-appearance: none;
  border-radius: 0;
}

/* HOME PAGE TWO-COL GRID */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* COUNTER BOX */
.counter-box {
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  color: var(--lime);
  padding: 8px;
  border: 2px solid var(--lime);
  display: inline-block;
  margin: 8px auto;
  background: #001100;
  letter-spacing: 2px;
}

.counter-digits {
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: var(--lime);
  text-shadow: 0 0 8px var(--lime);
  letter-spacing: 4px;
}

/* TABS */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--purple);
  margin-bottom: 16px;
}

.tab {
  font-family: 'VT323', monospace;
  font-size: clamp(1rem, 3vw, 1.2rem);
  padding: 8px 16px;
  cursor: pointer;
  color: #888;
  border-bottom: 3px solid transparent;
  letter-spacing: 1px;
  margin-bottom: -2px;
}

.tab.active {
  color: var(--pink);
  border-bottom-color: var(--pink);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================
   MOBILE BREAKPOINTS
   ============================================================ */

@media (max-width: 600px) {
  /* home grid goes single column */
  .home-grid {
    grid-template-columns: 1fr;
  }

  /* admin two-col form goes single column */
  .admin-two-col {
    grid-template-columns: 1fr !important;
  }

  /* album grid 2 columns on small screens */
  .album-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px;
  }

  /* photo grid 3 columns on mobile */
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 6px;
  }

  /* admin album items stack on mobile */
  .admin-album-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-album-item > div:last-child {
    width: 100%;
    display: flex;
    gap: 6px;
  }

  .admin-album-item > div:last-child .btn,
  .admin-album-item > div:last-child a {
    flex: 1;
    text-align: center;
  }

  /* lightbox nav buttons bigger on mobile */
  .lightbox-nav button {
    padding: 10px 24px;
    font-size: 1.3rem;
  }

  /* make buttons full width in forms on mobile */
  .admin-form .btn {
    width: 100%;
    margin-bottom: 8px;
  }
}

@media (max-width: 400px) {
  .album-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   VISUAL IMPROVEMENTS
   ============================================================ */

/* RAINBOW TITLE ANIMATION */
@keyframes rainbow {
  0%   { color: var(--pink);    text-shadow: 3px 3px 0 var(--purple), 0 0 20px var(--pink); }
  20%  { color: var(--cyan);    text-shadow: 3px 3px 0 #005555,       0 0 20px var(--cyan); }
  40%  { color: var(--yellow);  text-shadow: 3px 3px 0 #555500,       0 0 20px var(--yellow); }
  60%  { color: var(--lime);    text-shadow: 3px 3px 0 #005500,       0 0 20px var(--lime); }
  80%  { color: var(--hotpink); text-shadow: 3px 3px 0 var(--purple), 0 0 20px var(--hotpink); }
  100% { color: var(--pink);    text-shadow: 3px 3px 0 var(--purple), 0 0 20px var(--pink); }
}

.site-title {
  animation: rainbow 4s linear infinite, flicker 8s infinite;
}

/* ALBUM CARD - overlay style */
.album-card {
  position: relative;
  overflow: hidden;
}

.album-card-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  display: block;
}

.album-card-inner img,
.album-card-inner .album-thumb-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: unset;
}

.album-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  padding: 20px 8px 8px;
}

.album-card-overlay .album-name {
  padding: 0;
  font-size: clamp(1rem, 3vw, 1.2rem);
  text-shadow: 1px 1px 3px #000;
}

.album-card-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.75);
  color: var(--cyan);
  font-family: 'VT323', monospace;
  font-size: 0.9rem;
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid var(--cyan);
  letter-spacing: 1px;
  pointer-events: none;
}

/* PANEL TITLE VARIANTS */
.panel-title-cyan {
  background: var(--cyan);
  color: #000;
}

.panel-title-purple {
  background: var(--purple);
  color: #fff;
}

/* PIXEL DIVIDER */
.pixel-divider {
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: var(--pink);
  letter-spacing: 6px;
  margin: 14px 0;
  user-select: none;
}

/* LIGHTBOX COUNTER */
.lightbox-counter {
  font-family: 'VT323', monospace;
  font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  color: var(--cyan);
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-shadow: 0 0 8px var(--cyan);
}

/* FOOTER AWARD BADGE */
.award-badge {
  display: inline-block;
  border: 2px solid var(--yellow);
  background: #1a1400;
  color: var(--yellow);
  font-family: 'VT323', monospace;
  font-size: 1rem;
  padding: 4px 14px;
  letter-spacing: 2px;
  text-shadow: 0 0 8px var(--yellow);
  box-shadow: 0 0 8px var(--yellow);
  margin-top: 8px;
  display: inline-block;
}

.footer-divider {
  font-family: 'VT323', monospace;
  color: var(--purple);
  letter-spacing: 8px;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

/* LATEST TRIP - taller image */
.latest-trip-img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  border: 3px solid var(--purple);
  display: block;
  margin-bottom: 8px;
}

/* ============================================================
   CRT SCANLINES
   ============================================================ */
.site-wrap {
  position: relative;
  isolation: isolate;
}

.site-wrap::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.07) 2px,
    rgba(0, 0, 0, 0.07) 4px
  );
  pointer-events: none;
  z-index: 1;
}

img {
  position: relative;
  z-index: 2;
}

/* ============================================================
   PAGE FADE-IN
   ============================================================ */
@keyframes fadeInPage {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-container {
  animation: fadeInPage 0.4s ease-out;
}

/* ============================================================
   CURSOR SPARKLE
   ============================================================ */
@keyframes sparkleFade {
  0%   { opacity: 1; transform: scale(1) translate(0, 0); }
  100% { opacity: 0; transform: scale(0) translate(var(--dx), var(--dy)); }
}

.cursor-sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 99998;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  animation: sparkleFade 0.5s ease-out forwards;
}

/* ============================================================
   UNDER CONSTRUCTION BADGE (footer)
   ============================================================ */
.construction-badge {
  display: inline-block;
  border: 2px solid var(--hotpink);
  background: #1a0010;
  color: var(--hotpink);
  font-family: 'VT323', monospace;
  font-size: 1rem;
  padding: 4px 14px;
  letter-spacing: 2px;
  text-shadow: 0 0 8px var(--hotpink);
  margin-top: 8px;
  margin-left: 8px;
  animation: blink 1.2s step-end infinite;
}

/* ============================================================
   ALBUM CARD DATE LINE
   ============================================================ */
.album-card-date {
  font-family: 'VT323', monospace;
  font-size: 0.85rem;
  color: var(--cyan);
  opacity: 0.8;
  letter-spacing: 1px;
}
