@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;
}

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;
}

/* MARQUEE */
.marquee-bar {
  background: var(--hotpink);
  color: var(--yellow);
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  padding: 4px 0;
  border-top: 3px solid var(--yellow);
  border-bottom: 3px solid var(--yellow);
  overflow: hidden;
  white-space: nowrap;
}

.marquee-bar marquee {
  display: block;
}

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

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

.site-subtitle {
  font-family: 'VT323', monospace;
  font-size: 1.4rem;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
  margin-top: 4px;
  letter-spacing: 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: 8px;
  padding: 12px;
  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: 1.3rem;
  color: var(--yellow);
  text-decoration: none;
  padding: 4px 14px;
  border: 2px solid var(--yellow);
  background: #000055;
  transition: all 0.1s;
  letter-spacing: 1px;
}

.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: 20px auto;
  padding: 0 16px;
}

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

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

.panel-body {
  padding: 16px;
}

/* VISITOR COUNTER */
.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: 2rem;
  color: var(--lime);
  text-shadow: 0 0 8px var(--lime);
  letter-spacing: 4px;
}

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

.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: 3rem;
}

.album-name {
  font-family: 'VT323', monospace;
  font-size: 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(180px, 1fr));
  gap: 8px;
  padding: 16px;
}

.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.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border: 4px solid var(--pink);
  box-shadow: 0 0 40px var(--pink);
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 30px;
  font-family: 'VT323', monospace;
  font-size: 3rem;
  color: var(--pink);
  cursor: pointer;
  line-height: 1;
}

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

.lightbox-nav button {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  background: var(--purple);
  color: white;
  border: 2px solid var(--pink);
  padding: 6px 20px;
  cursor: pointer;
}

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

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

.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: 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: 20px;
  font-family: 'VT323', monospace;
  color: var(--purple);
  font-size: 1rem;
  letter-spacing: 2px;
  border-top: 3px dashed var(--purple);
  margin-top: 40px;
  position: relative;
  z-index: 5;
}

/* LOADING */
.loading {
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: 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: 1.3rem;
  color: #666;
  padding: 40px;
}

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

/* webring */
.webring {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  color: var(--cyan);
  flex-wrap: wrap;
}

.webring a {
  color: var(--yellow);
  text-decoration: none;
}

.webring a:hover { text-decoration: underline; }

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

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

.album-header p {
  color: #aaa;
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ADMIN STYLES */
.admin-form label {
  display: block;
  font-family: 'VT323', monospace;
  font-size: 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: 8px;
  font-family: 'Courier Prime', monospace;
  font-size: 0.95rem;
  margin-bottom: 14px;
  outline: none;
}

.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: 1.3rem;
  letter-spacing: 2px;
  padding: 8px 24px;
  border: 3px solid;
  cursor: pointer;
  transition: all 0.1s;
}

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

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

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

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

.btn-danger {
  background: #330000;
  color: #ff4444;
  border-color: #ff4444;
  font-size: 1rem;
}

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

.status-msg {
  font-family: 'VT323', monospace;
  font-size: 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: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 14px;
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  color: #888;
}

.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(100px, 1fr));
  gap: 8px;
  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: 12px;
}

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

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

.admin-album-meta {
  font-size: 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;
}

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

.tab {
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  padding: 8px 20px;
  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; }
