:root {
  --bg-dark: #1F1926;        /* Soft dark plum desktop background */
  --win-bg: #2B2336;         /* Window background fill */
  --win-bar: #433554;        /* Classic OS dark purple title bar */
  --text-main: #FFFDF9;      /* Creamy white for body text */
  --yellow-glow: #F2D06B;    /* Muted gold window accents */
  --purple-glow: #CBB5ED;    /* Soft lavender link accents */
  
  /* Classic 3D beveled border shading values */
  --win-border-light: #524266;
  --win-border-dark: #110D17;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: "Tahoma", "Segoe UI", sans-serif;
  font-size: 13px;
  margin: 0;
  padding: 20px;
}

.layout-wrapper {
  max-width: 950px;
  margin: 0 auto;
}

/* --- THE MAIN DESKTOP HEADER --- */
header {
  margin-bottom: 20px;
  text-align: center;
}

header h1 {
  color: var(--yellow-glow);
  font-size: 26px;
  margin: 5px 0;
  text-shadow: 2px 2px 0px var(--win-border-dark);
}

marquee {
  background: var(--win-bg);
  color: var(--purple-glow);
  padding: 4px;
  font-size: 12px;
  border: 2px inset var(--win-border-dark);
}

/* --- FLEX CONTAINER FOR WINDOW PANELS --- */
.main-container {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important; /* Prevents containers from wrapping down */
  gap: 20px;
  align-items: flex-start;
  width: 100%;
}

/* --- WINDOW FRAME COMPONENT --- */
.window {
  background-color: var(--win-bg);
  /* 3D Bevel Edge Effect mimicking classic OS design */
  border-top: 3px solid var(--win-border-light);
  border-left: 3px solid var(--win-border-light);
  border-right: 3px solid var(--win-border-dark);
  border-bottom: 3px solid var(--win-border-dark);
  box-shadow: 1px 1px 0px #000;
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.sidebar-window {
  width: 240px !important;
  flex-shrink: 0 !important; /* Forces navigation column to lock size */
}

.content-window {
  flex-grow: 1 !important;
  min-width: 0 !important; /* Prevents long lines of text from widening container */
}

/* --- OPERATING SYSTEM WINDOW TITLEBARS --- */
.title-bar {
  background: linear-gradient(to right, var(--win-bar), var(--win-bg));
  padding: 4px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title-text {
  color: var(--yellow-glow);
  font-weight: bold;
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* Window Control Buttons [ _ ][ X ] */
.window-controls {
  display: flex;
  gap: 3px;
}

.win-btn {
  background: var(--win-bg);
  border-top: 1.5px solid var(--win-border-light);
  border-left: 1.5px solid var(--win-border-light);
  border-right: 1.5px solid var(--win-border-dark);
  border-bottom: 1.5px solid var(--win-border-dark);
  color: var(--text-main);
  font-size: 9px;
  width: 16px;
  height: 14px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* --- INNER WINDOW DISPLAY SPACE --- */
.window-body {
  padding: 12px;
}

/* --- CLEANED MENU NAVIGATION --- */
.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu li {
  margin-bottom: 6px;
}

.nav-menu a {
  color: var(--purple-glow);
  text-decoration: none;
  display: block;
  padding: 4px;
  border: 1px solid transparent;
}

.nav-menu a:hover {
  background-color: var(--win-bar);
  color: var(--yellow-glow);
  border: 1px dotted var(--yellow-glow);
}

/* --- MUSIC BOX SECTION --- */
.winamp-player {
  background: var(--win-border-dark);
  border: 2px inset var(--win-border-dark);
  padding: 6px;
  font-size: 11px;
  margin-top: 15px;
}

.player-title {
  color: var(--yellow-glow);
  background: var(--win-bg);
  padding: 2px;
  text-align: center;
  margin-bottom: 5px;
}

.player-controls {
  display: flex !important;
  justify-content: space-between;
  gap: 4px;
}


.player-controls button {
  flex-grow: 1;
  background: var(--win-bg);
  border-top: 1px solid var(--win-border-light);
  border-left: 1px solid var(--win-border-light);
  border-right: 1px solid var(--win-border-dark);
  border-bottom: 1px solid var(--win-border-dark);
  color: var(--text-main);
  font-size: 10px;
  padding: 3px 2px;
  cursor: pointer;
}

/* --- GENERAL LAYOUT CONTENT ELEMENTS --- */
h2 {
  color: var(--yellow-glow);
  margin-top: 0;
  font-size: 18px;
}

.retro-iframe {
  width: 100%;
  height: 150px;
  background: var(--win-border-dark);
  border: 2px inset var(--win-border-dark);
}

/* --- PERSONAL BLOG LOG STYLE --- */
.blog-entry {
  background-color: rgba(0, 0, 0, 0.15);
  border: 1px dotted var(--purple-glow);
  padding: 12px;
  margin-bottom: 15px;
}

.blog-date {
  font-size: 11px;
  color: var(--purple-glow);
  font-family: monospace;
}

/* --- OPENUTAU THEME DOWNLOAD STASH TABLE --- */
.theme-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: 13px;
}

.theme-table th, .theme-table td {
  border: 1px solid var(--win-border-light);
  padding: 8px;
  text-align: left;
}

.theme-table th {
  background-color: var(--win-border-dark);
  color: var(--yellow-glow);
}

.theme-table tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02);
}

.theme-table a {
  color: var(--purple-glow);
  font-weight: bold;
  text-decoration: none;
}

.theme-table a:hover {
  color: var(--yellow-glow);
  text-decoration: underline;
}
/* --- RETRO VISITOR HIT COUNTER --- */
.hit-counter {
  margin-top: 15px;
  background-color: #110D17;
  border: 1px inset var(--win-border-dark);
  padding: 6px;
  text-align: center;
  font-family: 'Courier New', Courier, monospace;
}
.counter-digits {
  background: #000;
  color: var(--yellow-glow);
  padding: 2px 6px;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 2px;
  border: 1px solid var(--win-border-light);
  display: inline-block;
  margin-top: 4px;
}

/* --- CUSTOM SPARKLING MOUSE TRAIL --- */
#pointer-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
}

/* --- POPUP SCREENSHOT SCREEN MODAL --- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100000;
  justify-content: center;
  align-items: center;
}
.modal-window {
  max-width: 90%;
  max-height: 85%;
}
.modal-window img {
  max-width: 100%;
  max-height: 70vh;
  display: block;
  border: 2px solid var(--purple-glow);
  margin-top: 8px;
}
/* Revamped Masonry Grid Layout */
.art-grid {
    display: grid;
    /* Forces the grid items to form neat, equal-sized rows */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    /* Pulls items up so uneven element heights don't leave empty holes */
    grid-auto-rows: max-content; 
    gap: 15px;
    margin-top: 15px;
    align-items: start;
}

/* Ensure the cards look uniform */
.art-card {
    border: 1px dashed var(--win-border-light);
    padding: 10px;
    background: rgba(0,0,0,0.2);
    text-align: center;
    /* Prevents the card from stretching awkwardly */
    display: flex;
    flex-direction: column;
    height: fit-content; 
}
