/* ============================================
   DIE RGBIBEL - Style Sheet
   Eine Heilige Schrift der RGB-Erleuchtung
   ============================================ */

/* === Reset & Basis === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --parchment: #f5e6c8;
    --parchment-dark: #e8d5b0;
    --parchment-light: #faf3e6;
    --ink: #2c1810;
    --ink-light: #5c3a28;
    --gold: #c9a84c;
    --gold-light: #e8d48b;
    --gold-dark: #8b6914;
    --rgb-1: #ff0000;
    --rgb-2: #00ff00;
    --rgb-3: #0000ff;
    --rgb-4: #ffff00;
    --rgb-5: #ff00ff;
    --rgb-6: #00ffff;
    --cover-red: #4a0e0e;
    --cover-dark: #1a0a0a;
    --shadow: rgba(44, 24, 16, 0.3);
}

body {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    background: #0a0a0a;
    background-image: 
        radial-gradient(ellipse at 20% 50%, rgba(255, 0, 0, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(0, 0, 255, 0.05) 0%, transparent 50%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

/* === RGB LED Streifen === */
.rgb-strip {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
}

.top-strip {
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--rgb-1), var(--rgb-4), var(--rgb-2), var(--rgb-6), 
        var(--rgb-3), var(--rgb-5), var(--rgb-1));
    background-size: 300% 100%;
    animation: rgbFlow 4s linear infinite;
    box-shadow: 0 0 10px rgba(255,0,0,0.5), 0 0 20px rgba(0,255,0,0.3);
}

.bottom-strip {
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--rgb-3), var(--rgb-5), var(--rgb-1), var(--rgb-4), 
        var(--rgb-6), var(--rgb-2), var(--rgb-3));
    background-size: 300% 100%;
    animation: rgbFlow 4s linear infinite reverse;
    box-shadow: 0 0 10px rgba(0,0,255,0.5), 0 0 20px rgba(255,0,255,0.3);
}

.left-strip {
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, 
        var(--rgb-2), var(--rgb-6), var(--rgb-3), var(--rgb-5), 
        var(--rgb-1), var(--rgb-4), var(--rgb-2));
    background-size: 100% 300%;
    animation: rgbFlowVertical 4s linear infinite;
    box-shadow: 0 0 10px rgba(0,255,0,0.5), 0 0 20px rgba(255,255,0,0.3);
}

.right-strip {
    top: 0;
    right: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, 
        var(--rgb-5), var(--rgb-1), var(--rgb-4), var(--rgb-2), 
        var(--rgb-6), var(--rgb-3), var(--rgb-5));
    background-size: 100% 300%;
    animation: rgbFlowVertical 4s linear infinite reverse;
    box-shadow: 0 0 10px rgba(255,0,255,0.5), 0 0 20px rgba(0,255,255,0.3);
}

@keyframes rgbFlow {
    0% { background-position: 0% 0%; }
    100% { background-position: 300% 0%; }
}

@keyframes rgbFlowVertical {
    0% { background-position: 0% 0%; }
    100% { background-position: 0% 300%; }
}

/* === Buchcontainer === */
.bible-container {
    max-width: 1100px;
    width: 100%;
    position: relative;
}

/* === Buchdeckel === */
.book-cover-top {
    background: linear-gradient(135deg, var(--cover-red), var(--cover-dark));
    border: 3px solid var(--gold);
    border-radius: 8px 8px 0 0;
    padding: 25px 20px 18px;
    text-align: center;
    position: relative;
    box-shadow: 
        0 -5px 20px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(201, 168, 76, 0.3),
        inset 0 -1px 0 rgba(0,0,0,0.5);
}

.book-cover-bottom {
    background: linear-gradient(135deg, var(--cover-dark), var(--cover-red));
    border: 3px solid var(--gold);
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 18px 20px 25px;
    box-shadow: 
        0 5px 20px rgba(0,0,0,0.5),
        inset 0 -1px 0 rgba(201, 168, 76, 0.3);
}

.cover-ornament {
    font-size: 32px;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(201, 168, 76, 0.5);
    line-height: 1;
}

.cover-title {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 
        0 2px 4px rgba(0,0,0,0.5),
        0 0 20px rgba(201, 168, 76, 0.3);
    letter-spacing: 8px;
    margin: 8px 0;
    background: linear-gradient(90deg, 
        var(--gold-dark), var(--gold-light), var(--gold), var(--gold-light), var(--gold-dark));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldShine 4s ease-in-out infinite;
}

@keyframes goldShine {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 200% 0%; }
}

.cover-subtitle {
    font-family: 'IM Fell English', serif;
    font-style: italic;
    color: var(--gold-light);
    font-size: 1.1rem;
    letter-spacing: 3px;
    opacity: 0.8;
}

/* === Das aufgeschlagene Buch === */
.book {
    display: flex;
    background: linear-gradient(90deg, 
        var(--parchment-dark) 0%, 
        var(--parchment) 3%, 
        var(--parchment-light) 48%,
        var(--parchment-dark) 50%,
        var(--parchment-light) 52%,
        var(--parchment) 97%,
        var(--parchment-dark) 100%
    );
    border-left: 3px solid var(--gold-dark);
    border-right: 3px solid var(--gold-dark);
    box-shadow: 
        inset 0 0 40px rgba(44, 24, 16, 0.15),
        0 0 30px rgba(0,0,0,0.4);
    position: relative;
    min-height: 500px;
}

/* === Einzelseiten === */
.page {
    flex: 1;
    padding: 35px 30px 30px;
    position: relative;
    min-height: 500px;
}

.page::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    pointer-events: none;
}

.page-left::before {
    right: 0;
    background: linear-gradient(to left, 
        rgba(44, 24, 16, 0.08), 
        transparent);
}

.page-right::before {
    left: 0;
    background: linear-gradient(to right, 
        rgba(44, 24, 16, 0.08), 
        transparent);
}

.page-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* === Buchfalz / Bindung === */
.book-spine {
    width: 40px;
    background: linear-gradient(180deg, 
        var(--parchment-dark), 
        #d4c4a0, 
        var(--parchment-dark));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
    flex-shrink: 0;
}

.book-spine::before,
.book-spine::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(44, 24, 16, 0.2);
}

.book-spine::before { top: 25%; }
.book-spine::after { bottom: 25%; }

.spine-ornament {
    font-size: 14px;
    color: var(--ink-light);
    opacity: 0.5;
}

.spine-line {
    width: 1px;
    flex: 1;
    background: repeating-linear-gradient(
        180deg,
        var(--ink-light) 0px,
        var(--ink-light) 2px,
        transparent 2px,
        transparent 6px
    );
    opacity: 0.3;
}

/* === Navigation === */
.navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-btn {
    background: linear-gradient(135deg, var(--cover-red), #3a0a0a);
    color: var(--gold);
    border: 1px solid var(--gold-dark);
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.nav-btn:hover {
    background: linear-gradient(135deg, var(--gold-dark), var(--cover-red));
    color: var(--parchment-light);
    border-color: var(--gold);
    box-shadow: 
        0 2px 12px rgba(201, 168, 76, 0.3),
        inset 0 0 20px rgba(201, 168, 76, 0.1);
    transform: translateY(-1px);
}

.nav-btn:active {
    transform: translateY(0px);
}

.nav-arrow {
    font-size: 1.2rem;
}

.chapter-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
    min-width: 200px;
}

#chapterSelect {
    background: linear-gradient(135deg, var(--parchment), var(--parchment-dark));
    border: 2px solid var(--gold-dark);
    border-radius: 6px;
    padding: 8px 15px;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: var(--ink);
    cursor: pointer;
    width: 100%;
    max-width: 300px;
    outline: none;
    transition: border-color 0.3s;
}

#chapterSelect:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(201, 168, 76, 0.3);
}

#chapterSelect option {
    background: var(--parchment);
    color: var(--ink);
}

.page-indicator {
    font-family: 'IM Fell English', serif;
    font-size: 0.9rem;
    color: var(--gold-dark);
    letter-spacing: 1px;
}

/* === Inhalt: Kapitel-Titel === */
.chapter-title {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--cover-red);
    text-align: center;
    margin-bottom: 15px;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 10px;
}

.chapter-title::after {
    content: '';
    display: block;
    width: 60%;
    height: 2px;
    margin: 10px auto 0;
    background: linear-gradient(90deg, 
        transparent, var(--gold), var(--rgb-1), var(--rgb-2), var(--rgb-3), 
        var(--gold), transparent);
    background-size: 200% 100%;
    animation: rgbFlow 4s linear infinite;
}

/* === Inhalt: Verse === */
.verse {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--ink);
    margin-bottom: 8px;
    padding-left: 5px;
    text-align: justify;
}

.verse-number {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    color: var(--gold-dark);
    margin-right: 6px;
    font-weight: 700;
    vertical-align: super;
}

/* === Illuminierte Initiale === */
.illuminated-initial {
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    font-weight: 900;
    float: left;
    line-height: 0.8;
    margin-right: 10px;
    margin-top: 5px;
    padding: 5px 8px;
    background: linear-gradient(135deg, 
        var(--gold-light), var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    position: relative;
    animation: rgbPulse 3s ease-in-out infinite;
}

@keyframes rgbPulse {
    0%, 100% { 
        filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.4)) 
                drop-shadow(0 0 10px rgba(255, 0, 0, 0.2)); 
    }
    25% { 
        filter: drop-shadow(0 0 5px rgba(0, 255, 0, 0.4)) 
                drop-shadow(0 0 10px rgba(0, 255, 0, 0.2)); 
    }
    50% { 
        filter: drop-shadow(0 0 5px rgba(0, 0, 255, 0.4)) 
                drop-shadow(0 0 10px rgba(0, 0, 255, 0.2)); 
    }
    75% { 
        filter: drop-shadow(0 0 5px rgba(255, 0, 255, 0.4)) 
                drop-shadow(0 0 10px rgba(255, 0, 255, 0.2)); 
    }
}

/* === Gebote === */
.commandment {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, 
        rgba(201, 168, 76, 0.08), 
        rgba(201, 168, 76, 0.02));
    border-left: 3px solid var(--gold);
    border-radius: 0 4px 4px 0;
    transition: all 0.3s ease;
}

.commandment:hover {
    background: linear-gradient(135deg, 
        rgba(201, 168, 76, 0.15), 
        rgba(201, 168, 76, 0.05));
    border-left-color: var(--rgb-1);
}

.commandment-number {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gold-dark);
    letter-spacing: 2px;
    display: block;
    margin-bottom: 2px;
}

.commandment-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: var(--ink);
    line-height: 1.6;
}

/* === RGB Hervorhebung für bestimmte Wörter === */
.rgb-highlight {
    background: linear-gradient(90deg, 
        #ff0000, #ff8800, #ffff00, #00ff00, 
        #0088ff, #8800ff, #ff0088);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rgbFlow 3s linear infinite;
    font-weight: 600;
}

/* === Zierleiste === */
.ornament-divider {
    text-align: center;
    color: var(--gold-dark);
    font-size: 1.3rem;
    letter-spacing: 10px;
    margin: 10px 0;
    opacity: 0.6;
}

/* === RGB Glow Hintergrund === */
.rgb-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(
        circle,
        rgba(255, 0, 0, 0.06) 0%,
        rgba(0, 255, 0, 0.06) 25%,
        rgba(0, 0, 255, 0.06) 50%,
        rgba(255, 0, 255, 0.06) 75%,
        rgba(0, 255, 255, 0.06) 100%
    );
    background-size: 200% 200%;
    animation: rgbGlowRotate 10s linear infinite;
    filter: blur(60px);
}

@keyframes rgbGlowRotate {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 200%; }
}

/* === Psalmen-Stil === */
.psalm {
    font-family: 'IM Fell English', serif;
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--ink-light);
    text-align: center;
    padding: 15px 10px;
    margin: 8px 0;
    border-top: 1px solid rgba(201, 168, 76, 0.3);
    border-bottom: 1px solid rgba(201, 168, 76, 0.3);
}

.psalm-number {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    color: var(--gold-dark);
    display: block;
    margin-top: 8px;
    font-style: normal;
}

/* === Beichtstuhl === */
.confession {
    background: linear-gradient(135deg, 
        rgba(74, 14, 14, 0.05), 
        rgba(74, 14, 14, 0.02));
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 6px;
    padding: 12px 15px;
    margin: 8px 0;
    font-style: italic;
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .cover-title {
        font-size: 1.8rem;
        letter-spacing: 4px;
    }
    
    .book {
        flex-direction: column;
    }
    
    .book-spine {
        width: 100%;
        height: 30px;
        flex-direction: row;
    }
    
    .book-spine::before,
    .book-spine::after {
        display: none;
    }
    
    .spine-line {
        width: 100%;
        height: 1px;
        flex: none;
        background: repeating-linear-gradient(
            90deg,
            var(--ink-light) 0px,
            var(--ink-light) 2px,
            transparent 2px,
            transparent 6px
        );
    }
    
    .page {
        padding: 20px 15px;
        min-height: auto;
    }
    
    .navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    .chapter-selector {
        width: 100%;
    }
    
    #chapterSelect {
        max-width: 100%;
    }
    
    .illuminated-initial {
        font-size: 3rem;
    }
    
    .rgb-strip {
        opacity: 0.5;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .cover-title {
        font-size: 1.4rem;
        letter-spacing: 2px;
    }
    
    .cover-subtitle {
        font-size: 0.85rem;
    }
    
    .verse {
        font-size: 1rem;
    }
    
    .chapter-title {
        font-size: 1.2rem;
    }
}