:root{
  --bg:#0b0b12;
  --panel:#121224;
  --panel2: rgba(18,18,36,0.72);
  --text:#f4f4ff;
  --muted:#b9b9d6;
  --stroke:rgba(255,255,255,0.12);
  --shadow: 0 12px 30px rgba(0,0,0,0.35);
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
html, body { height: 100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background: #3030e8;
  overflow-x: hidden;
}

.container{ width:min(1120px, 92vw); margin:0 auto; }

.bg-layer{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-layer::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.08));
}

.stars{ position:absolute; inset:0; }

.star{
  position:absolute;
  width:6px;
  height:6px;
  background:white;
  border-radius:50%;
  opacity:0.85;
  animation: twinkle 3s infinite ease-in-out alternate;
}
.star.big{
  width:10px;
  height:10px;
  opacity:0.6;
  filter: blur(0.2px);
}
@keyframes twinkle{
  from{ opacity:0.25; transform: scale(1); }
  to{ opacity:1; transform: scale(1.25); }
}

.site{
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.site-header{
  background: transparent;
  padding: 26px 0 10px;
}

.header-inner{
  width:min(1120px, 92vw);
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:14px;
  align-items:center;
}

.brand{ text-align:center; }

.logo{
  font-size: 4.5rem;
  font-weight: 800;
  color: white;
  text-decoration: none;
  letter-spacing: 1px;
}

.tagline{ color: rgba(255,255,255,0.72); font-size:0.95rem; }

@media (max-width: 768px){
  .logo{ font-size: 2.0rem; }
}

.nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  width: min(1120px, 92vw);
}

.nav-list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  gap:10px;
  align-items:center;
}

.nav-link{
  color: rgba(255,255,255,0.85);
  text-decoration:none;
  padding:10px 12px;
  border-radius:12px;
  display:inline-block;
  background: rgba(0,0,0,0.10);
  border: 1px solid rgba(255,255,255,0.18);
}

.nav-link:hover{ background:rgba(255,255,255,0.14); }

.dropdown{ position:relative; }

.dropdown-toggle{
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:8px;
}

.dropdown-toggle:hover{ background:rgba(255,255,255,0.14); }

.chev{ opacity:0.85; font-size:0.9em; }

.dropdown-menu{
  position:absolute;
  top:46px; left:0;
  min-width:190px;
  padding:8px;
  margin:0;
  list-style:none;
  border:1px solid rgba(255,255,255,0.18);
  border-radius:16px;
  background:rgba(10,10,20,0.92);
  box-shadow: var(--shadow);
  display:none;
}

@media (hover:hover){
  .dropdown:hover .dropdown-menu{ display:block; }
}
.dropdown-toggle[aria-expanded="true"] + .dropdown-menu{ display:block; }

.dropdown-item{
  display:block;
  padding:10px 12px;
  border-radius:12px;
  text-decoration:none;
  color: rgba(255,255,255,0.85);
}
.dropdown-item:hover{ background:rgba(255,255,255,0.12); }

.main{ padding: 12px 0 64px; }

.year-block{ margin: 28px 0 10px; }

.year-heading{
  font-size:1.35rem;
  margin:0 0 14px;
  color:white;
  border-bottom:1px solid rgba(255,255,255,0.22);
  padding-bottom:10px;
}

.month-heading{
  font-size: 3rem;
  margin: 0 0 1.5rem;
  letter-spacing: 1px;
  font-weight: 600;
  text-align: center;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  color: rgba(255,255,255,0.92);
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:14px;
  align-items: start;
}

@media (max-width: 980px){
  .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  background: rgba(0,0,0,0.18);
  border:1px solid rgba(255,255,255,0.18);
  border-radius:18px;
  overflow:hidden;
  box-shadow: var(--shadow);
}

.imgbutton{
  position:relative;
  display:block;
  width:100%;
  padding:0;
  border:0;
  background:transparent;
  cursor:pointer;
  text-align:left;
}

@media (hover:hover){
  .imgbutton:hover{ filter: brightness(1.03); }
}

.cardmedia{
  width:100%;
  height:320px;
  object-fit:cover;
  display:block;
  background:#000;
}

.playbadge{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:46px;
  height:46px;
  border-radius:999px;
  background:rgba(0,0,0,0.55);
  border:1px solid rgba(255,255,255,0.18);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  pointer-events:none;
  color: white;
}

.meta{
  display:flex;
  justify-content:flex-start;
  align-items:center;
  padding:10px 12px;
}
.postdate{ color: rgba(255,255,255,0.82); font-size:0.95rem; }

.footer{
  margin-top:36px;
  padding:18px 0;
  border-top:1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.10);
}
.footer-text{ color: rgba(255,255,255,0.75); font-size:0.9rem; }

#backToTop{
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #ff77cc;
  color: white;
  font-size: 22px;
  cursor:pointer;
  box-shadow: 0 0 15px rgba(255, 119, 204, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
#backToTop:hover{
  transform: scale(1.1);
  background: #ff55bb;
}
#backToTop.show{
  opacity: 1;
  pointer-events: auto;
}

/* ===== Lightbox ===== */
.lightbox{
  position:fixed;
  inset:0;
  display:none;
  z-index:9999;
}
.lightbox.is-open{ display:block; }

.lightbox-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.72);
}

.lightbox-panel{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:min(1100px, 94vw);
  max-height:90vh;
  background:rgba(18,18,36,0.98);
  border:1px solid rgba(255,255,255,0.14);
  border-radius:18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  overflow:hidden;
}

.lightbox-panel.is-text-only{
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.lightbox-close{
  position:absolute;
  top:10px;
  right:10px;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(0,0,0,0.45);
  color:#fff;
  border-radius:12px;
  padding:8px 10px;
  cursor:pointer;
  z-index: 6;
}

.lb-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:6;
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.18);
  cursor:pointer;
  font-size:28px;
  line-height:42px;
  text-align:center;
  background:rgba(0,0,0,0.35);
  color:#fff;
  backdrop-filter: blur(6px);
}
.lb-prev{ left:10px; }
.lb-next{ right:10px; }
.lb-nav:hover{ background: rgba(0,0,0,0.55); }

/* NEW: lightbox media tabs */
.media-tabs{
  display:flex;
  gap:10px;
  justify-content:center;
  padding: 10px 12px;
  border-bottom:1px solid rgba(255,255,255,0.10);
  background: rgba(18,18,36,0.98);
}
.media-tab{
  padding:8px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.25);
  color:#fff;
  font-weight:700;
  cursor:pointer;
}
.media-tab:hover{ background: rgba(255,255,255,0.12); }
.media-tab.is-active{
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.35);
}

#lightboxMediaContainer{
  max-width: 90vw;
  max-height: 72vh;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#000;
}

#lightboxMediaContainer .lightbox-media{
  max-width:100%;
  max-height:72vh;
  width:auto;
  height:auto;
  object-fit:contain;
  display:block;
}

.lightbox-meta{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  padding:14px 14px;
  border-top:1px solid rgba(255,255,255,0.10);
  background: rgba(18,18,36,0.98);
}

.lightbox-date{
  color:rgba(255,255,255,0.72);
  font-size:0.9rem;
  margin-bottom:6px;
}

.lightbox-quote{
  color:#fff;
  line-height:1.35;
  white-space:pre-wrap;
}

.lightbox-tweet{
  color:#fff;
  text-decoration:none;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.12);
  white-space:nowrap;
}
.lightbox-tweet:hover{ text-decoration:underline; }

/* ===== Scroll posts (grid) ===== */
.scrollitem{
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.scrollbutton{
  position: relative;
  height: 320px;
  display: block;
}

.scroll-bg{
  position: absolute;
  inset: 0;
  background-image: url("../images/ui/scroll-card.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: 0;
}

.scroll-content{
  position: absolute;
  inset: 0;
  z-index: 1;
}

.scroll-safe{
  position: absolute;
  top: 26%;
  bottom: 28%;
  left: 35%;
  right: 27%;
  overflow: hidden;
}

.scroll-text{
  width: 100%;
  margin: 0;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  color: #e3e3f0;
  overflow: hidden;
  text-shadow:
  0 1px 3px rgba(0,0,0,0.6),
  0 0 10px rgba(0,0,0,0.4);
}

/* ===== Scroll lightbox ===== */
#lightboxMediaContainer.is-text-only{
  background: transparent;
  max-height: none;
  padding: 0;
}

.lb-scroll{
  position: relative;
  width: min(760px, 92vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.lb-scroll::before{
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/ui/scroll-card.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.lb-scroll-inner{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  padding: 0;
  text-align: left;
}

.lb-safe{
  position: absolute;
  top: 28%;
  bottom: 18%;
  left: 32%;
  right: 29%;
  overflow: hidden;
}

.lb-scroll-quote{
  width: 100%;
  margin: 0;
  font-size: 3rem !important;
  line-height: 1.35 !important;
  text-align: left !important;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  overflow: hidden;
  text-shadow:
  0 1px 3px rgba(0,0,0,0.6),
  0 0 10px rgba(0,0,0,0.4);
}
