/* ============================================
   Alternative Theme: California Minimal
   ============================================ */

html:has(body.theme-cali) {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #faf8f3, #f5f0ea, #ebe5dd);
}

body.theme-cali {
  color: #4a4a4a;
  width: 100%;
  max-width: 800px;
  padding: 16px;
}

body.theme-cali .header-logo {
  width: 100px;
  display: block;
  margin: 0 auto;
}

body.theme-cali h1 {
  font-weight: 300;
  color: #3700ff;
  text-shadow: none;
  font-family: 'Georgia', serif;
  text-align: center;
  font-size: 72px;
}

@media (min-width: 600px) {
  body.theme-cali .header-logo {
    width: 150px;
  }

  body.theme-cali h1 {
    font-size: 90px;
  }
}

body.theme-cali h2 {
  color: #a89080;
  text-shadow: none;
  text-transform: capitalize;
  border-left-color: #d4a574;
  font-family: 'Georgia', serif;
}

body.theme-cali p,
body.theme-cali .text {
  color: #5a5a5a;
  font-family: 'Georgia', serif;
}

body.theme-cali .time-stamp {
  color: #a89080;
  font-family: 'Georgia', serif;
}

body.theme-cali .folder-group {
  background: rgba(255, 250, 245, 0.8);
  border: 1px solid #d4c4b4;
  padding: 24px;
  margin-bottom: 32px;
}

body.theme-cali .folder-group::before {
  content: attr(data-folder);
  display: block;
  text-transform: capitalize;
  color: #a89080;
  font-family: 'Georgia', serif;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e8dccf;
}

body.theme-cali img {
  max-width: 100%;
  height: auto;
  margin-bottom: 24px;
}

body.theme-cali audio {
  width: 100%;
  margin-bottom: 24px;
}

body.theme-cali video {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin-bottom: 24px;
  border-radius: 8px;
}

body.theme-cali .text {
  margin-bottom: 24px;
}

body.theme-cali > p:last-of-type {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #e8dccf;
  color: #a89080;
  font-size: 14px;
}

/* ============================================
   Alternative Theme: Grid Layout (Full-Bleed)
   ============================================ */

body.theme-grid {
  background: #000;
  color: #fff;
  font-family: system-ui, sans-serif;
  margin: 0;
  padding: 0;
}

body.theme-grid .header-logo,
body.theme-grid h1,
body.theme-grid > p,
body.theme-grid .time-stamp {
  display: none;
}

body.theme-grid #text-files-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

body.theme-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
}

body.theme-grid audio {
  width: 100%;
  background: #111;
  padding: 16px;
}

body.theme-grid video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.theme-grid .text {
  padding: 24px;
  background: #111;
  font-size: 14px;
  line-height: 1.5;
}

body.theme-grid .folder-group {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

body.theme-grid .folder-group::before {
  content: attr(data-folder);
  grid-column: 1 / -1;
  padding: 16px 24px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: #111;
}

/* ============================================
   Alternative Theme: Sleek Modern
   ============================================ */

html:has(body.theme-sleek) {
  min-height: 100vh;
  background: #fafafa;
}

body.theme-sleek {
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 24px;
}

body.theme-sleek .header-logo {
  display: none;
}

body.theme-sleek h1 {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #999;
  margin-bottom: 48px;
}

body.theme-sleek p,
body.theme-sleek .text {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
}

body.theme-sleek .time-stamp {
  font-size: 12px;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 48px 0 16px;
}

body.theme-sleek img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 8px 0 32px;
}

body.theme-sleek audio {
  width: 100%;
  margin: 8px 0 32px;
}

body.theme-sleek video {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 8px 0 32px;
}

body.theme-sleek .folder-group {
  margin: 64px 0;
  padding-top: 32px;
  border-top: 1px solid #eee;
}

body.theme-sleek .folder-group::before {
  content: attr(data-folder);
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  background: #1a1a1a;
  padding: 6px 12px;
  border-radius: 4px;
  margin-bottom: 32px;
}

body.theme-sleek > p:last-of-type {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid #eee;
  font-size: 13px;
  color: #999;
}

/* ============================================
   Alternative Theme: Dark Mode
   ============================================ */

html:has(body.theme-dark) {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #0a0a0a;
}

body.theme-dark {
  color: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  width: 100%;
  max-width: 800px;
  padding: 24px;
}

body.theme-dark .header-logo {
  width: 100px;
  display: block;
  margin: 0 auto;
  filter: invert(1);
}

body.theme-dark h1 {
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  color: #fff;
  margin-bottom: 48px;
}

body.theme-dark p,
body.theme-dark .text {
  font-size: 15px;
  line-height: 1.7;
  color: #aaa;
}

body.theme-dark .time-stamp {
  font-size: 12px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 32px 0 12px;
}

body.theme-dark img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 8px 0 24px;
}

body.theme-dark audio {
  width: 100%;
  margin: 8px 0 24px;
}

body.theme-dark video {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 8px 0 24px;
}

body.theme-dark .folder-group {
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
}

body.theme-dark .folder-group::before {
  content: attr(data-folder);
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #222;
}

body.theme-dark > p:last-of-type {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #222;
  color: #444;
  font-size: 13px;
  text-align: center;
}

@media (min-width: 600px) {
  body.theme-dark h1 {
    font-size: 48px;
  }
}

/* ============================================
   Alternative Theme: Background Image
   ============================================ */

html:has(body.theme-bg) {
  min-height: 100vh;
  background-image: url('./assets/bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

body.theme-bg {
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 560px;
  margin: 0 auto;
  padding: 64px 24px;
}

body.theme-bg .header-logo {
  width: 80px;
  display: block;
  margin: 0 auto 20px;
  border-radius: 12px;
}

body.theme-bg h1 {
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  padding: 12px 24px;
  border-radius: 8px;
  display: table;
  margin: 0 auto 48px;
}

body.theme-bg p,
body.theme-bg .text {
  font-size: 14px;
  line-height: 1.6;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
  padding: 16px;
  border-radius: 10px;
  margin: 8px 0;
}

body.theme-bg .time-stamp {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 32px 0 8px;
}

body.theme-bg img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 8px 0;
}

body.theme-bg audio {
  width: 100%;
  margin: 8px 0;
}

body.theme-bg video {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 8px 0;
}

body.theme-bg .folder-group {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
  border-radius: 14px;
  padding: 20px;
  margin: 24px 0;
}

body.theme-bg .folder-group::before {
  content: attr(data-folder);
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

body.theme-bg .folder-group .text {
  background: rgba(255, 255, 255, 0.1);
}

body.theme-bg > p:last-of-type {
  margin-top: 48px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
  padding: 14px 20px;
  border-radius: 8px;
}

/* ============================================
   Shared: Media Error Styles
   ============================================ */

.media-error {
  color: #e74c3c;
  font-size: 14px;
  padding: 12px;
  background: rgba(231, 76, 60, 0.1);
  border-radius: 6px;
  margin: 8px 0;
}
