/* === Exploration Module Shared Styles === */

/* === View Containers === */
.view {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 100;
    overflow-y: auto;
    padding: 1rem;
    animation: viewEnter 0.3s ease;
}

.view.active {
    display: block;
}

@keyframes viewEnter {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Breadcrumb === */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #38d9a9;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #63e6be;
}

.breadcrumb .sep {
    opacity: 0.4;
}

/* === Split Pane Layout === */
.split-pane {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1.5rem;
    min-height: calc(100vh - 120px);
    align-items: start;
}

.canvas-container {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 12px;
    overflow: hidden;
    position: sticky;
    top: 1rem;
    background: #1a1a2e;
    min-height: 300px;
}

.canvas-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}


/* === Info Panel === */
.info-panel {
    background: var(--modal-bg);
    border-radius: 12px;
    padding: 1.5rem;
    max-height: calc(100vh - 80px - 4rem);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.info-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.info-panel h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 1rem 0 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.info-panel p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.info-panel p strong {
    color: var(--text);
}

/* === Element Hero (Deep-Dive) === */
.element-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.element-symbol-large {
    font-size: 3rem;
    font-weight: 700;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    border: 3px solid;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.3rem;
}

/* === Fact Box === */
.fact-box {
    border-left: 3px solid #38d9a9;
    padding: 0.8rem 1rem;
    margin: 0.8rem 0;
    background: rgba(56, 217, 169, 0.05);
    border-radius: 0 8px 8px 0;
}

.fact-box h3 {
    margin-top: 0 !important;
    border-bottom: none !important;
}

/* === Callout Box === */
.callout {
    background: rgba(77, 171, 247, 0.08);
    border: 1px solid rgba(77, 171, 247, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.callout::before {
    content: 'Gut zu wissen';
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: #4dabf7;
    margin-bottom: 0.4rem;
}

/* === Station Cards (Hub Pages) === */
.station-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.station-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.2rem;
    background: var(--modal-bg);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}

.station-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    border-color: #38d9a9;
}

.station-card .station-icon {
    font-size: 1.8rem;
}

.station-card .station-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.station-card .station-teaser {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.station-card.discovered::after {
    content: '\2713';
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    color: #38d9a9;
    font-size: 1.2rem;
    font-weight: 700;
}

/* === Hub Hero === */
.hub-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: center;
}

.hub-hero-3d {
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a2e;
}

.hub-hero-text h2 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

.hub-hero-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #38d9a9;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* === Bottom Navigation === */
.bottom-nav {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 200;
    pointer-events: none;
}

.bottom-nav > * {
    pointer-events: auto;
}

.bottom-nav .back-button {
    position: static;
}

.station-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.station-nav a {
    color: #38d9a9;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    background: var(--modal-bg);
    border: 1px solid #2a8a77;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: background 0.2s;
}

.station-nav a:hover {
    background: #154d6b;
}

.back-button {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    background: var(--modal-bg);
    color: #38d9a9;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    border: 1px solid #2a8a77;
    z-index: 200;
    transition: background 0.2s;
}

.back-button:hover {
    background: #154d6b;
}

/* === Exploration Links in Info Panel === */
.exploration-links {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.exploration-links h3 {
    color: #38d9a9 !important;
    border-bottom: none !important;
}

/* === Controls / Toggles === */
.controls-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.canvas-container .controls-bar {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    z-index: 10;
    margin-bottom: 0;
}

.toggle-btn {
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: var(--text);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn:hover {
    border-color: #38d9a9;
}

.toggle-btn.active {
    background: #38d9a9;
    color: #1a1a2e;
    border-color: #38d9a9;
    font-weight: 600;
}

/* === Glossary (Bausteine) === */
.glossary-box {
    background: var(--modal-bg);
    border-radius: 12px;
    padding: 1.2rem;
}

.glossary-box h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.glossary-box p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.glossary-box p strong {
    color: var(--text);
}

.glossary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.glossary-item {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

.glossary-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 3px;
}

.glossary-item strong {
    font-size: 0.85rem;
    color: var(--text);
}

.glossary-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: #38d9a9;
    margin-left: 0.3rem;
}

.glossary-item p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 0.15rem;
}

.glossary-highlight {
    margin-top: 0.8rem;
    padding: 0.6rem 0.8rem;
    background: rgba(56, 217, 169, 0.08);
    border-left: 3px solid #38d9a9;
    border-radius: 0 6px 6px 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.glossary-highlight strong {
    color: #38d9a9;
}

/* === Slider Controls === */
.slider-group {
    margin: 0.8rem 0;
}

.slider-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.slider-group input[type="range"] {
    width: 100%;
    accent-color: #38d9a9;
}

.slider-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #38d9a9;
}

/* === Result Display === */
.result-box {
    background: rgba(56, 217, 169, 0.1);
    border: 1px solid rgba(56, 217, 169, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.result-box .result-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #38d9a9;
}

.result-box .result-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* === Chart Container === */
.chart-container {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

.chart-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* === Phase indicator === */
.phase-indicator {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    margin-top: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
}

/* === Sidebar list (molecule gallery) === */
.sidebar-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.sidebar-list button {
    width: 100%;
    text-align: left;
    padding: 0.6rem 1rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-list button:hover {
    border-color: #38d9a9;
}

.sidebar-list button.active {
    background: rgba(56, 217, 169, 0.15);
    border-color: #38d9a9;
}

/* === Cycle Diagram Canvas === */
.cycle-canvas {
    width: 100%;
    aspect-ratio: 16 / 12;
    margin: 0 auto;
}

/* === Article Page === */
.article-page {
    max-width: 800px;
    margin: 0 auto 4rem;
    padding: 0 1rem;
}

.article-page h1 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.03em;
    margin-bottom: 1rem;
}

.article-lead {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 2rem;
    border-left: 3px solid #38d9a9;
    padding-left: 1rem;
}

.article-page h2 {
    font-size: 1.4rem;
    font-weight: 400;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.article-page h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 1.2rem 0 0.5rem;
}

.article-page p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.article-page p strong {
    color: var(--text);
}

.article-page ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 1rem;
}

.article-page ul li {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    padding: 0.2rem 0 0.2rem 1.2rem;
    position: relative;
}

.article-page ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #38d9a9;
}

.article-page a:not(.breadcrumb a):not(.article-back) {
    color: #38d9a9;
    text-decoration: none;
    border-bottom: 1px solid rgba(56, 217, 169, 0.3);
    transition: border-color 0.2s;
}

.article-page a:not(.breadcrumb a):not(.article-back):hover {
    border-bottom-color: #38d9a9;
}

.article-page .fact-box p,
.article-page .callout p {
    margin-bottom: 0.3rem;
}

.article-page .fact-box p:last-child,
.article-page .callout p:last-child {
    margin-bottom: 0;
}

.article-page blockquote {
    border-left: 3px solid #9775fa;
    padding: 1rem 1.2rem;
    margin: 1.5rem 0;
    background: rgba(151, 117, 250, 0.06);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-muted);
}

.article-page blockquote cite {
    display: block;
    margin-top: 0.5rem;
    font-style: normal;
    font-size: 0.85rem;
    color: #9775fa;
}

/* === Size Comparison Panels (Größenvergleiche) === */
.size-panel {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 1rem;
    margin: 1.2rem 0;
    overflow: hidden;
}

.size-panel svg {
    display: block;
    width: 100%;
    height: auto;
}

.size-panel-caption {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

.size-ladder {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    margin: 1.5rem 0;
    overflow: hidden;
}

.size-ladder svg {
    display: block;
    width: 100%;
    height: auto;
}

.analogy-box {
    background: rgba(151, 117, 250, 0.08);
    border: 1px solid rgba(151, 117, 250, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.analogy-box::before {
    content: 'Zum Vergleich';
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: #9775fa;
    margin-bottom: 0.4rem;
}

.article-page .analogy-box p {
    margin-bottom: 0.3rem;
}

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

/* === Lexikon Backlinks === */
.lexikon-backlinks {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(151, 117, 250, 0.2);
}

.lexikon-backlinks h3 {
    font-size: 0.9rem;
    color: #9775fa !important;
    border-bottom: none !important;
    margin-top: 0 !important;
    margin-bottom: 0.5rem;
}

.lexikon-backlinks-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.lexikon-backlinks-list a {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    background: rgba(151, 117, 250, 0.1);
    color: #b197fc !important;
    text-decoration: none !important;
    border: 1px solid rgba(151, 117, 250, 0.2) !important;
    border-bottom: 1px solid rgba(151, 117, 250, 0.2) !important;
    transition: background 0.2s, border-color 0.2s;
}

.lexikon-backlinks-list a:hover {
    background: rgba(151, 117, 250, 0.2);
    border-color: #9775fa !important;
}

.article-back {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.6rem 1.2rem;
    background: var(--modal-bg);
    color: #38d9a9;
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.85rem;
    border: 1px solid #2a8a77;
    transition: background 0.2s;
}

.article-back:hover {
    background: #154d6b;
}

/* === Responsive === */
@media (max-width: 900px) {
    .split-pane {
        grid-template-columns: 1fr;
    }

    .canvas-container {
        position: static;
    }

    .hub-hero {
        grid-template-columns: 1fr;
    }

    .station-cards {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 600px) {
    .view {
        padding: 0.5rem;
    }

    .info-panel {
        padding: 1rem;
    }

    .station-cards {
        grid-template-columns: 1fr;
    }

    .hub-hero-text h2 {
        font-size: 1.5rem;
    }

    .bottom-nav {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
    }

    .back-button {
        bottom: 1rem;
        left: 1rem;
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    .station-nav a {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    .article-page {
        padding: 0 0.5rem;
    }

    .article-page h1 {
        font-size: 1.5rem;
    }

    .article-page h2 {
        font-size: 1.15rem;
    }
}
