@import url("https://cdn.cursors-4u.net/cursors/animated/dancing-banana-angel-af1277bf-40.css");

/* One stylesheet for every page. Shared chrome first, then each page's own section. */

:root {
  --myspace-blue: #6699cc;
  --myspace-light-blue: #e5edf5;
  --myspace-dark-blue: #003399;
  --myspace-orange: #ffcc99;
  --myspace-light-orange: #ffe6cc;
  --myspace-deep-orange: #ff9966;
  --heading-orange: #ff6600;
  --title-orange: #cc6600;

  /* Roles: each part of the page reads one of these, so a theme only has to redefine this list */
  --page-bg: var(--myspace-light-blue);
  --panel-tint: var(--myspace-light-blue);
  --surface: #ffffff;
  --text: #000000;
  --muted: #666666;
  --muted-strong: #555555;
  --rule: #cccccc;
  --link: var(--myspace-dark-blue);
  --nav-bg: var(--myspace-dark-blue);
  --bar-text: #ffffff;
  --alert: #cc0000;
  --comment-cell: #ff9933;
  --top8-border: #EDAF87;
  --top8-bg: #ffe5cb;
  --top8-title: #fd6500;
  --top8-title-bg: #ffcb98;
  --top8-date: red;
  --top8-link: #0056AB;
  --icon-bg: transparent;
}

/* --- THEMES (picked in the header by theme.js; Classic is the :root values above) --- */
html[data-theme="midnight"] {
  color-scheme: dark;
  --myspace-blue: #2f4f86;
  --myspace-orange: #4a3220;
  --myspace-light-orange: #2c2118;
  --myspace-deep-orange: #5c3715;
  --heading-orange: #ffa04d;
  --title-orange: #ffb86b;
  --page-bg: #101a33;
  --panel-tint: #22305a;
  --surface: #18213d;
  --text: #e8ecf5;
  --muted: #a3abc2;
  --muted-strong: #b8c0d6;
  --rule: #3a4670;
  --link: #9cc3ff;
  --nav-bg: #0a1430;
  --alert: #ff7a7a;
  --comment-cell: #6b3f17;
  --top8-border: #7a5230;
  --top8-bg: #2c2118;
  --top8-title: #ffa04d;
  --top8-title-bg: #4a3220;
  --top8-date: #ff8a8a;
  --top8-link: #9cc3ff;
  --icon-bg: #e8ecf5;
}

html[data-theme="bubblegum"] {
  --myspace-blue: #c2307a;
  --myspace-orange: #e6ccff;
  --myspace-light-orange: #f4e8ff;
  --myspace-deep-orange: #d6bfff;
  --heading-orange: #7a1fc9;
  --title-orange: #a0307a;
  --page-bg: #ffe3f1;
  --panel-tint: #ffe3f1;
  --rule: #f3b6d3;
  --link: #8a004a;
  --nav-bg: #99004f;
  --alert: #e6007a;
  --comment-cell: #d9b3ff;
  --top8-border: #d6a8f0;
  --top8-bg: #f7ecff;
  --top8-title: #7a1fc9;
  --top8-title-bg: #e6ccff;
  --top8-date: #b8005f;
  --top8-link: #8a004a;
}

* {
  box-sizing: border-box;
}

/* Stops iOS Safari enlarging text when a phone is turned to landscape */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-color: var(--page-bg);
  color: var(--text);
  font-family: Verdana, Geneva, sans-serif;
  font-size: 12px;
  margin: 0;
  padding: 0;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--heading-orange);
  outline-offset: 2px;
}

.master-container {
  background-color: var(--surface);
  margin: 0 auto;
  max-width: 950px;
  padding: 10px;
  width: 100%;
}

/* --- HEADER AND NAVIGATION --- */
.main-header {
  margin-bottom: 20px;
}

.search-bar {
  background-color: var(--myspace-blue);
  color: var(--bar-text);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 10px;
  padding: 5px 10px;
}

.search-bar form {
  display: flex;
  align-items: center;
  gap: 5px;
}

.search-bar label {
  font-size: 12px;
}

.submit-btn {
  font-size: 12px;
  padding: 1px 4px;
}

.topnav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 10px;
}

.topnav a {
  color: var(--bar-text);
}

.theme-picker {
  color: var(--bar-text);
}

/* 24px is the WCAG 2.2 minimum target size */
.theme-picker select {
  font-size: 11px;
  min-height: 24px;
}

.navbar {
  background-color: var(--nav-bg);
  padding: 5px 0;
}

.navbar ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0 8px;
  gap: 4px 15px;
}

.navbar a {
  color: var(--bar-text);
  font-weight: bold;
}

/* --- TWO-COLUMN PAGE LAYOUT --- */
.page-content-container,
.spacehey-blog-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
}

.spacehey-blog-grid {
  margin-top: 10px;
}

/* Grid columns default to min-width:auto, which lets wide content (sliders, long URLs) stretch the column */
.page-content-container > *,
.spacehey-blog-grid > * {
  min-width: 0;
}

/* --- FOOTER --- */
.footer {
  border-top: 1px solid var(--rule);
  margin-top: 40px;
  padding: 20px 0;
  text-align: center;
}

.footer ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 0 0 10px 0;
  padding: 0;
}

.footer li {
  border-right: 1px solid var(--text);
  padding: 0 8px;
}

.footer li#last {
  border-right: none;
}

.footer small {
  color: var(--muted);
  display: block;
  font-size: 11px;
}

/* =========================================================
   PROFILE PAGE (index.html)
   ========================================================= */
.profile-sidebar h1 {
  font-size: 20px;
  margin-top: 0;
}

.profile-picture-container {
  text-align: center;
  margin-bottom: 20px;
}

.profile-pic-row {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.profile-pic {
  flex: 0 1 170px;
  height: auto;
  max-width: 170px;
  min-width: 0;
}

/* Text takes the space left by the photo; the photo only shrinks once the text would drop under 80px */
.profile-info-text {
  flex: 1 1 0;
  min-width: 80px;
  text-align: left;
}

.profile-info-text ul {
  margin: 0;
}

.personal-msg {
  font-style: italic;
  margin-top: 10px;
}

.gender-age, .last-login {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  text-align: left;
}

.sidebar-table {
  border: 2px solid var(--myspace-blue);
  border-collapse: collapse;
  margin-bottom: 20px;
  width: 100%;
}

.sidebar-table-h2 {
  background-color: var(--myspace-blue);
  color: var(--bar-text);
  font-size: 14px;
  margin: 0;
  padding: 5px;
  text-align: left;
}

.sidebar-table-header {
  background-color: var(--panel-tint);
  border: 1px solid var(--myspace-blue);
  color: var(--link);
  padding: 5px;
  text-align: left;
  vertical-align: top;
  width: 35%;
}

.sidebar-table-data {
  border: 1px solid var(--myspace-blue);
  padding: 5px;
  vertical-align: top;
}

.contact-box {
  border: 2px solid var(--myspace-blue);
  margin-bottom: 20px;
}

.contact-box h2 {
  background-color: var(--myspace-blue);
  color: var(--bar-text);
  font-size: 14px;
  margin: 0;
  padding: 5px;
}

.contact-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 10px;
  padding: 0;
}

/* The icons are GIFs with dark text baked in, so dark themes need a light backing to keep them readable */
.contact-images img {
  background-color: var(--icon-bg);
  cursor: pointer;
  max-width: 100%;
}

.myspace-url-box {
  border: 1px solid var(--myspace-blue);
  margin-bottom: 20px;
  padding: 10px;
}

.myspace-url-box h3, .myspace-url-box p {
  margin: 5px 0;
}

.main-section-header {
  background-color: var(--myspace-orange);
  margin-bottom: 0;
}

.main-section-h2 {
  color: var(--heading-orange);
  font-size: 14px;
  font-weight: bold;
  margin: 0;
  padding: 6px 10px;
}

.user-network {
  border: 2px solid var(--myspace-blue);
  margin-bottom: 20px;
  text-align: center;
}

.user-network h2 {
  font-size: 16px;
  margin: 15px 0;
}

.blurbs {
  margin-bottom: 25px;
}

.blurbs h3 {
  color: var(--title-orange);
  font-size: 13px;
  margin-bottom: 5px;
}

.friends {
  margin-bottom: 25px;
}

.friend-pic-container {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.friend-pic-container figure {
  margin: 0;
  text-align: center;
}

.friend-pic-container img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 90px;
}

.friend-pic-container figcaption {
  font-size: 11px;
  margin-bottom: 5px;
  overflow-wrap: anywhere;
}

.focus-highlight {
  color: var(--alert);
  font-weight: bold;
}

#comment-counter {
  margin: 10px 0;
  font-size: 12px;
}

.comment-wall table {
  border: none;
  border-collapse: collapse;
  width: 100%;
  background-color: transparent;
}

.comment-wall tr {
  border-bottom: 2px solid var(--surface);
}

.comment-wall th[scope="row"] {
  background-color: var(--comment-cell);
  padding: 12px 10px;
  text-align: center;
  vertical-align: top;
  width: 25%;
  border-right: 2px solid var(--surface);
}

.comment-wall th[scope="row"] figure {
  margin: 0;
  padding: 0;
}

.comment-wall th[scope="row"] figcaption {
  font-weight: bold;
  margin-bottom: 6px;
}

.comment-wall th[scope="row"] img {
  width: 100%;
  max-width: 80px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.comment-wall td {
  background-color: var(--myspace-orange);
  padding: 12px 15px;
  vertical-align: top;
  text-align: left;
}

.comment-wall td h3 {
  margin: 0 0 6px 0;
  font-size: 12px;
  font-weight: bold;
}

.comment-wall td p {
  margin: 0;
  line-height: 1.4;
}

#add-comment {
  margin-top: 10px;
  text-align: left;
}

/* =========================================================
   BLOG LIST, GALLERY AND ALBUM SIDEBAR (blog, gallery, album)
   ========================================================= */
.sidebar-box {
  border: 2px solid var(--myspace-blue);
  margin-bottom: 20px;
}

.sidebar-box h2 {
  background-color: var(--myspace-blue);
  color: var(--bar-text);
  font-size: 14px;
  margin: 0;
  padding: 5px;
  text-align: left;
}

.sidebar-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 10px;
}

.blog-profile-pic {
  max-width: 170px;
  height: auto;
}

.profile-meta {
  margin: 0;
  font-size: 12px;
}

.blog-url {
  font-size: 11px;
  margin: 10px;
  border-top: 1px dashed var(--myspace-blue);
  padding-top: 10px;
}

.url-text {
  word-break: break-all;
  color: var(--muted);
}

.main-section-title {
  color: var(--title-orange);
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--myspace-blue);
  padding-bottom: 5px;
}

.blog-entry {
  border: 2px solid var(--myspace-blue);
  margin-bottom: 25px;
  background-color: var(--surface);
}

.entry-header {
  background-color: var(--panel-tint);
  border-bottom: 1px solid var(--myspace-blue);
  padding: 8px 10px;
}

.entry-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 3px;
}

.blog-entry .entry-title {
  margin: 0 0 5px 0;
  font-size: 14px;
}

.entry-category {
  font-size: 11px;
  font-weight: bold;
  color: var(--link);
}

.entry-body {
  padding: 15px;
  line-height: 1.5;
}

/* =========================================================
   BLOG ENTRY PAGES (entry, maplists, top8music)
   ========================================================= */
.author-details-box {
  border: 2px solid var(--myspace-blue);
  padding: 12px;
  background-color: var(--surface);
}

.author-pic {
  width: 100%;
  height: auto;
  max-width: 170px;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px auto;
}

.published-by-title {
  margin: 0 0 4px 0;
  font-size: 13px;
  font-weight: bold;
  line-height: 1.3;
}

.published-date {
  margin: 0 0 12px 0;
  font-size: 11px;
  color: var(--muted-strong);
}

.entry-meta-item {
  margin: 8px 0;
  font-size: 12px;
}

.sidebar-nav-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 15px;
  border-top: 1px dashed var(--rule);
  padding-top: 12px;
  font-size: 12px;
}

.main-post-box .entry-title {
  font-size: 26px;
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: bold;
}

.entry-content-text {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 25px;
}

.kudos-section {
  margin: 25px 0 20px 0;
}

.kudos-headline {
  font-size: 13px;
  margin: 0 0 8px 0;
  color: var(--alert);
  font-weight: bold;
}

.kudos-buttons {
  font-size: 12px;
}

.comments-container {
  margin-top: 40px;
}

.comments-heading {
  font-size: 14px;
  font-weight: bold;
  margin: 0 0 15px 0;
}

.comments-count-meta {
  font-size: 13px;
  margin-bottom: 15px;
}

.spacehey-comment-grid {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  border: 2px solid var(--myspace-orange);
  margin-bottom: 15px;
  background-color: var(--myspace-orange);
  gap: 2px;
}

.comment-left-cell {
  background-color: var(--myspace-orange);
  padding: 10px;
  text-align: center;
}

.comment-right-cell {
  background-color: var(--myspace-light-orange);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.commenter-name {
  font-weight: bold;
  display: block;
  margin-bottom: 8px;
}

.commenter-avatar {
  width: 90px;
  height: 90px;
  object-fit: cover;
  margin: 0 auto;
  display: block;
}

.comment-timestamp {
  font-weight: bold;
  font-size: 13px;
  margin-bottom: 8px;
}

.comment-text-body {
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 25px;
}

.comment-report-action {
  font-size: 11px;
  text-align: right;
  width: 100%;
}

.comment-citation-box {
  border: 1px solid var(--myspace-orange);
  background-color: var(--myspace-light-orange);
  padding: 12px;
  margin-top: 15px;
  font-size: 13px;
  line-height: 1.4;
}

/* --- Top 8 music grids (top8music.html) --- */
.friend-category-wrapper {
  width: 100%;
  border: 1px solid var(--top8-border);
  margin: 15px 0 30px 0;
  background-color: var(--top8-bg);
}

.friend-grid-title {
  color: var(--top8-title);
  background-color: var(--top8-title-bg);
  font-size: 0.95rem;
  padding: 8px;
  margin: 0;
  font-weight: bold;
}

.friend-grid-subtitle {
  margin: 8px 15px 15px 9px;
  padding: 0;
  font-size: 0.86rem;
  letter-spacing: -.8px;
  font-weight: bold;
}

.friend-count {
  font-weight: 400;
  color: var(--top8-date);
}

.friend-list-container {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 8px;
  padding: 0 10px;
}

.friend-cell {
  text-align: center;
  margin-bottom: 20px;
}

.friend-cell h4 {
  margin: 0 0 6px 0;
  font-size: 0.85rem;
}

.friend-cell h4 a {
  color: var(--top8-link);
  font-weight: bold;
}

.friend-photo-link {
  display: block;
  width: 100%;
  max-width: 100px;
  aspect-ratio: 1;
  margin: 0 auto 6px auto;
  overflow: hidden;
}

.friend-photo-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================================================
   PHOTO ALBUMS (gallery, album)
   ========================================================= */
.gallery-container-box {
  background-color: var(--myspace-orange);
  border: 1px solid var(--myspace-deep-orange);
  padding: 12px;
  width: 100%;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
  width: 100%;
}

.album-card {
  background-color: var(--myspace-orange);
  border: 1px solid var(--myspace-deep-orange);
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.album-card-header {
  background-color: var(--myspace-deep-orange);
  color: var(--text);
  font-weight: bold;
  font-size: 11px;
  padding: 6px 8px;
  text-align: left;
}

.album-card-header a {
  text-decoration: underline;
}

.album-card-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.album-card-body img {
  width: 150px;
  aspect-ratio: 150 / 115;
  object-fit: cover;
  margin-bottom: 5px;
}

.view-pics-btn {
  font-size: 11px;
  margin-top: 4px;
  font-weight: bold;
  text-decoration: underline;
}

.gallery-back-link {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: bold;
  text-decoration: underline;
}

.swiper-viewscreen {
  width: 100%;
  /* Keeps the whole slider on screen when a phone is held sideways */
  height: min(400px, 70vh);
  background-color: #000000;
  border: 1px solid var(--myspace-deep-orange);
  position: relative;
  overflow: hidden;
}

.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

.swiper-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.swiper-button-next, .swiper-button-prev {
  color: var(--link);
  text-shadow: 1px 1px #ffffff;
}

.swiper-button-next:after, .swiper-button-prev:after {
  font-size: 20px;
  font-weight: bold;
}

.swiper-pagination-bullet {
  background: #ffffff;
  opacity: 0.6;
}

.swiper-pagination-bullet-active {
  background: var(--myspace-deep-orange);
  opacity: 1;
}

.slider-meta-caption {
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted-strong);
  text-align: center;
  font-style: italic;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablets and phones held sideways: same two-column look as desktop, with a narrower sidebar */
@media (max-width: 950px) {
  .master-container {
    margin: 10px auto;
    width: calc(100% - 30px);
  }

  .page-content-container,
  .spacehey-blog-grid {
    grid-template-columns: minmax(220px, 30%) minmax(0, 1fr);
  }
}

/* Phones held upright: one column */
@media (max-width: 600px) {
  .master-container {
    margin: 8px auto;
    padding: 8px;
    width: calc(100% - 16px);
  }

  .page-content-container,
  .spacehey-blog-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Header: home and help links on the first row, search on its own row */
  .search-bar form {
    flex-wrap: wrap;
    order: 3;
    width: 100%;
  }

  .search-bar label:has(input[type="text"]) {
    flex: 1 1 140px;
  }

  /* 16px stops iOS zooming the page when the field is tapped */
  .theme-picker select {
    font-size: 16px;
  }

  .search-bar input[type="text"] {
    font-size: 16px;
    width: 100%;
  }

  .navbar a {
    display: inline-block;
    padding: 3px 0;
  }

  .friend-pic-container {
    gap: 12px 8px;
  }

  /* Names that wrap to two lines push the photo down; this keeps each row of photos level */
  .friend-pic-container figure {
    display: flex;
    flex-direction: column;
  }

  .friend-pic-container figcaption {
    flex-grow: 1;
  }

  /* Blog, gallery and album sidebar becomes a small profile strip */
  .sidebar-profile {
    flex-direction: row;
    text-align: left;
  }

  .blog-profile-pic {
    max-width: 72px;
  }

  /* Entry pages: author box becomes a compact byline so the post starts near the top */
  .author-details-box {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 12px;
    align-items: start;
  }

  .author-pic {
    grid-row: span 3;
    margin: 0;
  }

  .published-date,
  .entry-meta-item {
    margin: 0 0 4px 0;
  }

  .sidebar-nav-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 10px;
    padding-top: 10px;
  }

  .main-post-box .entry-title {
    font-size: 20px;
  }

  .commenter-avatar {
    width: 64px;
    height: 64px;
  }

  .comment-text-body {
    margin-bottom: 12px;
  }

  /* Top 8 music: two bigger tiles per row so the art and links are easy to tap */
  .friend-list-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
  }

  .friend-photo-link {
    max-width: 140px;
  }

  .album-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }

  .gallery-container-box {
    padding: 8px;
  }

  .footer {
    margin-top: 24px;
  }
}
