:root{
  --bg: #0b0b0f;
  --panel: rgba(255,255,255,0.04);
  --panel2: rgba(0,0,0,0.35);
  --border: rgba(255,255,255,0.10);
  --border2: rgba(255,255,255,0.08);
  --text: #eee;
  --muted: rgba(255,255,255,0.72);
  --muted2: rgba(255,255,255,0.60);
  --accent: rgba(232,232,255,0.92);
  --accentText: #111;
  --link: #cfd0ff;
}

html, body {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  padding: 18px 0;
  width: 100%;
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: scroll;
  background: var(--bg);
  color: var(--text);
  overscroll-behavior-x: none;
  overscroll-behavior-y: auto;
}

body{
  position: relative;
}

.page-shell{
  position: relative;
  z-index: 1;
}

/* ============================================================
   Restrained Dim.Aes / Circadian Background System
   ============================================================ */
@keyframes morningBreath {
  0%,100% { background: #18151e; }
  50%     { background: #241d2b; }
}
@keyframes dayBreath {
  0%,100% { background: #0b0b0f; }
  50%     { background: #0f1420; }
}
@keyframes eveningBreath {
  0%,100% { background: #161017; }
  50%     { background: #26151f; }
}
@keyframes nightBreath {
  0%,100% { background: #20172f; }
  50%     { background: #2d2350; }
}

body.morning {
  animation: morningBreath 30s infinite alternate ease-in-out;
  color: #f0ecff;
}
body.day {
  animation: dayBreath 30s infinite alternate ease-in-out;
  color: #eee;
}
body.evening {
  animation: eveningBreath 30s infinite alternate ease-in-out;
  color: #f3eaff;
}
body.night {
  animation: nightBreath 30s infinite alternate ease-in-out;
  color: #f3ebff;
}

:focus-visible {
  outline: 2px solid rgba(232,232,255,0.55);
  outline-offset: 2px;
}

.logo-shell{
  padding: 0 12px;
}

.logo-wrap{
  display:flex;
  justify-content:center;
  align-items:center;
  padding-top:10px;
  margin-bottom:12px;
}

.logo-wrap img{
  width:95%;
  max-width:95vw;
  object-fit:contain;
  display:block;
}

.top-bar-shell{
  padding: 0;
}

.top-bar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  position: sticky;
  top: 0;
  background: rgba(11,11,15,0.92);
  backdrop-filter: blur(8px);
  z-index: 30;
}

h1 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.2px;
}

h1 a {
  text-decoration:none;
  color: inherit;
}

.search-form{
  margin:0;
}

.search-input {
  width: 210px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 14px;
  background:#0f0f14;
  color:#eee;
}

.main-wrap{
  width: 100%;
}

.container {
  display:flex;
  justify-content:space-between;
  gap:14px;
  margin-top:14px;
  padding: 0 12px;
  align-items:flex-start;
}

.left-column, .right-column, .center-column {
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--border2);
  box-shadow: 0 2px 14px rgba(0,0,0,0.35);
  padding: 12px;
}

.left-column, .right-column {
  flex: 1;
  overflow: visible;
  height: auto;
  max-height: none;
}

.center-column {
  flex: 2;
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  min-width: 0;
}

.post-link {
  display:block;
  margin-bottom:10px;
  padding:8px 10px;
  border-radius:10px;
  text-decoration:none;
  color: var(--link);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.20);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
  font-size: 13px;
  transition: background .15s ease, transform .08s ease;
}

.post-link:hover {
  background: rgba(255,255,255,0.06);
}

.post-link:active {
  transform: scale(0.99);
}

.thumb-tile {
  display:block;
  width: 100%;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.22);
  overflow:hidden;
  text-decoration:none;
  transition: transform .10s ease;
}

.thumb-tile:active {
  transform: scale(0.995);
}

.thumb-img {
  width:100%;
  height:auto;
  display:block;
  border-radius: 12px;
}

.thumb-placeholder {
  width:100%;
  min-height: 110px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 12px;
  box-sizing: border-box;
  color: rgba(255,255,255,0.70);
  font-size: 12px;
  line-height: 1.2;
  text-align:center;
}

.carousel-container {
  display:flex;
  flex-direction:column;
  align-items:center;
  position:relative;
}

.carousel-card {
  display:none;
  width:100%;
  border-radius: 14px;
  padding: 12px;
  background: var(--panel2);
  border: 1px solid rgba(255,255,255,0.08);
}

.carousel-card.active {
  display:block;
  animation: microMove 16s infinite ease-in-out;
}

@keyframes microMove {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-2px); }
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  user-select: none;
}

.pill {
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  font-size: 11px;
}

.card-title {
  font-size: 18px;
  margin: 10px 0 10px 0;
  color:#fff;
  letter-spacing: 0.2px;
}

.card-image img {
  width:100%;
  height:auto;
  display:block;
  border-radius:12px;
  object-fit:cover;
  background:#000;
  border: 1px solid rgba(255,255,255,0.08);
}

.btn {
  display:inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: var(--accent);
  color: var(--accentText);
  font-weight: 800;
  text-decoration:none;
  cursor:pointer;
  margin-top: 10px;
  transition: transform .08s ease, opacity .15s ease;
}

.btn:active {
  transform: scale(0.99);
}

.btn.secondary {
  background: rgba(255,255,255,0.06);
  color:#eee;
  font-weight: 700;
}

.report-text {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.22);
  white-space: pre-wrap;
  line-height: 1.35;
  font-size: 14px;
}

.domain-box {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.22);
  line-height: 1.35;
  font-size: 14px;
  color: rgba(255,255,255,0.90);
}

.domain-sub {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.72);
}

.game-shell {
  margin-top: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: #000;
  overflow:hidden;
}

.game-top {
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  display:flex;
  justify-content:space-between;
  align-items:center;
  background: rgba(255,255,255,0.04);
  gap: 10px;
}

.game-viewport {
  width: 100%;
  display:flex;
  justify-content:center;
  align-items:center;
  padding: 10px 0;
  overflow: hidden;
}

.game-mount {
  width: 100%;
  display:flex;
  justify-content:center;
  align-items:center;
  overflow:hidden;
}

.game-report {
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,0.10);
  min-height: 140px;
  white-space: pre-wrap;
  line-height: 1.35;
  font-size: 14px;
  color: #e8e8ff;
  background: rgba(0,0,0,0.55);
}

.mobile-controls {
  display: none;
  gap: 10px;
  justify-content: center;
  align-items: center;
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,0.10);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  flex-wrap: wrap;
}

.dpad {
  display:grid;
  grid-template-columns: 56px 56px 56px;
  grid-template-rows: 56px 56px 56px;
  gap: 8px;
  user-select:none;
  touch-action: manipulation;
}

.dpad button {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #e8e8ff;
  font-size: 18px;
  font-weight: 900;
  cursor:pointer;
}

.dpad button:active {
  transform: scale(0.98);
}

.dpad .empty {
  visibility:hidden;
}

.arrow-button {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  font-size: 24px;
  z-index: 60;
  opacity: 0;
  transition: opacity 0.35s ease-in-out, transform 0.2s ease-in-out;
  pointer-events: none;
  box-shadow: inset 0 0 6px rgba(255,255,255,0.12), 0 0 10px rgba(0,0,0,0.25);
  animation: arrowPulse 4s infinite ease-in-out;
}

.arrow-button.visible {
  opacity: .55;
  pointer-events:auto;
}

.arrow-button:hover {
  transform: translateY(-50%) scale(1.12);
}

.arrow-button.left {
  left: 10px;
}

.arrow-button.right{
  right: 10px;
}

.up-button {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  font-size: 24px;
  z-index: 61;
  opacity: 0;
  transition: opacity 0.35s ease-in-out, transform 0.2s ease-in-out;
  pointer-events: none;
  box-shadow: inset 0 0 6px rgba(255,255,255,0.12), 0 0 10px rgba(0,0,0,0.25);
  animation: arrowPulse 4s infinite ease-in-out;
}

.up-button.visible {
  opacity: .55;
  pointer-events: auto;
}

.up-button:hover {
  transform: translateX(-50%) scale(1.12);
}

@keyframes arrowPulse {
  0%,100% { box-shadow: inset 0 0 6px rgba(255,255,255,0.12), 0 0 10px rgba(0,0,0,0.25); }
  50%     { box-shadow: inset 0 0 10px rgba(255,255,255,0.18), 0 0 16px rgba(120,100,180,0.22); }
}

.inventory-wrap {
  max-width: 1280px;
  margin: 18px auto 0 auto;
  padding: 0 12px;
  box-sizing: border-box;
}

.inventory-shell {
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--border2);
  box-shadow: 0 2px 14px rgba(0,0,0,0.35);
  padding: 14px;
}

.inventory-heading {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.2px;
}

.site-footer{
  text-align:center;
  margin-top:28px;
  padding:18px;
  font-size:14px;
  color:rgba(255,255,255,0.55);
}

/* ============================================================
   REPORT / ADMIN PANEL STYLES (migrated from report.php)
   ============================================================ */

.report-wrap{
  max-width:1180px;
  margin:0 auto;
}

.panel{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius:16px;
  padding:16px;
  margin-bottom:14px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.35);
}

.row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.col{
  flex:1;
  min-width:260px;
}

label{
  display:block;
  font-size:12px;
  color: var(--muted);
  margin-top:10px;
}

.note{
  font-size:12px;
  color: var(--muted2);
  margin-top:8px;
  line-height:1.35;
}

.flash{
  padding:10px 12px;
  border-radius:10px;
  background: rgba(120,255,180,0.10);
  border: 1px solid rgba(120,255,180,0.22);
}

.preview{
  max-width:100%;
  border-radius:10px;
  margin-top:10px;
  border:1px solid var(--border2);
}

.rss-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 0;
  border-bottom:1px solid var(--border2);
}

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

/* Inputs for admin (safe override) */
input[type="text"],
textarea{
  width:100%;
  padding:10px;
  border-radius:10px;
  border:1px solid var(--border);
  background: rgba(0,0,0,0.35);
  color: var(--text);
  font-family: inherit;
  font-size:14px;
}

textarea{
  min-height:160px;
  resize:vertical;
}

@media (max-width: 780px) {
  .left-column, .right-column {
    display:none;
  }

  .container {
    flex-direction:column;
    align-items:center;
  }

  .center-column {
    width: 94%;
    max-width: 900px;
  }

  .mobile-controls {
    display:flex;
  }

  .search-input {
    width: 180px;
  }

  .inventory-wrap {
    width: 94%;
    padding: 0;
  }

  .report-wrap{
    width:94%;
  }

  .col{
    min-width:100%;
  }
}

/* ============================================================
   CRYPT ADMIN INVENTORY IMAGE SYSTEM (SHELL FRAME)
   ============================================================ */

.inventory-card-image-shell{
  width:100%;
  height:420px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  border:1px solid var(--border2);
  background: rgba(255,255,255,0.03);
  overflow:hidden;
  position:relative;
}

/* subtle inner glow (Dim.Aes alignment) */
.inventory-card-image-shell::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  box-shadow: inset 0 0 18px rgba(0,0,0,0.35);
  border-radius:12px;
}

.inventory-card-image{
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  display:block;
  object-fit:contain;
  object-position:center;
}

/* ============================================================
   OPTIONAL: inventory card layout tightening
   ============================================================ */

.panel .card{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.panel .card .price{
  font-weight:700;
  font-size:15px;
  margin-top:4px;
}

.panel .card .actions{
  margin-top:auto;
}

/* ============================================================
   MOBILE ADJUSTMENT
   ============================================================ */

@media (max-width: 780px){

  .inventory-card-image-shell{
    height:280px;
  }

}

/* ============================================================
   DECK VIEWPORT HEIGHT + INTERNAL RAIL SCROLL
   ============================================================ */

.deck-shell{
  display:grid;
  grid-template-columns: 280px minmax(0,1fr) 280px;
  gap:18px;
  align-items:start;
  min-height:calc(100vh - 170px);
}

.deck-shell > *{
  min-width:0;
  min-height:0;
}

.deck-rail{
  max-height:calc(100vh - 170px);
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  padding-right:6px;
}

.deck-center{
  min-height:calc(100vh - 170px);
}

.deck-center .carousel-container{
  min-height:100%;
}

.thumb-img.js-lazy-thumb,
.js-lazy-center{
  background:rgba(255,255,255,0.03);
}

/* Optional: cleaner rail feel */
.deck-rail-left,
.deck-rail-right{
  scrollbar-width:thin;
}

@media (max-width: 1100px){
  .deck-shell{
    grid-template-columns: 220px minmax(0,1fr) 220px;
    gap:14px;
  }
}

@media (max-width: 900px){
  .deck-shell{
    grid-template-columns: 1fr;
    min-height:auto;
  }

  .deck-rail-left,
  .deck-rail-right{
    display:none;
  }

  .deck-center{
    min-height:auto;
  }
}

/* ============================================================
   OVERRIDE: lock columns to deck system
   ============================================================ */

.deck-shell .left-column,
.deck-shell .right-column{
  height: calc(100vh - 170px);
  max-height: calc(100vh - 170px);
  overflow-y: auto;
  overflow-x: hidden;
}

.deck-shell .center-column{
  min-height: calc(100vh - 170px);
}

.card-image img{
  width:100%;
  height:auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.thumb-img{
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.deck-center{
  display:flex;
  align-items:flex-start;
  justify-content:center;
}

.post-link.active,
.thumb-tile.active{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.22);
}

.panel-trv-import textarea,
.panel-trv-import input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.panel-trv-import button {
    margin-top: 10px;
}

.panel-trv-import-result ul {
    margin: 8px 0 0 18px;
}