/* Reset default styles */
:root {
  --border-color: #000000;
  --cursor: url('/assets/cursor/sparklystar.gif')
}

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

/* Core aesthetic (monochrome + fixed-width font) */
body {
    min-height: 100vh;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    background-color: #ffffff;
    color: #000000;
    padding: 5px;
    padding-top: 20px;
    background-image: url('/assets/background/citynight.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat; /* Disable tiling */
    background-attachment: fixed;
    cursor: var(--cursor), auto;
    
}

a, button, .clickable-element, .draggable-element {
  cursor: var(--cursor), pointer;
}


a {
    color: #000;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-decoration-color: #000;
}

a:visited {
    color: #000;
}

.site-wrapper {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    justify-content: flex-start;
    gap: 18px;
    padding-left: 5px;
}

@media (min-width: 1600px) {
    .site-wrapper {
        gap: 35px;
        padding-left: 15px;
    }
}

/* Outer page frame (ASCII-style border) */
.page-frame {
    display: grid;
    padding: 20px;
    padding-top: 18px;
    position: relative;
    width: fit-content;
    background: #FAFAFA;
    border-radius: 15px;
}

.page-frame-frame {
    display: grid;
    padding: 12px;
    position: relative;
    width: fit-content;
    border: 1px dashed white;
    border-radius: 15px;
}

.homepy-header {
    display: grid;
    grid-template-columns: 280px 1fr;
    align-items: start;
    padding-bottom: 10px;
    gap: 20px;
}

/* Visitor counter (top-left) */
.visitor-counter {
    font-size: 0.9em;
    width: 100%;
    text-align: center;
    color:#000;
}

/* --- 3-Column Grid Layout --- */
.content-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 600px;
    gap: 5px;
}

/* --- Left Sidebar --- */
.left-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    border: 1px solid #000; /* Solid border */
    padding: 15px;
    background-color: #fff;
    position: relative;
    /* min-height: 600px; */
    align-items: center;
    /* width: 280px;  */
    box-sizing: border-box;
    border-radius: 15px;
}

/* HIDE FOLDERS BY DEFAULT */
.profile { display: block; }
.scrapbook-folders { display: none; }

.scrapbook-folders {
    width: 100%
}

.scrapbook-folders ul {
    list-style: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 15px;
    align-items: start;
    justify-content: flex-start;
}


.folder::before {
    content: "";
    width: 15px;
    height: 15px;
    display: inline-block;
    background-image: url("/assets/icons/closedfolder.png");
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 7px;
    vertical-align: middle;
}

.folder.active {
  font-weight: bold;
}
.folder.active::before {
  background-image: url("/assets/icons/openfolder.png");
}


/* Mini-Me profile */
.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-items: center;
    box-sizing: border-box;
}

/* Profile Pic */
.mini-me-img {
    width: 100%;
    height: auto;
    object-fit: fill;
    padding-top: 10px;
}

/* Today Status Bar */
.today-status {
    width:100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #000;
    padding-block: 5px; 
    text-align: center;
    box-sizing: border-box;
    margin-top: 10px;
    padding-bottom: 10px;
}

/* Bio */
.bio-text {
    height: auto;
    width: 90%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: #fff;
    box-sizing: border-box;
    padding-top: 20px;
}

/* Radio/BGM Widget - Fixed at Bottom + Aligned with Centered Content */
.radio-widget {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    width: 320px;
    border: 1px solid;
    /* position: absolute; */
    /* bottom: 20px; */
    background: #E0E0E0;
}

.radio-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    margin-left: 15px;
}

.radio-btn {
    background: none;
    border: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    cursor: pointer;
    margin-left: 3px;
}

.radio-btn:hover {
    color: #666;
}


/* --- 2. Center Main Content (SOLID BORDERS) --- */
.center-main {
    border: 1px solid #000; /* Solid border */
    padding: 20px 40px 20px 40px;;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 600px;
    width: 800px;
    box-sizing: border-box;
    border-radius: 15px;
    overflow: hidden;
}

.center-main-container {
    display: grid;
    position: relative;
}

/* Recent Posts */
.recent-posts {
    display: grid;
    grid-template-rows: max-content max-content;
    flex: 2;
    padding: 10px;
}

.section-label {
    border-bottom: 1px solid #000;
    padding-bottom: 2px;
    text-transform: uppercase;
}

.recent-posts {
    list-style: none;
    margin-left: 5px;
    margin-right: 5px;
}

.recent-link:hover {
    text-decoration: none;
    font-style: italic;
}

/* Social Cards (Twitter + Instagram) */
.social-cards {
    width: 250px; /* Keep your fixed width */
    height: 100px;
    border-collapse: collapse; /* Critical: Merges cell borders into clean lines */
    border: 1px solid #000; 
}

/* Table cells (td) with lines */
.social-cards td {
  border: 1px solid #000;
  padding: 8px;
  text-align: center; 
}

/* Clean link styles (match your retro aesthetic) */
.social-cards a {
  color: #000;
  text-decoration: none;
}

.social-cards a:hover {
  text-decoration: underline; /* Subtle hover effect */
}

.top-row {
    display: grid;
    grid-template-columns: 1fr max-content;
    gap:25px;
}

.section {
    display: grid;
    grid-template-rows: max-content max-content;
    flex: 2;
}

/* Mini-Home Widget */
.mini-home {
    width: 100%;
    height: auto;
    padding-block: 15px;
    position: relative;
    overflow: hidden;
}

.room-bg {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}


/* Draggable container (wraps ALL images) */
.draggable-element {
    position: absolute;
    z-index: 2;
    cursor: grab;
    transition: transform 0.1s ease;
    /* Lock container size so images don't shift */
    width: auto;
    height: auto;
}

.draggable-element:hover {
    transform: scale(1.05);
    filter: drop-shadow(2px 2px 0 #000);
}

.draggable-element:active {
    cursor: grabbing;
}

/* Universal image rule for JPG / PNG / GIF */
.pixel-img {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    width: 100%;
    height: auto;
    display: block;
}


/* --- Right Nav Sidebar --- */
.nav-container {
    border: none;
    padding-top: 15px;
    width: fit-content;
    align-items: flex-start;
    z-index: 2;
    position: absolute;
    top: 0;
    right: 0;
    transform: translateX(100%);
}

.nav-container ul {
    list-style: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid;
    /* gap: 2px; */
}

/* Notebook Tab Style  */
.tab {
    display: block;
    padding: 10px;
    text-decoration: none;
    text-align: center;
    color: #000;
    border: 1px solid #000;
    border-bottom: none;
    border-radius: 0 4px 0 0; 
    background-color: #e0e0e0;
    margin-left: -1.4px;
    border-radius: 0 10px 10px 0;
    text-transform: uppercase;
    font-size: 0.85em;

}

.tab-link {
    display: block;
    padding: 10px;
    text-decoration: none;
    text-align: center;
    color: #000;
    border: 1px solid #000;
    border-bottom: none;
    border-radius: 0 4px 0 0; 
    background-color: #e0e0e0;
    margin-left: -1.4px;
    border-radius: 0 10px 10px 0;
    text-transform: uppercase;
    font-size: 0.85em;

}

/* Active Tab (white, blends with center content) */
.tab.active {
    background-color: #fff;
    font-weight: 500;
    border-left: none;
}

/* Hover for inactive tabs */
.tab:not(.active):hover {
    background-color: #d0d0d0; /* Darker grey on hover */
}

.tab-link:hover {
    background-color: #d0d0d0; /* Darker grey on hover */
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block; /* show only active tab */
}

.right-sidebar {
    position: relative;
    width: 320px;
    flex-shrink: 0;
    height: fit-content;
    background-color: #fff;
    border: 1px solid #000;
    padding: 10px;
    justify-content: center;
    padding-top: 55px;
    z-index: 1;
}

.sidebar-wrapper {
    flex-shrink: 0;
    height: fit-content;
    justify-content: center;
}

.window-top {
    display: grid;
    grid-template-columns: 1fr max-content max-content;
    background-color: #e0e0e0;
    width: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    margin-bottom: 10px;
    padding: 10px;

}

.window-button {
    width: fit-content;
    text-align: center;
    padding: 0 5px 0 5px;
}

/* DIARY */
.diary-container {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.4;
  padding: 12px;
}


/* SCRAPBOOK */
.scrapbook-container {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.4;
  padding: 0 12px 0 12px;
}


/* Changelog Container */
.changelog-container {
  height: 120px;
  width: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  /* border: 1px solid #000; */
  padding: 10px;
  box-sizing: border-box;
  font-size: 0.9em;
  line-height: 1.4;
}

.jukebox-content {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.4;
  padding: 10px 10px 0 0;
}

.jukebox-station,
.jukebox-mp3 {
  cursor: pointer;
}

.jukebox-station:hover, 
.jukebox-mp3:hover {
    background-color: #F0F0F0;
}

.jukebox-station.active,
.jukebox-mp3.active {
  background-color: #F0F0F0;
}

#jukebox-mp3 th {
    text-align: left;
    font-weight: normal;
    text-decoration: underline;
}

.scrap-item {
  padding: 10px 0;
  border-bottom: 1px dashed #ccc;
  margin-bottom: 8px;
}

.scrap-date {
  font-size: 11px;
  color: #666;
  margin-bottom: 4px;
}

.scrap-tags {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
}

.scrap-title {
  font-weight: bold;
  margin: 0 0 6px 0;
}

.scrap-content {
  white-space: pre-line;
}

embed {
  width: 800px;
  /* max-width: 600px; */
  /* height: 420px; */
  display: block;
}

#jukebox tr {
    border-bottom: 1px dotted #000;
}