/* ========================================
   Retro OS Theme — Windows 95 / Classic Mac
   Activated by html.theme-retro-os
   ======================================== */

.theme-retro-os {
  --bg-primary: #008080;
  --bg-secondary: #c0c0c0;
  --bg-card: #c0c0c0;
  --text-primary: #000000;
  --text-secondary: #000080;
  --text-body: #000000;
  --text-muted: #444444;
  --accent: #000080;
  --accent-hover: #0000ff;
  --border: #808080;
  --border-accent: #000080;
  --font-display: 'Courier New', 'Noto Sans SC', monospace;
  --font-body: 'Arial', 'Noto Sans SC', sans-serif;
  --font-size-hero: 2.5rem;
  --font-size-xl: 1.75rem;
  --font-weight-bold: 700;
  --line-height-body: 1.5;
  --radius: 0;
  --shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff;
  --transition-speed: 0s;
}

/* --- Window Chrome --- */
.theme-retro-os .site-nav {
  background: #c0c0c0;
  border-bottom: 2px solid #808080;
  box-shadow: inset 0 -1px 0 #000;
}

.theme-retro-os .nav-inner {
  padding: 2px var(--spacing-md);
}

.theme-retro-os .nav-home {
  background: linear-gradient(180deg, #000080 0%, #1084d0 100%);
  color: #ffffff;
  padding: 2px 8px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0;
}

.theme-retro-os .nav-home:hover {
  color: #ffffff;
}

.theme-retro-os .nav-prompt { display: none; }
.theme-retro-os .nav-site-title { display: inline; }

.theme-retro-os .nav-link {
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
  border-bottom: none;
  padding: 2px 6px;
}

.theme-retro-os .nav-link:hover {
  background: #000080;
  color: #ffffff;
}

.theme-retro-os .nav-link.active {
  background: #000080;
  color: #ffffff;
  border-bottom: none;
}

.theme-retro-os .nav-link::before { content: none; }

/* --- Taskbar-style Footer --- */
.theme-retro-os .site-footer {
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  box-shadow: inset 0 1px 0 #dfdfdf;
  padding: 4px 0;
  margin-top: 0;
}

.theme-retro-os .footer-inner {
  font-size: 0.75rem;
}

/* --- Hero as Desktop --- */
.theme-retro-os .hero {
  padding: var(--spacing-xl) var(--spacing-lg);
}

.theme-retro-os .hero-ascii { display: none; }
.theme-retro-os .hero-text { display: inline; }
.theme-retro-os .hero-cursor { display: none; }

.theme-retro-os .hero-title {
  font-family: 'Courier New', monospace;
  color: #ffffff;
  text-shadow: 2px 2px 0 #000;
}

.theme-retro-os .hero-tagline {
  color: #ffffff;
  text-shadow: 1px 1px 0 #000;
  font-size: 1rem;
  animation: none;
  white-space: normal;
  overflow: visible;
}

/* --- Window-style Cards --- */
.theme-retro-os .card {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: inset -1px -1px 0 #404040, inset 1px 1px 0 #dfdfdf;
}

.theme-retro-os .card:hover {
  border-color: #ffffff #808080 #808080 #ffffff;
  transform: none;
}

.theme-retro-os .card-body {
  padding: 4px 8px;
}

.theme-retro-os .card-title {
  background: linear-gradient(180deg, #000080 0%, #1084d0 100%);
  color: #ffffff;
  padding: 2px 4px;
  font-size: 0.8rem;
  margin: -4px -8px 8px;
  font-family: var(--font-body);
}

.theme-retro-os .card-link {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  color: #000000;
  font-size: 0.75rem;
  padding: 2px 12px;
}

.theme-retro-os .card-link:hover {
  background: #000080;
  color: #ffffff;
}

/* --- Section Title --- */
.theme-retro-os .section-title {
  background: linear-gradient(180deg, #000080 0%, #1084d0 100%);
  color: #ffffff;
  padding: 3px 8px;
  border-bottom: none;
  font-size: 0.875rem;
  font-family: var(--font-body);
}

.theme-retro-os .section-title::before { content: none; }

/* --- Post List --- */
.theme-retro-os .post-item {
  border-bottom: 1px dotted #808080;
  padding: 4px 0;
}

.theme-retro-os .post-item::before { content: none; }
.theme-retro-os .post-item a::after { content: none; }

.theme-retro-os .post-item a {
  color: #000080;
  text-decoration: underline;
}

.theme-retro-os .post-item a:hover {
  color: #0000ff;
}

/* --- Story Feature --- */
.theme-retro-os .story-link {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: inset -1px -1px 0 #404040, inset 1px 1px 0 #dfdfdf;
  padding: var(--spacing-md);
}

.theme-retro-os .story-link::before { content: none; }

.theme-retro-os .story-link h2 {
  background: linear-gradient(180deg, #000080 0%, #1084d0 100%);
  color: #ffffff;
  padding: 2px 8px;
  margin: -16px -16px 12px;
  font-size: 1rem;
  font-family: var(--font-body);
}

.theme-retro-os .story-link p { color: #000000; }

.theme-retro-os .story-link:hover {
  transform: none;
  background: #d0d0d0;
}

.theme-retro-os .story-label { display: none; }
.theme-retro-os .story-enter {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  color: #000000;
  display: inline-block;
  padding: 2px 16px;
  margin-top: var(--spacing-sm);
  font-size: 0.8rem;
}

/* --- Article --- */
.theme-retro-os .article-header {
  background: #c0c0c0;
  padding: var(--spacing-md) var(--spacing-lg);
}

.theme-retro-os .article-title {
  font-size: 1.25rem;
  font-family: var(--font-body);
}

.theme-retro-os .article-content {
  background: #ffffff;
  padding: var(--spacing-md);
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
}

.theme-retro-os .article-content pre {
  background: #000000;
  color: #c0c0c0;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
}

.theme-retro-os .article-content a {
  color: #000080;
}

/* --- Characters --- */
.theme-retro-os .character-card {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
}

.theme-retro-os .character-card:hover { border-color: #ffffff #808080 #808080 #ffffff; }
.theme-retro-os .character-name { color: #000080; }
.theme-retro-os .character-name::before { content: none; }

.theme-retro-os .character-placeholder {
  background: #008080;
  color: #ffffff;
}

/* --- Chapter --- */
.theme-retro-os .chapter-label {
  color: #000080;
  font-family: var(--font-body);
  font-size: 0.8rem;
}

.theme-retro-os .chapter-item::before { content: none; }

/* --- Theme Switcher --- */
.theme-retro-os .theme-switcher {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  padding: 2px;
}

.theme-retro-os .theme-btn {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  color: #000000;
  font-size: 0.7rem;
  padding: 1px 4px;
}

.theme-retro-os .theme-btn:hover {
  border-color: #808080 #ffffff #ffffff #808080;
}

.theme-retro-os .theme-btn[data-theme="theme-retro-os"] {
  border-color: #808080 #ffffff #ffffff #808080;
  background: #d4d0c8;
}

/* --- Scrollbar --- */
.theme-retro-os ::-webkit-scrollbar {
  width: 16px;
  background: #c0c0c0;
}

.theme-retro-os ::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
}

.theme-retro-os ::-webkit-scrollbar-track {
  background: repeating-conic-gradient(#c0c0c0 0% 25%, #ffffff 0% 50%) 50% / 2px 2px;
}

/* --- TOC --- */
.theme-retro-os .toc {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
}

.theme-retro-os .toc a { color: #000080; text-decoration: underline; }
.theme-retro-os .toc a:hover { color: #0000ff; }

/* --- Pagination --- */
.theme-retro-os .pagination a,
.theme-retro-os .pagination span {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  color: #000000;
}

.theme-retro-os .pagination a:hover {
  border-color: #808080 #ffffff #ffffff #808080;
}

@media (max-width: 640px) {
  .theme-retro-os { --font-size-hero: 1.75rem; }
}
