/* --- Dark Theme & Kepler Vibe --- */
body {
    background-color: #111; /* Dunkler als bg-gray-900 */
    color: #d1d5db; /* text-gray-300 */
    font-family: 'IBM Plex Mono', monospace; /* Monospace-Font für den "Matrix/Research"-Look */
    font-size: 16px; /* Explizite Base-Size für konsistente Darstellung */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%; /* Verhindert Safari's automatische Text-Vergrößerung */
    text-size-adjust: 100%;
}

/* Safari-spezifische Monospace-Font Korrektur */
/* TODO: Safari fonts sind immer noch etwas größer - weitere Optionen:
   - Base font-size weiter reduzieren (14px oder 13.5px)
   - Alternativ: CSS Transform scale(0.95) auf body für Safari
   - Oder: Jeden Font-Size Wert einzeln mit calc() reduzieren
   - Testen mit: font-size: calc(1rem * 0.9375); für Safari
*/
@supports (-webkit-hyphens:none) {
    body {
        font-size: 15px; /* Kleinere Base-Size für Safari (war 16px) */
    }
    
    body, p, div, span, a, button, input, textarea {
        font-size: inherit; /* Safari rendert Monospace oft größer - erzwingt Vererbung */
    }
}

/* --- Akzentfarbe: Matrix Grün --- */
.text-accent {
    color: #4ade80; /* text-green-400 */
}
.border-accent {
    border-color: #4ade80; /* border-green-400 */
}
.hover-accent:hover {
     color: #111;
     background-color: #4ade80;
}

/* --- Eigene Font hochladen --- */
/*
@font-face {
    font-family: 'DeinPixelFont';
    src: url('pfad/zu/deinpixelfont.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
.font-custom {
    font-family: 'DeinPixelFont', sans-serif;
}
*/

/* --- Das "fließende Blöcke" Layout (CSS Grid) --- */
/* Bleibt gleich, wird aber jetzt IN den Sektionen verwendet */
.logbook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem; /* 24px */
}

/* Styling für die einzelnen Blöcke */
.logbook-item {
    background-color: #0c1424;
    background-image: linear-gradient(145deg, rgba(7, 11, 22, 0.95) 0%, rgba(16, 27, 46, 0.98) 70%, rgba(10, 18, 33, 0.95) 100%);
    border: 1px solid #1f2937; /* border-gray-800 */
    border-radius: 0.25rem; /* rounded-sm */
    padding: 1.5rem; /* p-6 */
    align-self: start; 
}

/* --- Logbook Layout mit horizontaler Timeline (Neu) --- */
main.container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
}

.logbook-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: calc(100vh - 80px); /* Mindesthöhe minus Header */
    min-height: -webkit-calc(100vh - 80px); /* Safari-spezifisch */
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Horizontale Timeline oben */
.timeline-horizontal {
    width: 100%;
    height: 70px; /* Höher für Safari (war 60px) */
    background-color: #111; /* Dunkler Hintergrund */
    border-bottom: 1px solid #374151; /* border-gray-700 */
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    flex-shrink: 0;
    position: relative;
    padding: 0 1.25rem; /* Max 20px auf Desktop */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling auf iOS Safari */
}

@media (max-width: 768px) {
    .timeline-horizontal {
        padding: 0; /* Keine seitlichen Abstände auf Mobile */
    }
}

.timeline-horizontal::-webkit-scrollbar {
    height: 4px;
}

.timeline-horizontal::-webkit-scrollbar-track {
    background: #1f2937;
}

.timeline-horizontal::-webkit-scrollbar-thumb {
    background: #4ade80;
    border-radius: 2px;
}

.timeline-list {
    padding: 0.5rem 0; /* Etwas mehr padding für Safari */
    display: flex;
    flex-direction: row;
    gap: 0.5rem; /* gap-2 */
    align-items: center;
    min-width: 100%;
    height: 100%; /* Volle Höhe der Timeline nutzen */
}

.timeline-item {
    padding: 0.35rem 0.85rem; /* kompakter */
    background-color: transparent;
    border-bottom: 2px solid #374151; /* border-gray-700 */
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 0.25rem; /* rounded-sm */
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 110px;
    height: auto; /* auto statt 100% für Safari */
    max-height: 100%;
    justify-content: center;
    padding-bottom: 0.5rem; /* Mehr Platz für das ::before Element */
}

.timeline-item::before {
    content: '';
    position: absolute;
    bottom: -3px; /* Weniger negativ (war -6px) damit es nicht über den Rand geht */
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background-color: #374151; /* border-gray-700 */
    border: 2px solid #111;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    background-color: #1f2937; /* bg-gray-800 */
    border-bottom-color: #4ade80; /* border-accent */
    transform: translateY(-2px);
}

.timeline-item:hover::before {
    background-color: #4ade80; /* bg-accent */
    border-color: #4ade80;
    transform: translateX(-50%) scale(1.2);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}

.timeline-item.active {
    background-color: #0c2a1e; /* Dunkles Grün */
    border-bottom-color: #4ade80; /* border-accent */
}

.timeline-item.active::before {
    background-color: #4ade80; /* bg-accent */
    border-color: #4ade80;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.6);
}


.timeline-item-date {
    font-size: 0.7rem; /* text-xs - kleiner für horizontale Timeline */
    color: #9ca3af; /* text-gray-400 */
    margin-bottom: 0.25rem; /* mb-1 */
    transition: color 0.3s ease;
    text-align: center;
}

/* Safari-spezifische Korrektur für Timeline-Text */
@supports (-webkit-hyphens:none) {
    .timeline-item-date {
        font-size: 0.65rem; /* Kleiner in Safari */
    }
}

.timeline-item:hover .timeline-item-date,
.timeline-item.active .timeline-item-date {
    color: #4ade80; /* text-accent */
}

.timeline-item-title {
    font-size: 0.75rem; /* text-xs - kleiner für horizontale Timeline */
    font-weight: 500;
    color: #d1d5db; /* text-gray-300 */
    line-height: 1.3;
    transition: color 0.3s ease;
    text-align: center;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Safari-spezifische Korrektur für Timeline-Titel */
@supports (-webkit-hyphens:none) {
    .timeline-item-title {
        font-size: 0.7rem; /* Kleiner in Safari */
    }
}

.timeline-item:hover .timeline-item-title,
.timeline-item.active .timeline-item-title {
    color: #4ade80; /* text-accent */
}

/* Hauptinhalt: Einzelner Eintrag */
.logbook-main {
    flex: 1;
    overflow-y: auto;
    overflow-anchor: none; /* Disable automatic scroll anchoring */
    padding: 0; /* Kein Padding */
    background-color: #111;
    min-height: 0; /* Wichtig für Flexbox overflow */
}

.logbook-entry-container {
    max-width: 100%;
    margin: 0;
    padding: 0.75rem;
}

@media (max-width: 768px) {
    .logbook-entry-container {
        padding: 0.5rem 0; /* Keine seitlichen Abstände auf Mobile */
    }
}

/* Content Grid für Bubbles - Smart Layout mit JavaScript-Optimierung */
.content-grid {
    display: grid;
    gap: 0.75rem;
    width: 100%;
    align-items: start; /* Bubbles nur so hoch wie ihr Inhalt */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-auto-flow: row;
    grid-auto-rows: 0.2rem; /* Kleine Grundeinheit für präzise Masonry-Höhen */
    padding: 0.75rem;
}

/* Content Bubbles */
.content-bubble {
    background-color: #050a13;
    background-image: linear-gradient(150deg, rgba(4, 6, 10, 0.98) 0%, rgba(12, 17, 27, 0.98) 55%, rgba(5, 8, 14, 0.98) 100%);
    border: none; /* Border entfernt - nur Glow beim Hover */
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    contain: layout; /* Improve rendering performance */
}

.content-bubble:hover {
    /* Subtiler Glow-Effekt mit gedämpftem Grün */
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.15), 0 0 40px rgba(74, 222, 128, 0.08);
}

.bubble-large,
.bubble-medium {
    grid-column: span 1;
}

/* Dynamisches Sizing: Bubbles können basierend auf Inhalt unterschiedlich breit sein */
/* Für jetzt: Responsive Spalten, aber Bubbles können bei Bedarf mehrere Spalten überspannen */
.content-bubble {
    height: auto; /* Keine feste Höhe */
    min-height: auto; /* Keine minimale Höhe */
}

.bubble-content {
    color: #d1d5db; /* text-gray-300 */
    line-height: 1.6;
    font-size: 1rem; /* Explizite Größe für Konsistenz */
}

/* Safari-spezifische Korrektur für Bubble-Content */
@supports (-webkit-hyphens:none) {
    .bubble-content {
        font-size: 0.95rem; /* Etwas kleiner in Safari */
    }
}

.bubble-content p {
    margin-bottom: 1rem;
}

.bubble-content > *:last-child,
.bubble-content p:last-child {
    margin-bottom: 0;
}

.bubble-content img {
    display: block;
    margin: 1rem auto;
    border-radius: 0.25rem;
}

/* Journal Header (Titel mit Datum/Zeit) */
.journal-header {
    margin-bottom: 1.5rem;
}

.journal-date-time {
    font-family: 'Press Start 2P', 'IBM Plex Mono', monospace;
    font-size: 0.55rem; /* 9px */
    color: #9ca3af; /* text-gray-400 */
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.journal-title {
    font-family: 'Press Start 2P', 'IBM Plex Mono', monospace;
    font-size: 2.05rem;
    font-weight: normal;
    line-height: 1.35;
    margin: 0;
    background-image: linear-gradient(115deg, #16a34a 0%, #4ade80 50%, #f3f4f6 100%);
    background-size: 220% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: titleGlow 7s linear infinite;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Safari-spezifische Korrektur für Journal-Titel */
@supports (-webkit-hyphens:none) {
    .journal-title {
        font-size: 1.9rem; /* Kleiner in Safari */
    }
}

.journal-title-typing {
    display: inline-block;
    position: relative;
    white-space: pre-wrap;
}

.journal-title-text {
    display: inline;
}

.journal-title-caret {
    width: 0.18rem;
    height: 1.2em;
    background: #d1fae5;
    opacity: 1;
    display: inline-block;
    vertical-align: baseline;
    margin-left: 0.1rem;
    transform: translateY(0.15em);
    animation: caretBlink 0.8s ease-in-out infinite;
}

.journal-title-caret.blink {
    animation: caretBlink 1.1s step-end infinite;
}

@keyframes caretBlink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

@supports not ((-webkit-background-clip: text)) {
    .journal-title {
        color: #f3f4f6;
    }
}

@keyframes titleGlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.bubble-section-title {
    font-family: 'Press Start 2P', 'IBM Plex Mono', monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(134, 239, 172, 0.15);
    transition: color 0.25s ease, text-shadow 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    position: relative;
    font-size: 0.75rem;
}

.bubble-heading-level-1 {
    font-size: 1.25rem;
}

.bubble-heading-level-2 {
    font-size: 0.75rem;
    color: #8b9aaf; /* Helles, desaturiertes Blau basierend auf Hintergrund, aber heller */
}

.bubble-heading-level-3 {
    font-size: 0.6rem;
}

.bubble-section-title::after {
    content: '';
    position: relative;
    display: inline-flex;
    width: 18px;
    height: 2px;
    background: linear-gradient(90deg, rgba(134, 239, 172, 0.7), transparent);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.content-bubble:hover .bubble-section-title {
    color: #86efac;
    text-shadow: 0 0 12px rgba(134, 239, 172, 0.5);
}

.content-bubble:hover .bubble-section-title::after {
    opacity: 1;
    transform: translateX(4px);
}

/* Image scaling classes - alle zentriert */
.img-50 {
    width: 50% !important;
    max-width: 50%;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.img-75 {
    width: 75% !important;
    max-width: 75%;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.img-100 {
    width: 100% !important;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Image Figure mit Caption */
.image-figure {
    margin: 1rem 0;
    display: block;
}

.image-caption {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #9ca3af; /* text-gray-400 */
    text-align: left;
    font-style: italic;
    padding: 0 0.5rem;
}


.logbook-entry {
    background-color: #0c1424;
    background-image: linear-gradient(145deg, rgba(7, 11, 22, 0.95) 0%, rgba(17, 29, 50, 0.98) 70%, rgba(8, 16, 28, 0.95) 100%);
    border: 1px solid #1f2937; /* border-gray-800 */
    border-radius: 0.25rem; /* rounded-sm */
    padding: 2rem; /* p-8 */
}

.logbook-entry-header {
    margin-bottom: 2rem; /* mb-8 */
    padding-bottom: 1rem; /* pb-4 */
    border-bottom: 1px solid #374151; /* border-gray-700 */
}

.logbook-entry-date {
    font-size: 0.875rem; /* text-sm */
    color: #9ca3af; /* text-gray-400 */
    margin-bottom: 0.5rem; /* mb-2 */
}

.logbook-entry-title {
    font-size: 1.875rem; /* text-2xl */
    font-weight: bold;
    color: #4ade80; /* text-accent */
    margin: 0;
}

/* --- Header & Navigation (Neu) --- */
.top-bar {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: #111;
    border-bottom: 1px solid #374151; /* border-gray-700 */
    z-index: 50;
    padding: 0.75rem 1.5rem; /* py-3 px-6 */
    font-size: 0.875rem; /* text-sm */
    letter-spacing: 0.05em; /* tracking-wider */
    text-transform: uppercase;
}

/* Safari-spezifische Korrektur für Navigation */
@supports (-webkit-hyphens:none) {
    .top-bar {
        font-size: 0.8rem; /* Kleiner in Safari */
    }
}

.nav-separator {
    color: #4b5563; /* text-gray-600 */
    margin: 0 0.75rem; /* mx-3 */
}

.nav-link {
    cursor: pointer;
    color: #d1d5db; /* text-gray-300 */
    transition: color 0.2s ease;
}
.nav-link:hover, .nav-link.active {
    color: #4ade80; /* text-accent */
}
.nav-link.dropdown-toggle::after {
    content: ' ↓';
    font-size: 0.75rem;
}

/* Dropdown-Menü (Neu) */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1f2937; /* bg-gray-800 */
    border: 1px solid #374151; /* border-gray-700 */
    min-width: 200px;
    z-index: 60;
    padding: 0.5rem 0; /* py-2 */
}
.dropdown-menu.show {
    display: block;
}
.dropdown-item {
    display: block;
    padding: 0.5rem 1.5rem; /* py-2 px-6 */
    cursor: pointer;
    background-color: transparent;
    width: 100%;
    text-align: left;
}
.dropdown-item:hover {
    background-color: #374151; /* bg-gray-700 */
    color: #4ade80; /* text-accent */
}
.dropdown-item.active {
    background-color: #374151; /* bg-gray-700 */
    color: #4ade80; /* text-accent */
}

/* --- "Fullscreen" Seiten-Container --- */
.page-content {
    display: none; /* Standardmäßig ausgeblendet */
    padding: 1.5rem; /* p-6 */
    min-height: calc(100vh - 80px);
    min-height: -webkit-calc(100vh - 80px); /* Safari-spezifisch */
}
.page-content.active {
    display: block; /* Wird per JS eingeblendet */
}
#page-logbook.active {
    padding: 0; /* Kein Padding für Logbook, da Layout es selbst verwaltet */
    margin: 0;
}

/* Utility für Dialog-Blöcke */
.dialog-item {
    background-color: #0c2a1e; /* Dunkles Grün */
    border: 1px solid #4ade80; /* border-accent */
}

/* --- Mini Audio Player (Neu) --- */
.mini-player-container {
    display: flex;
    align-items: center;
    max-width: 450px; /* Kompakter für Desktop */
    width: 100%;
    margin-left: 1.5rem; /* ml-6 */
    position: relative; /* Für absolute Positionierung des Dropdowns */
}

/* Responsive: Bei kleineren Screens schmaler */
@media (max-width: 1024px) {
    .mini-player-container {
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .mini-player-container {
        max-width: 300px;
    }
}
.play-pause-btn {
    background: none;
    border: 1px solid #4ade80; /* border-accent */
    color: #4ade80; /* text-accent */
    width: 20px; /* Kleiner gemacht (war 28px) */
    height: 20px; /* Kleiner gemacht (war 28px) */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0; /* Verhindert, dass der Button schrumpft */
    margin-right: 0.5rem; /* mr-2, war 0.75rem */
    transition: background-color 0.2s, color 0.2s;
}
.play-pause-btn:hover {
    background-color: #4ade80;
    color: #111;
}
.play-pause-btn .icon-play,
.play-pause-btn .icon-pause {
    display: none; /* Standardmäßig ausblenden */
    padding-left: 1px; /* Kleines visuelles Tuning für Play (war 2px) */
}
.play-pause-btn.playing .icon-pause {
    display: block;
    padding-left: 0;
}
.play-pause-btn:not(.playing) .icon-play {
    display: block;
}

/* Albumcover im Mini-Player */
.album-cover-mini {
    width: 20px;
    height: 20px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
    margin-right: 0.5rem; /* mr-2 - Abstand zum Marquee */
    border: 1px solid #374151; /* border-gray-700 */
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.album-cover-mini:hover {
    opacity: 0.8;
}

/* Marquee (Scrolling Text) */
.marquee-container {
    flex: 1; /* Nimmt verfügbaren Platz ein */
    min-width: 0; /* Wichtig für flex-shrink */
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    pointer-events: none; /* Container blockiert keine Klicks */
}
.marquee-container * {
    pointer-events: auto; /* Aber die Links sind klickbar */
}
.marquee-content {
    display: inline-block;
    animation: marquee 15s linear infinite;
    animation-play-state: paused; /* Starts paused, JS controls play state */
    color: #9ca3af; /* text-gray-400 */
    will-change: transform; /* Optimierung für flüssige Animation */
}
.marquee-content span {
    color: #9ca3af; /* text-gray-400 */
}
.marquee-content a {
    color: #d1d5db; /* text-gray-300 */
    text-decoration: none;
    pointer-events: auto; /* Sicherstellen, dass Links klickbar sind */
    cursor: pointer;
}
.marquee-content a:hover {
    color: #4ade80; /* text-accent */
}

@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Zeit-Anzeige */
.time-display {
    color: #9ca3af; /* text-gray-400 - grau */
    font-size: 0.75rem; /* text-xs */
    margin-left: 0.5rem; /* ml-2 - Abstand zum Marquee */
    white-space: nowrap;
    flex-shrink: 0; /* Verhindert, dass die Zeit-Anzeige schrumpft */
    font-family: 'IBM Plex Mono', monospace; /* Monospace für gleichmäßige Breite */
}

/* --- Playlist Dropdown (Neu) --- */
.playlist-toggle-btn {
    background: none;
    border: 1px solid #4ade80;
    color: #4ade80;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 0.5rem; /* mr-2 - jetzt vor dem Play-Button */
    transition: background-color 0.2s, color 0.2s;
}
.playlist-toggle-btn:hover, .playlist-toggle-btn.active {
    background-color: #4ade80;
    color: #111;
}
.playlist-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 15px); /* Mehr Abstand zur Leiste für floating-Effekt */
    left: -10px; /* Etwas nach links verschieben für dynamischeren Look */
    background-color: #1f2937; /* bg-gray-800 */
    border: 1px solid #374151; /* border-gray-700 */
    min-width: 320px; /* Breite für die Playlist */
    z-index: 60;
    padding: 0.5rem 0; /* py-2 */
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem; /* Leicht abgerundete Ecken */
}
.playlist-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(74, 222, 128, 0.1); /* Dynamischer Schatten mit grünem Glow */
}
.playlist-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem; /* py-2 px-4 */
    cursor: pointer;
    background-color: transparent;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid #374151; /* border-gray-700 */
}
.playlist-item:last-child {
    border-bottom: none;
}
.playlist-item:hover {
    background-color: #374151; /* bg-gray-700 */
}
.playlist-item.active {
    background-color: #0c2a1e; /* Dunkles Grün */
    color: #4ade80; /* text-accent */
}
.playlist-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    margin-right: 0.5rem; /* mr-2 */
    color: #9ca3af; /* text-gray-400 */
}
.album-cover-icon {
    width: 24px;
    height: 24px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
    margin-right: 0.5rem; /* mr-2 */
    border: 1px solid #374151; /* border-gray-700 */
}
.playlist-item.active .playlist-icon {
    color: #4ade80; /* text-accent */
}
.song-details {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.song-title {
    font-weight: 500;
}
.album-info {
    font-size: 0.75rem; /* text-xs */
    color: #9ca3af; /* text-gray-400 */
}
.playlist-item.active .album-info {
    color: #86efac; /* text-green-200 */
}
.duration {
    margin-left: auto;
    font-size: 0.75rem; /* text-xs */
    color: #9ca3af; /* text-gray-400 */
    padding-left: 0.5rem; /* pl-2 */
}

/* --- Link Pills (Neu) --- */
.link-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem; /* py-1 px-3 */
    margin: 0 0.25rem; /* mx-1 */
    background-color: #1f2937; /* bg-gray-800 */
    border: 1px solid #4ade80; /* border-accent */
    border-radius: 9999px; /* rounded-full */
    color: #4ade80; /* text-accent */
    text-decoration: none;
    font-size: 0.875rem; /* text-sm */
    transition: all 0.2s ease;
    word-break: break-all;
}
.link-pill:hover {
    background-color: #4ade80; /* bg-accent */
    color: #111; /* text-dark */
    transform: translateY(-1px);
}

.link-pill.link-inline {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.4rem;
    margin: 0 0.15rem;
    font-size: 0.65rem;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.world-info-dropdown {
    font-size: 0.78rem;
    line-height: 1.4;
    padding: 0.5rem 0.75rem;
}

.world-info-details,
.world-info-description {
    font-size: 0.75rem;
    line-height: 1.45;
}

.world-info-details p {
    margin-bottom: 0.35rem;
}

.world-info-description {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
}

.world-info-link,
.world-info-link-vr {
    font-size: 0.7rem;
    padding: 0.35rem 0.75rem;
}

/* --- Welt-Info Dropdown (Neu) --- */
.world-info-container {
    margin: 1.5rem 0; /* my-6 */
}
.world-info-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem; /* py-3 px-4 */
    background-color: #1f2937; /* bg-gray-800 */
    border: 1px solid #374151; /* border-gray-700 */
    border-radius: 0.25rem; /* rounded-sm */
    cursor: pointer;
    transition: all 0.2s ease;
    color: #d1d5db; /* text-gray-300 */
}
.world-info-toggle:hover {
    background-color: #374151; /* bg-gray-700 */
    border-color: #4ade80; /* border-accent */
}
.world-info-toggle.active {
    border-color: #4ade80; /* border-accent */
    background-color: #0c2a1e; /* Dunkles Grün */
}
.world-info-toggle-title {
    font-weight: 500;
    color: #4ade80; /* text-accent */
}
.world-info-toggle-icon {
    transition: transform 0.2s ease;
    color: #9ca3af; /* text-gray-400 */
}
.world-info-toggle.active .world-info-toggle-icon {
    transform: rotate(180deg);
    color: #4ade80; /* text-accent */
}
.world-info-dropdown {
    display: none;
    margin-top: 0.5rem; /* mt-2 */
    padding: 1rem; /* p-4 */
    background-color: #1f2937; /* bg-gray-800 */
    border: 1px solid #374151; /* border-gray-700 */
    border-radius: 0.25rem; /* rounded-sm */
    border-top: 1px solid #4ade80; /* border-accent */
}
.world-info-dropdown.show {
    display: block;
}
.world-info-preview {
    margin-bottom: 1rem; /* mb-4 */
}
.world-info-preview img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem; /* rounded-sm */
    border: 1px solid #374151; /* border-gray-700 */
}
.world-info-details {
    font-size: 0.875rem; /* text-sm */
    color: #9ca3af; /* text-gray-400 */
    line-height: 1.6;
}
.world-info-details strong {
    color: #d1d5db; /* text-gray-300 */
    font-weight: 500;
}
.world-info-description {
    margin-top: 1rem; /* mt-4 */
    padding-top: 1rem; /* pt-4 */
    border-top: 1px solid #374151; /* border-gray-700 */
    color: #d1d5db; /* text-gray-300 */
    line-height: 1.6;
}
.world-info-links {
    margin-bottom: 1rem; /* mb-4 */
    display: flex;
    flex-direction: row;
    gap: 0.75rem; /* gap-3 */
    flex-wrap: wrap;
}
.world-info-link {
    display: inline-block;
    padding: 0.5rem 1rem; /* py-2 px-4 */
    background-color: #4ade80; /* bg-accent */
    color: #111; /* text-dark */
    text-decoration: none;
    border-radius: 0.25rem; /* rounded-sm */
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
}
.world-info-link:hover {
    background-color: #22c55e; /* hover-green-500 */
    transform: translateY(-1px);
}
.world-info-link-vr {
    background-color: #1f2937; /* bg-gray-800 */
    border: 1px solid #4ade80; /* border-accent */
    color: #4ade80; /* text-accent */
}
.world-info-link-vr:hover {
    background-color: #4ade80; /* bg-accent */
    color: #111; /* text-dark */
}

/* --- Reflection Widget (Autoethnographic Documentation) --- */
.reflection-widget {
    margin: 2rem 0;
    padding: 0;
    background: linear-gradient(135deg, #0a0f1a 0%, #111827 50%, #0a1628 100%);
    border: 1px solid #374151;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(74, 222, 128, 0.1);
}

.reflection-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.15) 0%, rgba(74, 222, 128, 0.05) 100%);
    border-bottom: 1px solid rgba(74, 222, 128, 0.3);
}

.reflection-icon {
    font-size: 1.25rem;
    color: #4ade80;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.reflection-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.875rem;
    color: #4ade80;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.reflection-subtitle {
    font-size: 0.75rem;
    color: #6b7280;
    margin-left: auto;
}

.reflection-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid #1f2937;
}

.reflection-keyword {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 0.25rem;
    font-size: 0.7rem;
    color: #4ade80;
    font-family: 'IBM Plex Mono', monospace;
}

.reflection-keyword-inline {
    color: #4ade80;
    font-weight: 500;
}

.reflection-content {
    padding: 1.25rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .reflection-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.reflection-section {
    padding: 1rem;
    background-color: rgba(31, 41, 55, 0.5);
    border: 1px solid #374151;
    border-radius: 0.375rem;
}

.reflection-section-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.65rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #374151;
}

.reflection-field {
    margin-bottom: 0.75rem;
}

.reflection-field:last-child {
    margin-bottom: 0;
}

.reflection-question {
    font-size: 0.7rem;
    color: #4ade80;
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.reflection-answer {
    font-size: 0.85rem;
    color: #d1d5db;
    line-height: 1.5;
}

.reflection-answer strong {
    color: #f3f4f6;
}

.reflection-answer em {
    color: #9ca3af;
    font-style: italic;
}

.reflection-link {
    color: #4ade80;
    text-decoration: none;
    border-bottom: 1px dotted #4ade80;
    transition: all 0.2s ease;
}

.reflection-link:hover {
    color: #22c55e;
    border-bottom-style: solid;
}

.reflection-footer {
    padding: 0.75rem 1.25rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-top: 1px solid #1f2937;
    text-align: right;
}

.reflection-reference {
    font-size: 0.65rem;
    color: #6b7280;
    font-style: italic;
}

/* Reflection Info Toggle Button */
.reflection-info-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    margin-left: 0.5rem;
    background-color: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reflection-info-toggle:hover {
    background-color: rgba(74, 222, 128, 0.2);
    border-color: #4ade80;
}

.reflection-info-toggle.active {
    background-color: #4ade80;
    border-color: #4ade80;
}

.reflection-info-icon {
    font-size: 0.75rem;
    font-weight: 700;
    color: #4ade80;
    line-height: 1;
}

.reflection-info-toggle.active .reflection-info-icon {
    color: #111;
}

/* Reflection Info Box */
.reflection-info-box {
    display: none;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.05) 0%, rgba(31, 41, 55, 0.8) 100%);
    border-bottom: 1px solid rgba(74, 222, 128, 0.2);
    overflow: hidden;
}

.reflection-info-box.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 600px;
    }
}

.reflection-info-content {
    padding: 1.25rem;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #d1d5db;
}

.reflection-info-content h4 {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    color: #4ade80;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 0.75rem 0;
}

.reflection-info-content h4:not(:first-child) {
    margin-top: 1.25rem;
}

.reflection-info-content p {
    margin: 0 0 0.75rem 0;
}

.reflection-info-content strong {
    color: #f3f4f6;
}

.reflection-info-content ol {
    margin: 0 0 1rem 0;
    padding-left: 1.25rem;
}

.reflection-info-content li {
    margin-bottom: 0.5rem;
}

.reflection-info-content code {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
}

.reflection-subquestions {
    list-style-type: decimal;
    margin: 0.75rem 0 1rem 0;
}

.reflection-subquestions li {
    margin-bottom: 0.4rem;
}

.reflection-info-sources {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #374151;
    font-size: 0.75rem;
    color: #9ca3af;
    line-height: 1.5;
}

.reflection-info-sources em {
    font-style: italic;
}

/* --- Image Lightbox / Gallery Modal --- */
.image-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-lightbox-overlay.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.image-lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
}

.image-lightbox-image {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-lightbox-caption {
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background-color: rgba(31, 41, 55, 0.9);
    border: 1px solid #374151;
    border-radius: 0.5rem;
    color: #d1d5db;
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
    max-width: 80vw;
    font-style: italic;
    color: #9ca3af;
}

.image-lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: 1px solid #4ade80;
    color: #4ade80;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    z-index: 1001;
}

.image-lightbox-close:hover {
    background-color: #4ade80;
    color: #111;
}

.image-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid #4ade80;
    color: #4ade80;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.2s ease;
    z-index: 1001;
}

.image-lightbox-nav:hover {
    background-color: #4ade80;
    color: #111;
}

.image-lightbox-nav.prev {
    left: -2rem;
}

.image-lightbox-nav.next {
    right: -2rem;
}

.image-lightbox-counter {
    position: absolute;
    top: -2.5rem;
    left: 0;
    color: #9ca3af;
    font-size: 0.875rem;
    font-family: 'IBM Plex Mono', monospace;
}

.bubble-content img,
.image-figure img {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.bubble-content img:hover,
.image-figure img:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .image-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .image-lightbox-nav.prev {
        left: 0.5rem;
    }
    
    .image-lightbox-nav.next {
        right: 0.5rem;
    }
    
    .image-lightbox-close {
        top: 1rem;
        right: 1rem;
    }
    
    .image-lightbox-counter {
        top: 1rem;
        left: 1rem;
    }
    
    .image-lightbox-caption {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
}

/* --- Viewer Components --- */
.viewer-container {
    position: relative;
    overflow: visible;
}

.viewer-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(17, 17, 17, 0.9);
    z-index: 10;
    color: #4ade80;
}

.viewer-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #374151;
    border-top-color: #4ade80;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.viewer-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
    text-align: center;
}

.viewer-fallback-image {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.viewer-fallback-text {
    color: #9ca3af;
    font-size: 0.875rem;
    font-family: 'IBM Plex Mono', monospace;
}

/* --- 3D Viewer Control Panel --- */
.viewer-control-panel {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid #374151;
    border-radius: 0.5rem;
    z-index: 20;
    font-family: 'IBM Plex Mono', monospace;
}

.viewer-controls-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.viewer-controls-slider-row {
    padding: 0.25rem 0.5rem;
}

.viewer-control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.375rem;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.viewer-control-btn:hover {
    background: #374151;
    color: #4ade80;
    border-color: #4ade80;
}

.viewer-control-btn.active {
    background: #4ade80;
    color: #111111;
    border-color: #4ade80;
}

.viewer-control-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.3);
}

.viewer-control-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

.viewer-control-label .control-icon {
    font-size: 1rem;
}

.viewer-control-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 4px;
    background: #374151;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.viewer-control-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #4ade80;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.viewer-control-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.viewer-control-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #4ade80;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.viewer-control-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.control-icon {
    display: inline-block;
    line-height: 1;
}

/* --- AI Attribution Component --- */
.ai-attribution {
    max-width: 800px;
    margin: 2rem auto;
    font-family: 'IBM Plex Mono', monospace;
}

/* Simple, low-key one-liner style */
.ai-attribution-simple {
    text-align: center;
    padding: 0.5rem 0;
}

.ai-attribution-simple .ai-attribution-text {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 400;
}

/* Legacy badge styles (kept for backwards compatibility) */
.ai-attribution-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid #4ade80;
    border-radius: 9999px;
    color: #4ade80;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-attribution-badge:hover {
    background: rgba(74, 222, 128, 0.1);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.2);
}

.ai-attribution-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.ai-attribution-text {
    font-weight: 500;
}

.ai-attribution-toggle {
    background: none;
    border: none;
    color: #4ade80;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.ai-attribution-toggle:hover {
    transform: scale(1.1);
}

.ai-attribution-toggle[aria-expanded="true"] .ai-attribution-toggle-icon {
    transform: rotate(180deg);
}

.ai-attribution-toggle-icon {
    transition: transform 0.2s ease;
}

.ai-attribution-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
    margin-top: 0;
}

.ai-attribution-details.expanded {
    max-height: 1000px;
    opacity: 1;
    margin-top: 1rem;
}

.ai-attribution-section {
    background: rgba(31, 41, 55, 0.3);
    border: 1px solid #374151;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.ai-attribution-section:last-child {
    margin-bottom: 0;
}

.ai-attribution-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #4ade80;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ai-attribution-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-attribution-list-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #374151;
    color: #d1d5db;
}

.ai-attribution-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ai-attribution-list-item strong {
    color: #f3f4f6;
    font-weight: 500;
}

.ai-attribution-provider {
    color: #9ca3af;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.ai-attribution-usage {
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 0.85rem;
    color: #9ca3af;
    line-height: 1.5;
}

.ai-attribution-workflow {
    margin: 0;
    line-height: 1.6;
    color: #d1d5db;
}

.ai-attribution-note {
    background: rgba(74, 222, 128, 0.05);
    border-left: 3px solid #4ade80;
    padding: 1rem;
    border-radius: 0.25rem;
    margin-top: 1rem;
}

.ai-attribution-note p {
    margin: 0;
    font-size: 0.85rem;
    color: #9ca3af;
    font-style: italic;
    line-height: 1.6;
}

/* --- Floating Animation Elements --- */
.floating-element,
.parallax-element {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.floating-element:hover,
.parallax-element:hover {
    box-shadow: 0 8px 24px rgba(74, 222, 128, 0.15);
}

/* CSS fallback animations */
@keyframes float-subtle {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate-subtle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-2deg);
    }
    75% {
        transform: rotate(2deg);
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .floating-element,
    .parallax-element,
    .viewer-spinner,
    .ai-attribution-toggle-icon {
        animation: none !important;
        transition: none !important;
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .viewer-container {
        height: 220px !important;
    }
    
    .viewer-control-panel {
        bottom: 0.5rem;
        padding: 0.375rem;
        gap: 0.375rem;
    }
    
    .viewer-control-btn {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .viewer-control-slider {
        width: 80px;
    }
    
    .ai-attribution {
        margin: 1rem;
    }
    
    .ai-attribution-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .ai-attribution-section {
        padding: 1rem;
    }
    
    .ai-attribution-section-title {
        font-size: 0.9rem;
    }
}

/* --- Touch-friendly targets for mobile --- */
@media (hover: none) and (pointer: coarse) {
    .ai-attribution-badge,
    .ai-attribution-toggle,
    .viewer-fallback {
        min-height: 44px;
        min-width: 44px;
    }
    
    .viewer-control-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* --- About Page Styles --- */
.about-layout {
    padding: 2rem 1rem;
}

.about-header {
    margin-bottom: 3rem;
}

.about-profile-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 640px) {
    .about-profile-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.about-image-container {
    position: relative;
}

.about-profile-image {
    width: 180px;
    height: 180px;
    border-radius: 0.5rem;
    border: 2px solid #4ade80;
    object-fit: cover;
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.2);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.about-profile-image:hover {
    box-shadow: 0 0 40px rgba(74, 222, 128, 0.4);
    transform: scale(1.02);
}

@media (max-width: 640px) {
    .about-profile-image {
        width: 150px;
        height: 150px;
        margin: 0 auto;
    }
}

.about-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.about-name {
    font-family: 'Press Start 2P', 'IBM Plex Mono', monospace;
    font-size: 1.75rem;
    font-weight: normal;
    background-image: linear-gradient(115deg, #16a34a 0%, #4ade80 50%, #f3f4f6 100%);
    background-size: 220% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: titleGlow 7s linear infinite;
    margin: 0 0 0.5rem 0;
}

@media (max-width: 640px) {
    .about-name {
        font-size: 1.25rem;
    }
}

.about-role {
    font-size: 1.125rem;
    color: #d1d5db;
    margin: 0;
    font-weight: 500;
}

.about-institution {
    font-size: 1rem;
    color: #9ca3af;
    margin: 0;
}

.about-email {
    display: inline-flex;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background-color: rgba(31, 41, 55, 0.5);
    border: 1px solid #374151;
    border-radius: 9999px;
    color: #4ade80;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    width: fit-content;
}

.about-email:hover {
    background-color: #4ade80;
    color: #111;
    border-color: #4ade80;
}

@media (max-width: 640px) {
    .about-email {
        margin: 0.75rem auto 0;
    }
}

.about-section {
    margin-bottom: 3rem;
}

.about-section-title {
    font-family: 'Press Start 2P', 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
    color: #4ade80;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #374151;
}

.about-interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.about-interest-card {
    background-color: #050a13;
    background-image: linear-gradient(150deg, rgba(4, 6, 10, 0.98) 0%, rgba(12, 17, 27, 0.98) 55%, rgba(5, 8, 14, 0.98) 100%);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.about-interest-card:hover {
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.15), 0 0 40px rgba(74, 222, 128, 0.08);
    transform: translateY(-4px);
}

.about-interest-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(74, 222, 128, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4ade80;
    margin-bottom: 1rem;
}

.about-interest-title {
    font-family: 'Press Start 2P', 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: #f3f4f6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.about-interest-desc {
    font-size: 0.875rem;
    color: #9ca3af;
    line-height: 1.6;
    margin: 0;
}

/* --- Contact Form Styles --- */
.contact-form {
    background-color: #050a13;
    background-image: linear-gradient(150deg, rgba(4, 6, 10, 0.98) 0%, rgba(12, 17, 27, 0.98) 55%, rgba(5, 8, 14, 0.98) 100%);
    border-radius: 0.5rem;
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-of-type {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    color: #d1d5db;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #111;
    border: 1px solid #374151;
    border-radius: 0.25rem;
    color: #f3f4f6;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #4ade80;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.2);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #6b7280;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    background-color: #4ade80;
    color: #111;
    border: none;
    border-radius: 0.25rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-submit-btn:hover {
    background-color: #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.form-submit-btn:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .contact-form {
        padding: 1.5rem;
    }

    .form-submit-btn {
        width: 100%;
    }
}

/* =============================================================================
   CHAT-STYLE MESSAGE BUBBLES
   Used for conversational journal entries (e.g., voice dialogues with Claude)
   ============================================================================= */

/* Chat container - multi-column layout */
.chat-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.chat-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-column.user-side {
    align-items: flex-end;
}

.chat-column.claude-side {
    align-items: flex-start;
}

/* Individual message */
.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    max-width: 100%;
}

/* Round avatar icons */
.chat-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.chat-avatar svg {
    width: 18px;
    height: 18px;
}

/* User avatar - transparent, icon has own background */
.chat-message.user .chat-avatar {
    background: transparent;
}

/* Claude avatar - transparent, icon has own background */
.chat-message.claude .chat-avatar {
    background: transparent;
}

/* User messages - aligned RIGHT, dark bubble */
.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message.user .chat-bubble {
    background: #1a1a2e;
    border: 1px solid #2d2d44;
    color: #d1d5db;
    border-radius: 1rem 0.25rem 1rem 1rem;
}

/* Claude messages - aligned LEFT, orange bubble */
.chat-message.claude .chat-bubble {
    background: linear-gradient(135deg, #C15F3C 0%, #a84e30 100%);
    border: none;
    color: #fff;
    border-radius: 0.25rem 1rem 1rem 1rem;
}

/* The chat bubble itself - smaller text */
.chat-bubble {
    padding: 0.75rem 1rem;
    line-height: 1.5;
    font-size: 0.8rem;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.chat-bubble:hover {
    transform: translateY(-1px);
}

.chat-message.claude .chat-bubble:hover {
    box-shadow: 0 4px 12px rgba(193, 95, 60, 0.3);
}

.chat-message.user .chat-bubble:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Content within bubbles */
.chat-bubble p {
    margin: 0 0 0.5rem 0;
}

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

/* Intro bubble - separate style for narrative intro */
.chat-intro {
    background: rgba(30, 30, 50, 0.6);
    border-left: 3px solid #C15F3C;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #e5e7eb;
}

/* Mobile: single column */
@media (max-width: 768px) {
    .chat-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .chat-column.user-side,
    .chat-column.claude-side {
        align-items: stretch;
    }

    .chat-bubble {
        font-size: 0.85rem;
    }
}

/* =============================================================================
   AUDIO VIEWER COMPONENT
   Embedded audio player for journal entries with multi-track support
   ============================================================================= */

.audio-viewer {
    margin: 1.5rem 0;
}

.audio-viewer-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background-color: #0a0f18;
    background-image: linear-gradient(150deg, rgba(4, 6, 10, 0.98) 0%, rgba(12, 17, 27, 0.98) 100%);
    border: 1px solid #1f2937;
    border-radius: 0.5rem;
    transition: box-shadow 0.3s ease;
}

.audio-viewer-wrapper:hover {
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.1);
}

/* Prompt Display */
.audio-viewer-prompt {
    font-size: 0.75rem;
    color: #9ca3af;
    padding: 0.5rem 0.75rem;
    background: rgba(31, 41, 55, 0.5);
    border-radius: 0.375rem;
    border-left: 2px solid #4ade80;
}

.audio-viewer-prompt-label {
    color: #4ade80;
    font-weight: 600;
}

/* Player Container */
.audio-viewer-player {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

/* Cover Art */
.audio-viewer-cover {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}

.audio-viewer-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 1px solid #374151;
}

/* Controls Container */
.audio-viewer-controls {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Track Info */
.audio-viewer-track-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.audio-viewer-title {
    font-family: 'Press Start 2P', 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    color: #f3f4f6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-viewer-artist {
    font-size: 0.7rem;
    color: #9ca3af;
}

/* Controls Row */
.audio-viewer-controls-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Buttons */
.audio-viewer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 50%;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.audio-viewer-btn:hover {
    background: #374151;
    color: #4ade80;
    border-color: #4ade80;
}

.audio-viewer-btn.playing,
.audio-viewer-btn.active {
    background: #4ade80;
    color: #111;
    border-color: #4ade80;
}

.audio-viewer-play-btn {
    width: 36px;
    height: 36px;
}

.audio-viewer-nav-btn {
    width: 28px;
    height: 28px;
}

.audio-viewer-loop-btn {
    width: 26px;
    height: 26px;
}

/* Progress Bar */
.audio-viewer-progress-container {
    flex: 1;
    min-width: 0;
    height: 32px;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0 4px;
}

.audio-viewer-progress-bar {
    width: 100%;
    height: 4px;
    background: #374151;
    border-radius: 2px;
    overflow: hidden;
}

.audio-viewer-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    border-radius: 2px;
    transition: width 0.1s ease;
}

.audio-viewer-progress-container:hover .audio-viewer-progress-bar {
    height: 6px;
}

.audio-viewer-progress-container:hover .audio-viewer-progress-fill {
    background: linear-gradient(90deg, #86efac, #4ade80);
}

/* Time Display */
.audio-viewer-time {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    color: #9ca3af;
    white-space: nowrap;
    min-width: 65px;
    text-align: right;
}

/* Track Indicator */
.audio-viewer-track-indicator {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    color: #6b7280;
    padding: 0.125rem 0.375rem;
    background: #1f2937;
    border-radius: 0.25rem;
}

/* Description Section */
.audio-viewer-description-section {
    border-top: 1px solid #1f2937;
    padding-top: 0.5rem;
}

.audio-viewer-desc-toggle {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.7rem;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

.audio-viewer-desc-toggle:hover {
    color: #4ade80;
}

.audio-viewer-desc-content {
    font-size: 0.75rem;
    color: #9ca3af;
    line-height: 1.5;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.audio-viewer-desc-content.expanded {
    max-height: 200px;
    opacity: 1;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(31, 41, 55, 0.3);
    border-radius: 0.25rem;
}

/* Fallback */
.audio-viewer-fallback {
    padding: 1rem;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    text-align: center;
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .audio-viewer-player {
        flex-direction: column;
        align-items: stretch;
    }

    .audio-viewer-cover {
        width: 100%;
        height: auto;
        max-width: 100px;
        margin: 0 auto;
    }

    .audio-viewer-cover-img {
        aspect-ratio: 1;
    }

    .audio-viewer-controls-row {
        flex-wrap: wrap;
        gap: 0.375rem;
    }

    .audio-viewer-progress-container {
        order: 10;
        flex-basis: 100%;
    }

    .audio-viewer-time {
        min-width: auto;
        font-size: 0.6rem;
    }

    .audio-viewer-title {
        font-size: 0.55rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .audio-viewer-progress-fill {
        transition: none;
    }

    .audio-viewer-desc-content {
        transition: none;
    }
}

/* =====================================================
   REFLECTION WIDGET - Interview-based Documentation
   ===================================================== */

.reflection-widget {
    background: linear-gradient(145deg, rgba(7, 11, 22, 0.95) 0%, rgba(16, 27, 46, 0.98) 70%);
    border: 1px solid #374151;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

.reflection-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #374151;
}

.reflection-icon {
    color: #4ade80;
    font-size: 1.25rem;
}

.reflection-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.75rem;
    color: #4ade80;
}

.reflection-subtitle {
    font-size: 0.7rem;
    color: #6b7280;
}

.reflection-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.reflection-keyword {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
}

.reflection-summary {
    margin-bottom: 1.25rem;
    line-height: 1.6;
    color: #d1d5db;
}

.reflection-section {
    margin-bottom: 1rem;
}

.reflection-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.reflection-field {
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
    border-left: 2px solid #374151;
}

.reflection-question {
    font-size: 0.7rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.reflection-answer {
    font-size: 0.85rem;
    color: #d1d5db;
    line-height: 1.5;
}

.reflection-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #374151;
}

.reflection-reference {
    font-size: 0.65rem;
    color: #6b7280;
}

/* Transcript Dropdown */
.reflection-transcript {
    margin-top: 1rem;
    border: 1px solid #374151;
    border-radius: 0.375rem;
    overflow: hidden;
}

.transcript-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(55, 65, 81, 0.3);
    cursor: pointer;
    font-size: 0.8rem;
    color: #9ca3af;
    transition: background 0.2s;
}

.transcript-toggle:hover {
    background: rgba(55, 65, 81, 0.5);
}

.transcript-icon {
    font-size: 1rem;
}

.transcript-content {
    padding: 1rem;
    background: rgba(17, 24, 39, 0.5);
    max-height: 400px;
    overflow-y: auto;
}

.transcript-message {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: flex-start;
}

.transcript-message.user {
    flex-direction: row-reverse;
}

.transcript-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.transcript-bubble {
    max-width: 80%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    line-height: 1.4;
}

.transcript-message.claude .transcript-bubble {
    background: rgba(193, 95, 60, 0.2);
    color: #f8b4a0;
    border: 1px solid rgba(193, 95, 60, 0.3);
}

.transcript-message.user .transcript-bubble {
    background: rgba(74, 222, 128, 0.1);
    color: #d1d5db;
    border: 1px solid rgba(74, 222, 128, 0.2);
}