/* =========================================================
   DURK AND THE HOUSE 1999 - CYBER HOMEPAGE STYLESHEET
   Aesthetic: 1999 Personal GeoCities / Windows 98 / Cyberpunk
   ========================================================= */

:root {
  --bg-black: #000000;
  --win-gray: #c0c0c0;
  --win-dark: #808080;
  --win-light: #ffffff;
  --win-blue-start: #000080;
  --win-blue-end: #1084d0;
  
  --neon-green: #00ff66;
  --neon-cyan: #00ffff;
  --neon-yellow: #ffff00;
  --neon-pink: #ff007f;
  --neon-orange: #ff6600;
  --neon-magenta: #ff00c8;
  --blood-red: #ff0055;
  
  --font-mono: 'Courier New', Courier, monospace;
  --font-win: 'MS Sans Serif', Tahoma, 'Segoe UI', sans-serif;
  --font-retro: 'Lucida Console', Monaco, monospace;
}

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

body {
  background-color: var(--bg-black);
  color: var(--neon-green);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 40px;
}

/* Starfield Background Effect */
.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  background-color: #000000;
  background-image: 
    radial-gradient(1.5px 1.5px at 40px 60px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 150px 120px, #ff0055, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 280px 240px, #ffff00, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 420px 80px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 560px 190px, #ff007f, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 700px 320px, #00ff66, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 850px 150px, #ffffff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 400px 400px;
  opacity: 0.85;
}

/* Optional CRT Scanlines */
.scanline-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.35) 50%
  ), 
  linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.03),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.03)
  );
  background-size: 100% 3px, 6px 100%;
}

body.crt-active .scanline-overlay {
  display: block;
}

/* =========================================================
   TOP FLOATING WINDOWS 98 TOOLBAR
   ========================================================= */
.win98-toolbar {
  background: var(--win-gray);
  border-bottom: 2px solid #000000;
  border-top: 1px solid var(--win-light);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  font-family: var(--font-win);
  font-size: 13px;
  color: #000000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.6);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.toolbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.toolbar-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Windows 98 3D Beveled Buttons */
.retro-btn {
  background: var(--win-gray);
  color: #000000;
  font-family: var(--font-win);
  font-size: 12px;
  padding: 4px 10px;
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.retro-btn:active, .retro-btn.active {
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  padding: 5px 9px 3px 11px;
}

.btn-danger {
  color: #990000;
  font-weight: bold;
}

/* =========================================================
   PAGE CONTAINER & WINDOW FRAME
   ========================================================= */
.page-container {
  max-width: 960px;
  margin: 20px auto;
  padding: 0 12px;
}

.win98-window {
  background: var(--win-gray);
  border-top: 3px solid var(--win-light);
  border-left: 3px solid var(--win-light);
  border-right: 3px solid #000000;
  border-bottom: 3px solid #000000;
  box-shadow: 6px 6px 0px rgba(0,0,0,0.75);
}

.win98-titlebar {
  background: linear-gradient(90deg, var(--win-blue-start) 0%, var(--win-blue-end) 100%);
  color: #ffffff;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-win);
  font-weight: bold;
  font-size: 14px;
}

.win98-title {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.win98-controls {
  display: flex;
  gap: 3px;
}

.win98-ctrl-btn {
  width: 18px;
  height: 16px;
  background: var(--win-gray);
  font-family: var(--font-win);
  font-size: 11px;
  line-height: 12px;
  font-weight: bold;
  color: #000000;
  border-top: 1.5px solid var(--win-light);
  border-left: 1.5px solid var(--win-light);
  border-right: 1.5px solid #404040;
  border-bottom: 1.5px solid #404040;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.win98-ctrl-btn:active {
  border-top: 1.5px solid #404040;
  border-left: 1.5px solid #404040;
  border-right: 1.5px solid var(--win-light);
  border-bottom: 1.5px solid var(--win-light);
}

/* =========================================================
   SCROLLING MARQUEE
   ========================================================= */
.marquee-box {
  background: #000000;
  border-top: 2px solid #808080;
  border-bottom: 2px solid #808080;
  overflow: hidden;
  white-space: nowrap;
  padding: 5px 0;
  color: var(--neon-yellow);
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
}

.marquee-track {
  display: inline-block;
  padding-left: 100%;
  animation: marquee-scroll 24s linear infinite;
}

@keyframes marquee-scroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* =========================================================
   WINDOW BODY (THE BLACK SITE CANVAS)
   ========================================================= */
.win98-body {
  background-color: #050505;
  color: #e0e0e0;
  padding: 24px 20px;
  border-top: 2px solid #000000;
}

/* Header & Titles */
.cyber-header {
  text-align: center;
  margin-bottom: 24px;
}

.neon-title {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 6px;
  text-shadow: 
    0 0 5px #ff0055,
    0 0 10px #ff0055,
    0 0 20px #cc0044,
    0 0 40px #880022;
  color: #ffffff;
}

.cyber-subtitle {
  color: var(--neon-magenta);
  font-size: 1.1rem;
  letter-spacing: 2px;
  margin-bottom: 14px;
  font-style: italic;
}

.blink-slow {
  animation: blink-anim 1.4s infinite steps(1, start);
}

@keyframes blink-anim {
  50% { opacity: 0; }
}

/* Hazard Stripe Bar */
.hazard-stripe {
  background: repeating-linear-gradient(
    -45deg,
    #ff0055,
    #ff0055 15px,
    #000000 15px,
    #000000 30px
  );
  padding: 6px 12px;
  border: 2px solid #ff0055;
  margin: 12px auto;
  max-width: 600px;
  box-shadow: 0 0 10px rgba(255, 0, 85, 0.4);
}

.hazard-text {
  background: #000000;
  color: #ff0055;
  display: inline-block;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
}

/* Edit Mode Banner */
.edit-mode-banner {
  background: var(--neon-magenta);
  color: #ffffff;
  padding: 8px 14px;
  text-align: center;
  font-size: 13px;
  border: 2px dashed #ffff00;
  margin-bottom: 20px;
  animation: pulse-glow 1.5s infinite alternate;
}

@keyframes pulse-glow {
  from { box-shadow: 0 0 5px var(--neon-magenta); }
  to { box-shadow: 0 0 20px #ffff00; }
}

/* =========================================================
   BREAKING NEWS WIRE SECTION
   ========================================================= */
.news-wire-section {
  background: #0d0106;
  border: 3px double var(--blood-red);
  box-shadow: 0 0 16px rgba(255, 0, 85, 0.35);
  margin: 0 0 28px 0;
  position: relative;
}

.news-wire-header {
  background: linear-gradient(90deg, #880020 0%, #3a000e 100%);
  padding: 6px 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--blood-red);
  font-family: var(--font-win);
  font-size: 12px;
  gap: 8px;
}

.news-alert-badge {
  background: var(--neon-yellow);
  color: #000000;
  font-weight: 900;
  padding: 3px 8px;
  letter-spacing: 1px;
  border: 1px solid #ffffff;
  box-shadow: 1px 1px 0 #000;
}

.news-timestamp {
  color: #ffb3c6;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.news-wire-body {
  padding: 16px 20px;
}

.news-title {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(1.2rem, 3.2vw, 1.65rem);
  color: #ffff44;
  margin-bottom: 10px;
  line-height: 1.35;
  text-shadow: 0 0 8px rgba(255, 255, 68, 0.4);
}

.news-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11px;
  color: var(--neon-cyan);
  margin-bottom: 14px;
  border-bottom: 1px dotted #551122;
  padding-bottom: 6px;
  letter-spacing: 0.5px;
}

.news-summary p {
  color: #f0f0f0;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.news-quote {
  background: #18030b;
  border-left: 4px solid var(--blood-red);
  margin: 12px 0 16px 0;
  padding: 10px 16px;
  font-style: italic;
  color: #ff99bb;
  font-size: 14px;
  border-top: 1px solid #330514;
  border-bottom: 1px solid #330514;
  border-right: 1px solid #330514;
}

.quote-author {
  font-style: normal;
  font-size: 12px;
  color: #bbbbbb;
  margin-top: 6px;
  font-family: var(--font-mono);
}

.news-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #551122;
}

.news-link-btn {
  background: var(--win-gray);
  color: #000000;
  font-family: var(--font-win);
  font-size: 12px;
  font-weight: bold;
  padding: 6px 14px;
  text-decoration: none;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #222222;
  border-bottom: 2px solid #222222;
  display: inline-block;
  box-shadow: 1px 1px 0 #000;
  transition: background 0.15s;
}

.news-link-btn:hover {
  background: #ffffff;
  color: var(--blood-red);
}

.news-link-btn:active {
  border-top: 2px solid #222222;
  border-left: 2px solid #222222;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  padding: 7px 13px 5px 15px;
}

.news-disclaimer {
  color: #888888;
  font-size: 11px;
}

/* =========================================================
   3 IMAGE GALLERY SECTION
   ========================================================= */
.gallery-section {
  margin: 28px 0;
}

.section-badge {
  text-align: center;
  margin-bottom: 6px;
}

.section-badge span {
  background: #000080;
  color: var(--neon-yellow);
  padding: 4px 16px;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1.5px;
  border: 2px outset #ffffff;
  display: inline-block;
}

.section-instruction {
  text-align: center;
  color: #888888;
  font-size: 12px;
  margin-bottom: 18px;
}

.frames-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

/* ===== Hero Image Section ===== */
.hero-section {
  margin: 18px 0;
  text-align: center;
}

.hero-frame {
  position: relative;
  display: inline-block;
  max-width: 640px;
  border: 3px solid var(--blood-red);
  box-shadow: 0 0 24px rgba(255, 0, 85, 0.35), inset 0 0 18px rgba(0, 0, 0, 0.6);
  background: #111116;
  padding: 8px;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: auto;
  filter: contrast(1.05) saturate(1.08);
}

.hero-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 3px solid var(--neon-magenta);
  z-index: 2;
}

.hero-tl { top: -3px; left: -3px; border-right: none; border-bottom: none; }
.hero-tr { top: -3px; right: -3px; border-left: none; border-bottom: none; }
.hero-bl { bottom: -3px; left: -3px; border-right: none; border-top: none; }
.hero-br { bottom: -3px; right: -3px; border-left: none; border-top: none; }

/* ===== Screenshot Transcripts Section ===== */
.screenshot-transcripts-section {
  margin: 22px 0;
}

.screenshot-transcripts-section .section-badge {
  text-align: center;
  margin-bottom: 14px;
}

.transcript-box {
  margin-bottom: 18px;
  border-color: var(--neon-magenta);
  box-shadow: 0 0 12px rgba(255, 0, 200, 0.18);
}

.transcript-box .box-inner {
  font-size: 14px;
  line-height: 1.7;
  color: #e8e8f0;
  background: #0a0a0e;
}

.photo-card {
  background: #111116;
  border: 2px outset var(--neon-cyan);
  padding: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}

.photo-card:hover {
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.35);
  transform: translateY(-2px);
}

.photo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 8px;
  border-bottom: 1px dotted #444;
  padding-bottom: 4px;
}

.slot-tag {
  color: var(--neon-yellow);
  font-weight: bold;
}

.photo-filename {
  color: var(--neon-green);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
}

/* The Image Dropzone Well */
.photo-frame-outer {
  position: relative;
  background: #000000;
  border: 3px inset #555555;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
}

.hidden-file-input {
  display: none;
}

.image-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
}

.retro-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Frame Hover & Drop Overlay */
.frame-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.photo-frame-outer:hover .frame-overlay,
.photo-frame-outer.dragover .frame-overlay {
  opacity: 1;
}

.photo-frame-outer.dragover {
  border: 3px dashed var(--neon-pink);
  box-shadow: 0 0 15px var(--neon-pink);
}

.upload-btn {
  background: var(--win-gray);
  color: #000000;
  font-family: var(--font-win);
  font-size: 12px;
  padding: 5px 12px;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #333333;
  border-bottom: 2px solid #333333;
  cursor: pointer;
  font-weight: bold;
}

.upload-btn:hover {
  background: #e0e0e0;
}

.drop-hint {
  color: var(--neon-yellow);
  font-size: 11px;
}

/* Captions */
.photo-caption-box {
  margin-top: 10px;
  display: flex;
  gap: 6px;
  background: #080808;
  border: 1px inset #333333;
  padding: 6px 8px;
  font-size: 13px;
  color: #cccccc;
  min-height: 54px;
}

.caption-icon {
  font-size: 14px;
}

.photo-caption {
  flex: 1;
  word-break: break-word;
}

/* =========================================================
   DIVIDERS & HORIZONTAL RULES
   ========================================================= */
.rainbow-divider {
  height: 6px;
  background: linear-gradient(
    90deg, 
    #ff0000 0%, 
    #ff7700 17%, 
    #ffff00 33%, 
    #00ff00 50%, 
    #00ffff 67%, 
    #0000ff 83%, 
    #ff00ff 100%
  );
  margin: 30px 0;
  border-top: 1px solid #ffffff;
  border-bottom: 1px solid #000000;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

/* =========================================================
   CONTENT COLUMNS & BOXES
   ========================================================= */
.content-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.cyber-box {
  background: #0d0d12;
  border: 2px ridge var(--neon-green);
  padding: 16px;
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.15);
}

.box-title {
  color: var(--neon-green);
  font-size: 1.1rem;
  letter-spacing: 1px;
  border-bottom: 1px solid #224422;
  padding-bottom: 6px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.box-inner p {
  margin-bottom: 12px;
  color: #cfd8dc;
  font-size: 14px;
}

.retro-list {
  list-style-type: none;
  padding-left: 0;
}

.retro-list li {
  margin-bottom: 10px;
  padding-left: 18px;
  position: relative;
  font-size: 13px;
  color: #d0d0d0;
}

.retro-list li::before {
  content: "►";
  position: absolute;
  left: 0;
  color: var(--neon-pink);
  font-size: 11px;
}

.log-date {
  color: var(--neon-yellow);
}

/* =========================================================
   WEBRING SECTION
   ========================================================= */
.webring-box {
  background: #000033;
  border: 2px outset #ffffff;
  padding: 12px;
  text-align: center;
  margin: 24px auto;
  max-width: 650px;
}

.webring-title {
  color: var(--neon-cyan);
  font-weight: bold;
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.webring-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
}

.retro-link {
  color: var(--neon-yellow);
  text-decoration: underline;
  transition: color 0.2s;
}

.retro-link:hover {
  color: var(--neon-pink);
  background: #000000;
}

.webring-hub {
  color: #ffffff;
}

/* =========================================================
   FOOTER, HIT COUNTER & 88x31 BADGES
   ========================================================= */
.cyber-footer {
  text-align: center;
  padding-top: 10px;
}

.counter-container {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.counter-label {
  font-size: 11px;
  color: var(--neon-green);
  letter-spacing: 1px;
  margin-bottom: 6px;
  font-weight: bold;
}

/* 90s Odometer Style Counter */
.odometer-counter {
  display: inline-flex;
  background: #000000;
  border: 3px inset #666666;
  padding: 3px 6px;
  box-shadow: inset 0 0 6px #000;
}

.digit {
  background: #051405;
  color: var(--neon-green);
  font-family: var(--font-retro);
  font-size: 20px;
  font-weight: bold;
  padding: 2px 5px;
  margin: 0 1px;
  border-top: 1px solid #113311;
  border-left: 1px solid #113311;
  border-right: 1px solid #000000;
  border-bottom: 1px solid #000000;
  text-shadow: 0 0 5px #00ff66;
}

/* Retro 88x31 Badges */
.retro-badges-cluster {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.badge-item {
  width: 88px;
  height: 31px;
  border: 1px outset #ffffff;
  display: flex;
  flex-direction: column;
  font-family: var(--font-win);
  font-size: 9px;
  font-weight: bold;
  line-height: 1.1;
  text-align: center;
  justify-content: center;
  user-select: none;
  cursor: pointer;
  box-shadow: 1px 1px 0px #000;
}

.badge-netscape {
  background: #000044;
  color: #00ffcc;
  border-color: #00ffcc;
}
.badge-notepad {
  background: #ffffff;
  color: #000000;
  border-color: #999999;
}
.badge-notepad .b-bot {
  color: #0000bb;
}
.badge-html {
  background: #ffcc00;
  color: #000000;
  border-color: #ffffff;
}
.badge-res {
  background: #333333;
  color: #00ff00;
  border-color: #00ff00;
}
.badge-y2k {
  background: #cc0000;
  color: #ffffff;
  border-color: #ffff00;
}

.copyright-line {
  color: #666666;
  font-size: 11px;
}

/* =========================================================
   LIVE IN-BROWSER EDITING STYLES
   ========================================================= */
body.editing-active [data-editable="true"] {
  outline: 2px dashed var(--neon-pink) !important;
  background-color: rgba(255, 0, 127, 0.12) !important;
  cursor: text !important;
}

body.editing-active [data-editable="true"]:focus {
  outline: 2px solid var(--neon-yellow) !important;
  background-color: rgba(255, 255, 0, 0.18) !important;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .win98-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .neon-title {
    font-size: 1.8rem;
  }
  
  .win98-body {
    padding: 14px 10px;
  }
}
