/* Metro UI shared style */
:root {
  --text: #ffffff;
  --muted: #d5c8ff;
  --link: #ffffff;
  --metro-primary: #7a5cff;
  --metro-dark: #553bce;
  --metro-light: #c9b7ff;
  --bg: transparent;
  --max-width: 960px;
  --content-padding: 24px;
  --header-padding: 16px 24px;
  --base-font-size: 16px;
}

/* Ultra-wide screens */
@media (min-width: 1920px) {
  :root {
    --max-width: 1400px;
    --content-padding: 40px;
    --header-padding: 20px 40px;
  }
  .content-main h1 { font-size: clamp(28px, 4vw, 48px); }
  .content-main p, .content-main li { font-size: clamp(14px, 1.5vw, 18px); }
}

/* Wide screens */
@media (min-width: 1440px) {
  :root {
    --max-width: 1200px;
    --content-padding: 32px;
  }
}

/* Medium-large screens */
@media (min-width: 1024px) and (max-width: 1439px) {
  :root {
    --max-width: 900px;
  }
}

/* Tablets and large phones */
@media (max-width: 1023px) {
  :root {
    --max-width: 100%;
    --content-padding: 20px;
    --header-padding: 14px 20px;
  }
  .content-main h1 { font-size: clamp(24px, 6vw, 36px); }
}

/* Medium tablets */
@media (max-width: 768px) {
  :root {
    --content-padding: 18px;
    --header-padding: 12px 16px;
  }
  .header-title { font-size: clamp(14px, 4vw, 18px); }
  .content-main h1 { font-size: clamp(22px, 5vw, 32px); }
}

/* Small phones */
@media (max-width: 480px) {
  :root {
    --content-padding: 16px;
    --header-padding: 12px 14px;
  }
  .header-title { font-size: clamp(13px, 3.5vw, 16px); }
  .content-main h1 { font-size: clamp(20px, 4.5vw, 28px); }
}

/* Very small phones */
@media (max-width: 360px) {
  :root {
    --content-padding: 12px;
    --header-padding: 10px 12px;
  }
  .header-title { font-size: 12px; }
}
* { box-sizing: border-box; }
html {
  min-height: 100%;
  background-image: url('Assets/Images/background.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Cascadia Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', 'Courier New', monospace;
  line-height: 1.6;
  text-align: center;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: rgba(180, 150, 255, 0.35); color: inherit; }
::-moz-selection { background: rgba(180, 150, 255, 0.35); color: inherit; }
body.preload { overflow: hidden; }
body.preload #page-blink { opacity: 1; }
#page-blink {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 10003;
  transition: opacity 260ms linear;
}
header.site-header {
  padding: var(--header-padding);
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10002;
  backdrop-filter: blur(8px);
  flex-wrap: wrap;
  gap: 1rem;
}
.header-title {
  font-size: clamp(14px, 3vw, 20px);
  font-weight: bold;
  letter-spacing: 0.08em;
  margin: 0;
}
.menu-btn {
  background: var(--metro-primary);
  border: 2px solid var(--metro-primary);
  color: #fff;
  padding: clamp(8px, 1vw, 12px) clamp(12px, 2vw, 16px);
  font-size: clamp(12px, 2vw, 14px);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(122, 92, 255, 0.3);
  white-space: nowrap;
}
.menu-btn:hover {
  background: var(--metro-dark);
  border-color: var(--metro-light);
  box-shadow: 0 6px 18px rgba(122, 92, 255, 0.45);
  transform: translateY(-2px);
}
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  opacity: 0;
  pointer-events: none;
  z-index: 10000;
  transition: opacity 0.3s ease;
}
.backdrop.active { opacity: 1; pointer-events: auto; }
.dropdown-menu {
  position: fixed;
  top: 72px;
  right: clamp(12px, 2vw, 24px);
  background: rgba(0,0,0,0.95);
  min-width: clamp(250px, 80vw, 320px);
  max-width: calc(100vw - 24px);
  z-index: 10004;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px) scale(0.97);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.85);
  border: 3px solid var(--metro-primary);
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 100px);
  scrollbar-width: none;
}
.dropdown-menu::-webkit-scrollbar {
  display: none;
}
.dropdown-menu.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.menu-item {
  display: block;
  padding: clamp(12px, 2vw, 16px) clamp(16px, 3vw, 22px);
  text-decoration: none;
  color: var(--link);
  border-bottom: 1px solid rgba(193, 179, 255, 0.15);
  font-size: clamp(12px, 1.5vw, 14px);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.menu-item:last-child { border-bottom: none; }
.menu-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--metro-light);
  transform: translateX(-4px);
  transition: transform 0.3s ease;
}
.menu-item:hover {
  background: rgba(180, 150, 255, 0.18);
  padding-left: clamp(18px, 4vw, 26px);
  text-shadow: 0 0 8px rgba(180, 150, 255, 0.45);
}
.menu-item:hover::before { transform: translateX(0); }
.content-main {
  max-width: var(--max-width);
  margin: clamp(20px, 4vw, 40px) auto clamp(40px, 8vw, 80px);
  padding: 0 var(--content-padding);
  text-align: center;
}
.content-main h1,
.content-main h2,
.content-main h3 {
  color: #fff;
  margin-top: 0;
}
.content-main h1 {
  font-size: clamp(24px, 5.5vw, 40px);
  margin-bottom: clamp(12px, 2vw, 18px);
}
.content-main p,
.content-main li,
.content-main dd,
.content-main dt {
  color: var(--muted);
  margin-bottom: clamp(12px, 2vw, 18px);
  font-size: clamp(13px, 1.2vw, 16px);
  line-height: 1.6;
}
.content-main a { color: var(--metro-primary); text-decoration: underline; }
.content-main a:hover { color: var(--metro-light); }
.content-main img { max-width: 100%; display: block; margin: clamp(16px, 3vw, 24px) auto; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.content-main img:hover { transform: scale(1.03); box-shadow: 0 0 30px rgba(122, 92, 255, 0.35); }
.blog-post { background: rgba(0,0,0,0.55); padding: clamp(14px, 2vw, 18px); border: 2px solid rgba(122, 92, 255, 0.3); margin-bottom: clamp(16px, 3vw, 24px); color: #ffffff !important; display: block; transition: all 0.2s ease; text-decoration: none !important; font-size: clamp(14px, 1.5vw, 16px); font-weight: 500; letter-spacing: 0.5px; }
.blog-post:visited { color: #ffffff !important; }
.blog-post:hover { background: rgba(0,0,0,0.7); border-color: rgba(122, 92, 255, 0.6); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(122, 92, 255, 0.2); color: #ffffff !important; }
.blog-post h2 { font-size: clamp(18px, 3vw, 24px); margin-bottom: clamp(8px, 1vw, 12px); }
.blog-date { font-size: clamp(10px, 1.2vw, 12px); color: rgba(255,255,255,0.7); margin-bottom: clamp(8px, 1vw, 12px); }
.pinned-tag { opacity: 0.75; }
.form-group { margin-bottom: clamp(16px, 2vw, 20px); text-align: left; }
.socials-container { display: flex; flex-direction: column; gap: clamp(1rem, 2vw, 1.5rem); margin-top: clamp(16px, 3vw, 24px); }
.bandcamp-list { display: flex; flex-direction: column; gap: clamp(1rem, 2vw, 1.5rem); margin-top: clamp(16px, 3vw, 24px); }
.bandcamp-link { background: rgba(0,0,0,0.55); padding: clamp(14px, 2vw, 18px); border: 2px solid rgba(122, 92, 255, 0.3); color: #ffffff !important; display: block; transition: all 0.2s ease; text-decoration: none !important; font-size: clamp(14px, 1.5vw, 16px); font-weight: 500; letter-spacing: 0.5px; }
.bandcamp-link:link { color: #ffffff !important; }
.bandcamp-link:visited { color: #ffffff !important; }
.bandcamp-link:hover { background: rgba(0,0,0,0.7); border-color: rgba(122, 92, 255, 0.6); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(122, 92, 255, 0.2); color: #ffffff !important; }
.bandcamp-link:active { color: #ffffff !important; }
.fall-letter { display: inline; cursor: pointer; white-space: normal; }
.fallen-letter { position: absolute; pointer-events: none; will-change: transform, opacity; z-index: 10003; }
.bio { text-align: center; border: 2px solid rgba(122, 92, 255, 0.5); padding: clamp(16px, 3vw, 24px); border-radius: 0px; background: rgba(0,0,0,0.2); margin: clamp(16px, 3vw, 24px) 0; overflow: visible; position: relative; }
.bio p { margin-bottom: clamp(12px, 2vw, 16px); font-size: clamp(13px, 1.2vw, 16px); }
.bio p:last-child { margin-bottom: 0; }
.bio ::selection { background: rgba(122, 92, 255, 0.6); color: #fff; }
.bio ::-moz-selection { background: rgba(122, 92, 255, 0.6); color: #fff; }
.content { text-align: center; border: 2px solid rgba(122, 92, 255, 0.5); padding: clamp(16px, 3vw, 24px); border-radius: 0px; background: rgba(0,0,0,0.2); margin: clamp(16px, 3vw, 24px) 0; overflow: auto; }
.content p { margin-bottom: clamp(12px, 2vw, 16px); font-size: clamp(13px, 1.2vw, 16px); }
.content h2 { margin-top: clamp(16px, 3vw, 24px); margin-bottom: clamp(12px, 2vw, 16px); font-size: clamp(18px, 3vw, 24px); }
.content h2:first-child { margin-top: 0; }
.content ::selection { background: rgba(122, 92, 255, 0.6); color: #fff; }
.content ::-moz-selection { background: rgba(122, 92, 255, 0.6); color: #fff; }
footer { margin-top: clamp(24px, 4vw, 32px); padding-top: clamp(16px, 3vw, 24px); border-top: 1px solid rgba(122, 92, 255, 0.3); text-align: center; }
footer p { margin: clamp(8px, 1vw, 12px) 0; font-size: clamp(12px, 1.2vw, 14px); }
#yap-easter-egg { transition: all 0.2s ease; }
#yap-easter-egg:hover { color: rgba(201, 183, 255, 1); text-shadow: 0 0 12px rgba(122, 92, 255, 0.5); }
label { display: block; margin-bottom: clamp(6px, 1vw, 8px); color: #fff; font-weight: 600; font-size: clamp(12px, 1.2vw, 14px); }
input[type="text"], input[type="date"], textarea, select { width: 100%; padding: clamp(10px, 1.5vw, 14px) clamp(10px, 2vw, 14px); border: 2px solid rgba(255,255,255,0.3); background: rgba(0,0,0,0.45); color: #fff; font-family: inherit; font-size: clamp(12px, 1.2vw, 14px); }
textarea { min-height: clamp(120px, 20vh, 200px); resize: vertical; }
button { background: var(--metro-primary); color: #fff; border: 3px solid var(--metro-primary); padding: clamp(10px, 1.5vw, 12px) clamp(14px, 2vw, 18px); cursor: pointer; font-family: inherit; font-size: clamp(12px, 1.5vw, 14px); transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; }
button:hover { background: var(--metro-dark); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(122, 92, 255, 0.25); }
button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.output-section { background: rgba(0,0,0,0.45); padding: clamp(14px, 2vw, 18px); border: 2px solid rgba(122, 92, 255, 0.3); margin-top: clamp(16px, 3vw, 24px); }
.preview-item { margin-bottom: clamp(14px, 2vw, 18px); padding-bottom: clamp(14px, 2vw, 18px); border-bottom: 1px solid rgba(255,255,255,0.12); }
.preview-item strong { display: block; margin-bottom: clamp(4px, 1vw, 6px); font-size: clamp(12px, 1.2vw, 14px); }
.preview-date { font-size: clamp(10px, 1.2vw, 11px); color: rgba(255,255,255,0.65); margin-bottom: clamp(6px, 1vw, 8px); }
.footer-note { margin: clamp(32px, 6vw, 48px) auto clamp(16px, 3vw, 24px); max-width: var(--max-width); color: var(--muted); font-size: clamp(11px, 1.2vw, 13px); text-align: center; padding: 0 var(--content-padding); }
@media (max-width: 700px) {
  .dropdown-menu { right: 12px; left: 12px; top: 68px; }
  .menu-item { padding: clamp(12px, 2vw, 14px) clamp(14px, 2vw, 18px); }
  .content-main { padding: 0 var(--content-padding); }
}

/* Additional aspect ratio optimizations */
@media (max-width: 360px) {
  .dropdown-menu { max-width: calc(100vw - 16px); }
}

/* Tall narrow screens (portrait mode, phones) */
@media (max-height: 600px) and (max-width: 768px) {
  .content-main h1 { margin-bottom: clamp(8px, 1vw, 12px); }
  .socials-container { gap: 0.8rem; }
  .bandcamp-list { gap: 0.8rem; }
}

/* Wide but short screens (landscape mode, ultrawide) */
@media (min-width: 1400px) and (max-height: 600px) {
  .content-main h1 { font-size: clamp(28px, 2.5vw, 40px); }
  .content-main { margin: clamp(16px, 2vh, 24px) auto clamp(24px, 3vh, 40px); }
}

/* Settings Menu Styles */
.settings-btn {
  background: var(--metro-primary);
  border: 2px solid var(--metro-primary);
  color: #fff;
  padding: clamp(8px, 1vw, 12px) clamp(12px, 2vw, 16px);
  font-size: clamp(12px, 2vw, 14px);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(122, 92, 255, 0.3);
  white-space: nowrap;
}

.settings-btn:hover {
  background: var(--metro-dark);
  border-color: var(--metro-light);
  box-shadow: 0 6px 18px rgba(122, 92, 255, 0.45);
  transform: translateY(-2px);
}

.settings-menu {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10005;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.settings-menu.active {
  opacity: 1;
  pointer-events: auto;
}

.settings-content {
  background: rgba(0, 0, 0, 0.9);
  border: 3px solid var(--metro-primary);
  padding: 30px;
  border-radius: 0;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.settings-content h2 {
  color: white;
  font-size: clamp(16px, 3vw, 22px);
  text-align: center;
}

.settings-item {
  margin: 15px 0;
}

.settings-item label {
  color: white;
  font-size: clamp(12px, 1.2vw, 14px);
}

#dark-mode-toggle {
  cursor: pointer;
  accent-color: var(--metro-primary);
}

#close-settings {
  background: var(--metro-primary);
  border: 2px solid var(--metro-primary);
  color: white;
  padding: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: clamp(12px, 1.5vw, 14px);
  transition: all 0.3s ease;
}

#close-settings:hover {
  background: var(--metro-dark);
  border-color: var(--metro-light);
}

/* Dark mode styles */
html.dark-mode {
  background-image: url('Assets/Images/CWBack.png') !important;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
