/* ============================================
   RESET
   ============================================ */

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

/* ============================================
   CUSTOM CURSORS
   ============================================ */

/* default cursor — shown everywhere */
* {
  cursor: url('cursors/default.cur'), auto;
}

/* pointer — shown when hovering over links and buttons */
a, button, [onclick], 
.audio-controls button,
.guestbook-form button,
.sidebar a,
.preview-link a {
  cursor: url('cursors/pointer.cur'), pointer !important;
}

/* text — shown when hovering over selectable text */
p, h1, h2, h3, li, span, pre, textarea, input {
  cursor: url('cursors/text.cur'), text;
}

/* wait/loading */
.loading {
  cursor: url('cursors/wait.ani'), wait;
}

/* ============================================
   BASE
   ============================================ */

body {
  min-height: 100vh;
  background: linear-gradient(to bottom, #ffffff 0%, #f084bb 100%);
  font-family: monospace;
  font-size: 14px;
  color: #ed3694;
  padding: 40px 16px 60px;
}

p {
  margin-bottom: 1.2em;
}

a:link,
a:visited,
a:active {
  color: #ed3694;
}

a:hover {
  color: #743c8d;
}

.button,
.button:link,
.button:visited,
.button:active {
  font-family: monospace;
  font-size: 14px;
  text-decoration: none;
  color: #fff;
  background: #ed3694;
  border: 1px solid #ed3694;
  border-radius: 6px;
  padding: 8px 16px;
  display: inline-block;  /* ADD this — makes padding work correctly on <a> tags */
  transition: background 0.15s, color 0.15s;
}

.button:hover {
  background: #743c8d;
  border-color: #743c8d;
  color: #fff;
}

/* ============================================
   TEXT SELECTION
   ============================================ */

::selection {
  background: #ed3694;
  color: #ffffff;
}

/* Firefox */
::-moz-selection {
  background: #ed3694;
  color: #ffffff;
}

/* ============================================
   HEADER
   ============================================ */

header {
  text-align: center;
  white-space: pre;
  margin-bottom: 20px;
}

.site-title {
  font-size: 14px;
  color: #ed3694;
  display: block;
}

.site-subtitle {
  margin-top: 6px;
  font-size: 14px;
  color: #ed3694;
}

/* ============================================
   LAYOUT — sidebar + main side by side
   ============================================ */

.layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 30px;
  width: 100%;
}

/* ============================================
   SIDEBAR COLUMN (wraps audio player + nav)
   ============================================ */

.sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 40px;
  align-self: flex-start;   /* stops it stretching to full page height */
  flex-shrink: 0;
  width: 260px;
}

/* remove sticky from sidebar itself since the column handles it now */
.sidebar {
  position: static;
  top: unset;
  width: 100%;
}

.audio-player {
  width: 100%;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid #ed3694;
  border-radius: 8px 8px 0 0;           /* rounded only on top */
  border-bottom: 1px dashed #ed3694;    /* dashed divider instead of full border */
  padding: 14px 16px;
}

.sidebar {
  border-radius: 0 0 8px 8px;           /* rounded only on bottom */
}

.audio-title {
  font-size: 11px;
  color: #ed3694;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-controls {
  display: flex;
  gap: 8px;
}

.audio-controls button {
  font-family: monospace;
  font-size: 11px;
  color: #ed3694;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #ed3694;
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex: 1;
}

.audio-controls button:hover {
  background: #ed3694;
  color: #fff;
}

#volume-slider {
  width: 100%;
  margin-top: 8px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, #ed3694 0%, #ed3694 100%);
  border: 1px solid #ed3694;
  outline: none;
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ed3694;
  cursor: pointer;
  border: 2px solid #ffeaf3;
  box-shadow: inset 1px 1px 0px #ffc6d9, inset -1px -1px 0px #a0295e;
}

#volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ed3694;
  cursor: pointer;
  border: 2px solid #ffeaf3;
  box-shadow: inset 1px 1px 0px #ffc6d9, inset -1px -1px 0px #a0295e;
}

/* ============================================
   AUDIO PLAYER
   ============================================ */

.audio-player {
  position: sticky;
  top: 40px;
  flex-shrink: 0;
  width: 260px;                         /* match your sidebar width */
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid #ed3694;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;                  /* gap between player and sidebar */
}

/* ============================================
   SIDEBAR NAV
   ============================================ */

.sidebar {
  position: sticky;
  top: 40px;
  flex-shrink: 0;
  width: 260px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid #ed3694;
  border-radius: 8px;
  padding: 14px 16px;
}

.sidebar p {
  margin-bottom: 0px;
}

.sidebar ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar ul li a {
  text-decoration: none;
  color: #ed3694;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.05em;
  display: block;
  transition: color 0.15s;
}

.sidebar ul li a:hover {
  color: #743c8d;
}

.sidebar ul li a.active {
  font-weight: bold;
  color: white;
  background-color: #ed3694;
  text-decoration: none;
  text-underline-offset: 3px;
}

@media (max-width: 1050px) {
  .sidebar { display: none; }
}

/* ============================================
   MAIN CONTENT COLUMN
   ============================================ */

.main {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 800px;
  flex-shrink: 0;
}

/* ============================================
   BOX SECTIONS
   ============================================ */

.box {
  width: 100%;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid #ed3694;
  border-radius: 8px;
  padding: 20px 24px;
}

.box h2 {
  font-size: 16px;
  font-weight: bold;
  color: #ed3694;
  border-bottom: 1px dashed #ed3694;
  padding-bottom: 6px;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.box h3 {
  font-size: 14px;
  font-weight: bold;
  color: #ed3694;
  margin-top: 1em;
  margin-bottom: 0.25em;
}

.box h3:first-child {
  margin-top: 0;
}

.box p {
  line-height: 1.5;
  color: #ed3694;
  margin-bottom: 1.2em;
}

.box p:last-child {
  margin-bottom: 0;
}

.box ol,
.box ul {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
}

.box li {
  line-height: 1.5;
  margin-bottom: 1em;
}

.box li:last-child {
  margin-bottom: 0;
}

.box code {
  line-height: 1;
  color: #743c8d;
}

.bib {
  font-size: 10px;
  opacity:70%;
}

/* ============================================
   ASCII ART
   ============================================ */

.ascii-art {
  display: block;
  white-space: pre;
  font-family: monospace;
  font-size: 11px;
  color: #ed3694;
  overflow-x: hidden;
  line-height: 1.1;
}

.ascii {
  display: block;
  white-space: pre;
  font-family: monospace;
  font-size: 14px;
  color: #ed3694;
  overflow-x: auto;
  line-height: 1.2;
}

/* ============================================
   VIDEO EMBED — responsive 16:9
   ============================================ */

.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border: 1px solid #ed3694;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 12px;
  margin-bottom: 30px;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ============================================
   SITE PREVIEW IFRAME
   ============================================ */

.site-preview-wrapper {
  position: relative;
  width: 100%;
  padding-top: 65%;
  border: 1px solid #ed3694;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 12px;
  margin-bottom: 30px;
}

.site-preview-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #fff;
}

.preview-link {
  margin-bottom: 1.2em;
}

/* ============================================
   IMAGE GALLERY
   ============================================ */

.image-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  margin-bottom:30px;
}

.image-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #ed3694;
  border-radius: 6px;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  text-align: center;
  font-size: 12px;
  color: #ed3694;
  padding: 16px 0;
}

footer p {
  margin-bottom: 0;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

::-webkit-scrollbar-track {
  background: #ffeaf3;
  border-left: 1px solid #e8a0bb;
  border-top: 1px solid #e8a0bb;
}

::-webkit-scrollbar-thumb {
  background: #e8a0bb;
  border: 3px solid #ffeaf3;
  box-shadow:
    inset 1px 1px 0px #ffc6d9,
    inset -1px -1px 0px #a0295e;
}

::-webkit-scrollbar-thumb:hover {
  background: #d45085;
  box-shadow:
    inset 1px 1px 0px #f9c4d8,
    inset -1px -1px 0px #7a2050;
}

::-webkit-scrollbar-thumb:active {
  background: #a0295e;
  box-shadow:
    inset 1px 1px 0px #7a2050,
    inset -1px -1px 0px #ffc6d9;
}

::-webkit-scrollbar-button {
  background: #e8a0bb;
  border: 2px solid #ffeaf3;
  box-shadow:
    inset 1px 1px 0px #ffc6d9,
    inset -1px -1px 0px #a0295e;
  width: 16px;
  height: 16px;
  display: block;
}

::-webkit-scrollbar-button:hover {
  background: #d45085;
}

::-webkit-scrollbar-button:active {
  box-shadow:
    inset 1px 1px 0px #7a2050,
    inset -1px -1px 0px #ffc6d9;
}

::-webkit-scrollbar-corner {
  background: #ffeaf3;
  border: 1px solid #e8a0bb;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #e8a0bb #ffeaf3;
}

/* ============================================
   GUESTBOOK
   ============================================ */

.guestbook-intro {
  margin-bottom: 1.2em;
}

.guestbook-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.guestbook-form input,
.guestbook-form textarea {
  font-family: monospace;
  font-size: 13px;
  color: #ed3694;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #ed3694;
  border-radius: 6px;
  padding: 8px 12px;
  outline: none;
  resize: none;
  width: 100%;
}

.guestbook-form input::placeholder,
.guestbook-form textarea::placeholder {
  color: #e8a0bb;
}

.guestbook-form input:focus,
.guestbook-form textarea:focus {
  border-color: #743c8d;
  background: rgba(255, 255, 255, 0.9);
}

.guestbook-form textarea {
  height: 80px;
}

.guestbook-form button {
  font-family: monospace;
  font-size: 13px;
  color: #ed3694;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #ed3694;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.15s, color 0.15s;
}

.guestbook-form button:hover {
  background: #ed3694;
  color: #fff;
}

.gb-status {
  font-size: 12px;
  margin: 0;
  min-height: 1.2em;
}

.guestbook-entries {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gb-entry {
  border: 1px dashed #ed3694;
  border-radius: 6px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.4);
}

.gb-entry-header {
  font-size: 11px;
  color: #c060a0;
  margin-bottom: 4px;
  display: flex;
  gap: 12px;
}

.gb-entry-name {
  font-weight: bold;
}

.gb-entry-message {
  font-family: monospace;
  font-size: 12px;
  line-height: 1.3;
  color: #ed3694;
  margin: 0;
  white-space: pre;            /* preserves all spaces and line breaks */
  overflow-x: auto;            /* scrolls if art is wider than the box */
}

.gb-loading {
  font-size: 12px;
  color: #e8a0bb;
}

.gb-empty {
  font-size: 12px;
  color: #e8a0bb;
  font-style: italic;
}

.gb-field-wrapper {
  position: relative;
}

.gb-counter {
  position: absolute;
  bottom: 6px;
  right: 10px;
  font-size: 10px;
  color: #e8a0bb;
  pointer-events: none;        /* so it doesn't interfere with clicking */
}

/* make room so counter doesn't overlap text */
.guestbook-form input {
  padding-right: 48px;
}

.guestbook-form textarea {
  padding-right: 48px;
  height: 160px;               /* taller to give ASCII art room */
  font-size: 12px;             /* slightly smaller so wide art fits better */
  white-space: pre;            /* preserves spaces exactly as typed */
  overflow-x: auto;            /* lets wide ASCII art scroll sideways */
  resize: vertical;            /* let user resize vertically if needed */
  line-height: 1.3;
}