/* Popup Components - Lake Wequaquet */

/* Info Popup - Overview mode */
.info-popup { position: fixed; background: rgba(8,12,18,0.97); border: 1px solid rgba(100,150,255,0.2); border-radius: 10px; padding: 0; max-width: 420px; max-height: 75vh; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 0.3s; z-index: 100; box-shadow: 0 8px 32px rgba(0,0,0,0.7); display: flex; flex-direction: column; }
.info-popup.visible { opacity: 1; pointer-events: auto; }
.popup-header { padding: 16px 20px 12px; border-bottom: 1px solid rgba(100,150,255,0.1); }
.popup-header h3 { font-weight: 400; font-size: 1.1rem; color: #aaccff; margin-bottom: 2px; }
.popup-header .subtitle { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; color: #6080a0; }
.popup-header .desc { font-size: 0.8rem; line-height: 1.4; color: #9aa8c0; margin-top: 8px; }
.popup-header .stars-info { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; color: #506070; margin-top: 6px; }
.popup-cultures { flex: 1; overflow-y: auto; padding: 8px 12px 12px; }
.culture-btn { display: block; width: 100%; text-align: left; background: rgba(60,80,120,0.1); border: 1px solid rgba(100,150,255,0.15); border-radius: 6px; padding: 10px 14px; margin-bottom: 6px; cursor: pointer; transition: all 0.2s; }
.culture-btn:hover { background: rgba(80,100,140,0.2); border-color: rgba(100,150,255,0.3); }
.culture-btn .culture-name { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; color: #8090a0; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.culture-btn .culture-short { font-size: 0.75rem; line-height: 1.35; color: #8898b0; }
.popup-footer { padding: 8px 12px; border-top: 1px solid rgba(100,150,255,0.1); font-family: 'IBM Plex Mono', monospace; font-size: 0.55rem; color: #4a5a6a; text-align: center; }

/* Story Reader Mode */
.story-reader { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(4,6,10,0.97); z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.4s; display: flex; flex-direction: column; }
.story-reader.visible { opacity: 1; pointer-events: auto; }
body.story-open .notebook-btn, body.story-open .audio-controls-wrapper, body.story-open .time-control-panel, body.story-open .brightness-control, body.story-open .nav-keypad, body.story-open .creatures-toggle { display: none; }
.story-nav { padding: 12px 20px; padding-right: 60px; border-bottom: 1px solid rgba(100,150,255,0.1); position: relative; }
.story-back { position: absolute; top: 12px; right: 16px; font-family: 'IBM Plex Mono', monospace; font-size: 1rem; color: #6080a0; background: rgba(20,30,50,0.8); border: 1px solid rgba(100,150,255,0.3); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; z-index: 250; }
.story-back:hover { background: rgba(100,150,255,0.3); color: #a0c0e0; border-color: rgba(100,150,255,0.5); }
.story-constellation { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; color: #5a6a7a; text-transform: uppercase; letter-spacing: 1px; }
.story-content { flex: 1; overflow-y: auto; padding: 30px; max-width: 640px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.story-culture-name { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; color: #6080a0; text-transform: uppercase; letter-spacing: 1px; }
.story-header-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.story-star { background: rgba(100,150,255,0.1); border: 1px solid rgba(100,150,255,0.2); font-size: 1.2rem; cursor: pointer; opacity: 0.7; transition: all 0.2s; padding: 6px 12px; border-radius: 4px; flex-shrink: 0; }
.story-star:hover { opacity: 1; background: rgba(100,150,255,0.2); }
.story-star.favorited { opacity: 1; color: #e8c44c; background: rgba(232,196,76,0.15); border-color: rgba(232,196,76,0.3); }
.story-title { font-family: 'Crimson Text', serif; font-size: 1.6rem; color: #c0d0e8; font-weight: 400; margin-bottom: 20px; line-height: 1.3; }
.constellation-figure { display: flex; flex-direction: column; align-items: center; margin: 20px auto 30px; padding: 20px; background: rgba(10,15,25,0.6); border: 1px solid rgba(100,150,255,0.15); border-radius: 12px; max-width: 300px; }
.figure-svg { width: 200px; height: 200px; }
.figure-label { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; color: #6080a0; text-transform: uppercase; letter-spacing: 1px; margin-top: 12px; }
.story-text { font-family: 'Crimson Text', serif; font-size: 1.1rem; line-height: 1.75; color: #a0aaba; white-space: pre-wrap; }
.story-text p { margin-bottom: 1em; }
.story-themes { margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(100,150,255,0.1); }
.story-themes-label { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; color: #506070; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.story-themes-list { display: flex; flex-wrap: wrap; gap: 6px; }
.theme-tag { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; color: #7088a0; background: rgba(100,150,200,0.1); padding: 4px 10px; border-radius: 12px; }
.story-question { margin-top: 24px; padding: 16px; background: rgba(100,150,200,0.08); border-radius: 8px; border-left: 3px solid rgba(100,150,255,0.3); }
.story-question-label { font-family: 'IBM Plex Mono', monospace; font-size: 0.55rem; color: #506070; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.story-question-text { font-family: 'Crimson Text', serif; font-size: 1rem; font-style: italic; color: #8898b0; line-height: 1.5; }

/* Related Wisdom in Stories */
.story-related-wisdom { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(100,150,255,0.1); }
.related-wisdom-item { padding: 14px; background: rgba(60,50,40,0.15); border: 1px solid rgba(180,150,100,0.1); border-radius: 6px; margin-top: 10px; cursor: pointer; transition: all 0.2s; }
.related-wisdom-item:hover { background: rgba(80,70,50,0.2); border-color: rgba(200,170,120,0.2); }
.related-wisdom-text { font-family: 'Crimson Text', serif; font-size: 0.95rem; color: #c0b8a0; font-style: italic; line-height: 1.5; }
.related-wisdom-source { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; color: #807060; margin-top: 8px; }

/* Related Stories in Wisdom */
.wisdom-related-stories { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(100,80,60,0.2); }
.wisdom-related-stories-label { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; color: #605040; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.related-story-item { padding: 12px; background: rgba(40,50,60,0.2); border: 1px solid rgba(100,150,200,0.1); border-radius: 6px; margin-top: 8px; cursor: pointer; transition: all 0.2s; }
.related-story-item:hover { background: rgba(50,70,90,0.3); border-color: rgba(120,170,220,0.2); }
.related-story-const { font-family: 'Crimson Text', serif; font-size: 0.95rem; color: #a0b8d0; }
.related-story-culture { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; color: #607080; margin-top: 4px; }

/* Explore Deeper Links */
.story-explore { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(100,150,255,0.1); }
.explore-link { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: rgba(50,60,80,0.2); border: 1px solid rgba(100,130,180,0.15); border-radius: 6px; margin-top: 10px; cursor: pointer; transition: all 0.2s; }
.explore-link:hover { background: rgba(60,80,120,0.3); border-color: rgba(120,150,200,0.3); transform: translateX(4px); }
.explore-icon { font-size: 1rem; opacity: 0.7; }
.explore-title { flex: 1; font-family: 'Crimson Text', serif; font-size: 1rem; color: #b0c0d8; }
.explore-themes { font-family: 'IBM Plex Mono', monospace; font-size: 0.55rem; color: #607080; text-transform: uppercase; letter-spacing: 0.5px; }
.deeper-breadcrumb { font-size: 0.9rem !important; color: #607080 !important; margin-bottom: 24px !important; }
.story-sources { margin-top: 20px; padding: 12px; background: rgba(40,50,60,0.2); border-radius: 6px; }
.story-sources-text { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; color: #708090; line-height: 1.6; }
.story-scroll-control { position: fixed; bottom: 20px; left: 20px; z-index: 210; display: flex; gap: 8px; opacity: 0; transition: opacity 0.3s; }
.story-reader.visible .story-scroll-control { opacity: 1; }
.scroll-btn { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; color: #6080a0; background: rgba(20,30,50,0.9); border: 1px solid rgba(100,150,255,0.2); padding: 8px 14px; border-radius: 4px; cursor: pointer; transition: all 0.2s; }
.scroll-btn:hover { background: rgba(40,60,100,0.9); color: #8aa0c0; }
.scroll-btn.active { background: rgba(60,100,150,0.3); border-color: rgba(100,150,255,0.4); }
.scroll-status { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; color: #506070; padding: 8px 10px; }

/* Inline Explore Links in Story Text */
.story-text .inline-explore { color: #7090b0; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; cursor: pointer; transition: color 0.2s; pointer-events: auto; position: relative; z-index: 1; }
.story-text .inline-explore:hover { color: #a0c0e0; background: rgba(100,150,255,0.1); }

/* Allow text selection in reader screens */
.story-content, .wisdom-reader-content, .notebook-content, .popup-cultures { user-select: text; }
