/* Base Reset */
body {
    background-color: #000;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    margin: 0; padding: 0;
    overflow-x: hidden;
}
/*neon bubbly heading*/
.neon-bubbly-heading{
    font-family: 'Comic Sans MS';
    font-weight: 1000;
    font-size: 2.5rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;

    animation: neonPulse 4s ease-in-out infinite alternate;
}
.neon-bubbly-heading span{
    display: inline-block;
    animation: neonFlowPulse 3s ease-in-out infinite alternate;
    animation-delay: calc(var(--i)*0.15s);
}

@keyframes neonPulse{
    0% {
    color: #0602f8;

    text-shadow:
    0 0 5px #00f7ff,
    0 0 10px #00bfff,
    0 0 20px #2173d1,
    0 0 40px #2204cc,
    0 0 80px #b201df;
    }
    50%{
        color:  #1202f8;

        text-shadow:
        0 0 8px #00f7ff,
        0 0 15px #00bfff,
        0 0 30px #2173d1,
        0 0 50px #2204cc,
        0 0 100px #b201df;
    }
    100%{
        color:  #2f02f8;

        text-shadow:
        0 0 4px #00f7ff,
        0 0 8px #00bfff,
        0 0 18px #2173d1,
        0 0 35px #2204cc,
        0 0 70px #b201df;
    }
}

/* CUSTOM BACKDROP LAYER */
.custom-backdrop {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -2;
    background: url('../assets/backdrops/back.webp') center center / cover no-repeat;
    opacity: 0.1;
    transition: background-image 1s ease-in-out;
}

/* App Layout */
.app-container { display: flex; flex-direction: column; min-height: 100vh; }

header {
    background: rgba(0, 0, 0, 0.9);
    padding: 20px; text-align: center;
    border-bottom: 1px solid #333;
}
header h1 { margin: 0; color: #fff; text-transform: uppercase; letter-spacing: 2px; }

/* Tabs */
nav.tabs {
    display: flex; background: rgba(0, 0, 0, 0.9);
    border-bottom: 1px solid #333;
}
nav.tabs button {
    flex: 1; background: transparent; border: none; color: #888;
    padding: 15px 0; font-size: 1.2rem; cursor: pointer; transition: 0.2s;
}
nav.tabs button:hover, nav.tabs button.active {
    color: #fff; background: rgba(255, 255, 255, 0.05);
    border-bottom: 2px solid #fff;
}

/* Main Content Area */
main { flex: 1; width: 100%; }

/* Strict Tab Switching */
.tab-content { display: none !important; }
.tab-content.active { display: block !important; animation: fadeTab 0.3s ease-in; }

@keyframes fadeTab { from { opacity: 0; } to { opacity: 1; } }

/* THE CONTINUOUS CANVAS */
.continuous-canvas {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    width: 100%;
    min-height: calc(100vh - 140px);
    padding: 40px 5%;
    box-sizing: border-box;
}

/* Text Formatting */
.text-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}
.text-content h2 { color: #fff; font-size: 2rem; margin-top: 0; }
.text-content p { font-size: 1.2rem; line-height: 1.8; color: #ccc; margin-bottom: 20px; }
.text-content hr { border: none; border-bottom: 1px solid #333; margin: 40px 0; }

/* Decorative Art Layer */
.relative-container { position: relative; overflow: hidden; }
.decor-art {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    opacity: 0.95;
}
.decor-bottom-left { bottom: -20px; left: -20px; height: 20vh; width: auto; }
.decor-top-right { top: 40px; right: 0; width: 5vw; height: auto; }

@media (max-width: 900px) { .decor-art { display: none; } }

/* Library Grid */
.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px; margin-top: 20px; margin-bottom: 40px;
}
.library-item {
    background: rgba(20,20,20,0.8); border: 1px solid #444; border-left: 3px solid #555;
    padding: 20px; border-radius: 8px; cursor: pointer; transition: 0.2s; text-align: left;
}
.library-item h4 { margin: 0 0 10px 0; font-size: 1.2rem; color: #fff; }
.library-item:hover { transform: translateY(-5px); border-color: #fff; background: rgba(255,255,255,0.05); }

.link-sections { display: flex; gap: 20px; margin-top: 30px; flex-wrap: wrap; }

/* Buttons */
.btn {
    background: rgba(20,20,20,0.8); border: 1px solid #0437F2; color: #4166F5;
    padding: 12px 24px; cursor: pointer; font-size: 1rem; text-decoration: none; transition: 0.2s;
}
.btn:hover { border-color: #fff; background: #333; }
.btn-large { padding: 15px 30px; font-size: 1.1rem; }
.btn-gumroad { border-color: #ff0044; color: #ff0044; }
.btn-gumroad:hover { background: #ff0044; color: #fff; }

/* IMMERSIVE FULLSCREEN READER */
.fullscreen-reader {
    width: 100%; min-height: calc(100vh - 140px);
    display: flex; flex-direction: column; position: relative;
    background: #000;
}

.reader-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 30px; background: #080808; border-bottom: 1px solid #222;
    position: relative; z-index: 11;
}
.toolbar-right { display: flex; align-items: center; gap: 15px; }
.btn-info { padding: 8px 15px; border-radius: 20px; background: rgba(255,255,255,0.1); }
.bottom-toolbar { border-top: 1px solid #222; border-bottom: none; }
.hint-text { color: #555; }

/* Synopsis Panel Dropdown */
.synopsis-panel {
    display: none;
    position: absolute; top: 65px; left: 0; width: 100%; z-index: 10;
    background: rgba(5, 5, 5, 0.85); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 30px 5%; box-sizing: border-box; text-align: center;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    animation: slideDown 0.3s ease-out;
}
.synopsis-meta { color: #aaa; font-size: 1rem; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }
.synopsis-desc { color: #e0e0e0; max-width: 800px; margin: 0 auto; font-size: 1.15rem; line-height: 1.6; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

.comic-display-area {
    flex: 1; display: flex; justify-content: center; align-items: center;
    padding: 20px; background: #050505;
}
#comic-page-display {
    max-width: 100%; max-height: 80vh; object-fit: contain;
    transition: opacity 0.4s ease-in-out;
}