/* styles.css - retro/neocities shrine look + custom scrollbars */

/* --- Base layout --- */
:root{
  --bg:#0b1020;
  --card:#f6f7f9;
  --accent:#00e6a8;
  --muted:#666;
  --paper:#fffefc;
  --glass: rgba(255,255,255,0.06);
  --neon: #ff55aa;
  --font-sans: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Courier New", monospace;
}

/* Page background: try a tiled image in assets/bg-tile.png; fallback to gradient */
body{
  margin:0;
  font-family: var(--font-sans);
  color:#111;
  background:
    url('assets/bg-tile.png') repeat,
    linear-gradient(180deg,#07202a,#0b1020);
  background-size: 64px, cover;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.45;
  min-height:100vh;
  overflow-y: auto;
}

/* --- Page shell --- */
#page{
  max-width:1100px;
  margin:20px auto;
  padding:16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.02));
  border: 2px solid rgba(255,255,255,0.03);
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

/* Header */
.site-header{
  text-align:center;
  padding:10px;
  margin-bottom:10px;
  color: var(--paper);
  position:relative;
}
.header-image{
  max-width:100%;
  height:110px;
  object-fit:cover;
  display:block;
  margin:0 auto 8px;
  border:4px solid rgba(255,255,255,0.06);
  background: #222;
}

/* Neon heading */
.site-header h1{
  font-family: var(--mono);
  margin:0;
  font-size:28px;
  letter-spacing:1px;
  text-shadow: 0 0 6px rgba(0,230,168,0.12);
  color: var(--accent);
}
.site-header .tagline{
  margin:6px 0 0;
  font-size:14px;
  color:#cfe7e0;
}

/* top controls */
.top-controls{
  position:absolute;
  right:12px;
  top:12px;
  display:flex;
  gap:8px;
}
.top-controls button, .top-controls .neocities-link{
  background:var(--glass);
  color:var(--paper);
  border:1px solid rgba(255,255,255,0.06);
  padding:6px 8px;
  font-size:12px;
  border-radius:4px;
  text-decoration:none;
}

/* Layout */
.layout{
  display:grid;
  grid-template-columns:260px 1fr;
  gap:14px;
}

/* Sidebar */
.sidebar{
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  padding:12px;
  border-radius:6px;
  min-height:320px;
  color:var(--paper);
  border:1px solid rgba(255,255,255,0.03);
}
.sidebar h2{margin:4px 0 8px; font-family:var(--mono); color:var(--neon);}
.sidebar ul{padding-left:18px; color:#cfe7e0;}
.sidebar a{color: #aeeadf; text-decoration:none;}
.sidebar .scrollbox{margin-top:12px; background:rgba(0,0,0,0.15); padding:8px; border-radius:4px;}

/* Main content */
.content{display:flex; flex-direction:column; gap:12px;}
.card{
  padding:12px;
  background: linear-gradient(180deg,#ffffff, #f3f4f6);
  border-radius:6px;
  border:2px solid rgba(0,0,0,0.06);
}

/* Scrollable card variant */
.scrollable{
  max-height:220px;
  overflow:auto;
  padding-right:12px;
}

/* character list */
.character-list{display:flex; gap:10px; align-items:flex-start;}
.character{
  width:160px;
  background: rgba(0,0,0,0.02);
  padding:8px;
  border-radius:6px;
  text-align:center;
}
.character img{width:80px;height:100px;object-fit:cover;border:1px solid rgba(0,0,0,0.06);margin-bottom:6px;}

/* Guestbook form */
#guest-form{display:block; gap:8px;}
#guest-form label{display:block; margin:8px 0;}
#guest-form input, #guest-form textarea{
  width:100%;
  padding:8px;
  border:1px solid rgba(0,0,0,0.08);
  border-radius:4px;
  font-size:14px;
}
.form-actions{display:flex; gap:8px; margin-top:8px;}
.form-actions button{padding:8px 10px; border-radius:4px; cursor:pointer; background:var(--accent); border:none; color:#021012;}

/* Guestbook entries */
.guestbook-entries{margin-top:12px; background:#fff; border:1px solid rgba(0,0,0,0.06); padding:8px; border-radius:6px; max-height:240px; overflow:auto;}
.guest-entry{border-bottom:1px dashed rgba(0,0,0,0.06); padding:6px 4px;}
.guest-entry:last-child{border-bottom:none;}
.guest-entry .meta{font-size:12px; color:var(--muted);}

/* Footer */
.site-footer{margin-top:12px; padding:8px; text-align:center; color:#cfe7e0; font-size:13px;}

/* Small helper */
.small{font-size:12px; color:var(--muted);}

/* --- Custom scrollbars (WebKit) --- */
::-webkit-scrollbar{width:14px; height:14px;}
::-webkit-scrollbar-track{
  background: linear-gradient(180deg,rgba(0,0,0,0.04), rgba(255,255,255,0.02));
  border-left:1px solid rgba(255,255,255,0.02);
}
::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, #222, #444);
  border-radius:8px;
  border:3px solid transparent;
  background-clip: padding-box;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25);
}
::-webkit-scrollbar-thumb:hover{ background: linear-gradient(180deg, #333, #666); }

/* Firefox scrollbar styling */
*{scrollbar-width: thin; scrollbar-color: #444 rgba(0,0,0,0.12);}

/* CRT effect toggle (initially off) */
.crt {
  position:relative;
  overflow:hidden;
}
.crt::after{
  content:"";
  pointer-events:none;
  position:absolute;
  inset:0;
  background-image: linear-gradient(rgba(255,255,255,0.02) 50%, rgba(0,0,0,0.02) 50%);
  background-size: 100% 2px;
  mix-blend-mode: multiply;
  opacity:0;
  transition: opacity .3s ease;
}
.crt.on::after{ opacity:0.18; }

/* Responsive */
@media (max-width:860px){
  .layout{grid-template-columns:1fr; }
  .sidebar{order:2;}
  .content{order:1;}
}