/* =========================================
   SCHRIFTARTEN (Lokale Einbindung)
   ========================================= */

@font-face {
    font-family: 'unifrakturmaguntia16book';
    src: url('UnifrakturMaguntia16-webfont.eot');
    src: url('UnifrakturMaguntia16-webfont.eot?#iefix') format('embedded-opentype'),
         url('UnifrakturMaguntia16-webfont.woff2') format('woff2'),
         url('UnifrakturMaguntia16-webfont.woff') format('woff'),
         url('UnifrakturMaguntia16-webfont.ttf') format('truetype'),
         url('UnifrakturMaguntia16-webfont.svg#unifrakturmaguntia16book') format('svg');
    font-weight: normal;
    font-style: normal;
	font-display: block;
}

@font-face {
    font-family: 'FrakturModern';
    src: url('fraktmod.eot');
    src: url('fraktmodt.eot?#iefix') format('embedded-opentype'),
         url('fraktmod.woff') format('woff'),
         url('fraktmod.ttf') format('truetype'),
         url('fraktmod.svg#FrakturModern') format('svg');
    font-weight: normal;
    font-style: normal;
	font-display: block;
}

/* =========================================
   GRUNDLAYOUT & DESIGN
   ========================================= */

html {
    scroll-padding-top: 150px; 
    scroll-behavior: smooth;
}

body {
    background-color: #0d0d0d; 
    font-family: 'FrakturModern', 'unifrakturmaguntia16book', Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.25; 
}

p, h2, h3, div, span, li, a {
    color: #e8e8e8; 
    text-shadow: 
        0px 0px 15px rgba(210, 210, 210, 0.6), 
         1px  1px 1px black,
         1px -1px 1px black,
        -1px  1px 1px black,
        -1px -1px 1px black;
    letter-spacing: 0em;
    background-color: transparent;
}

b, strong {
    color: #ffffff; 
    font-weight: normal;
    text-shadow:
        0px 0px 20px rgba(220, 220, 220, 0.8),
         1px  1px 1px black,
         1px -1px 1px black,
        -1px  1px 1px black,
        -1px -1px 1px black;
}

#content-wrapper {
    max-width: 1200px; 
    margin: 3px auto; /* 3 Pixel Minimal-Abstand zum Fensterrand */
    padding: 20px;
    text-align: center;
}

/* =========================================
   HAUPT-ÜBERSCHRIFT (Keltisches Banner)
   ========================================= */

h1 {
    font-size: 4.5em; 
    font-weight: 100;
    color: #e8e8e8; 
    letter-spacing: 0em;
    margin-top: 0;
    margin-bottom: 6px; 
    
    text-shadow: 
        0px 0px 40px rgba(210, 210, 210, 0.6),
         1px  1px 1px black,
         1px -1px 1px black,
        -1px  1px 1px black,
        -1px -1px 1px black;
        
    background-color: #0b0d10; 
    background-image: linear-gradient(rgba(13, 13, 13, 0.4), rgba(13, 13, 13, 0.8)), url('keltisches-muster.jpg');
    background-size: 800px auto; 
    background-position: top center;
    border: 1px solid #2d3339;
    border-radius: 0.6em 0.6em 0 0; 
    padding: 4px 10px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.8);
}

/* =========================================
   TEXTE & INITIALE
   ========================================= */

.intro-text {
    font-size: 1.3em;
    text-align: justify;
    margin-top: 0;
    margin-bottom: 4px; 
    
    background-color: rgba(14, 16, 19, 0.9); 
    border: 1px solid #2d3339; 
    border-radius: 0;
    padding: 15px 20px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.8);
}

#munkeleien-box {
    display: none;
    text-align: left;
    box-sizing: border-box;
    
    background-color: rgba(14, 16, 19, 0.9);
    border: 1px solid #2d3339;
    border-radius: 0;
    padding: 0 20px 15px 20px; /* Oben bündig für den rahmenlosen Player */
    box-shadow: 0 4px 6px rgba(0,0,0,0.8);
}

#munkeleien-text {
    font-size: 1.3em;
    text-align: justify;
    margin-top: 0 !important; 
    margin-bottom: 4px;
}

.intro-text p, #munkeleien-text p {
    min-width: 200px;
    font-size: 1.2em; 
    margin-top: 0; 
    margin-bottom: 4px; 
}

.intro-text p::first-letter, #munkeleien-text p::first-letter {
    font-size: 1.2em;      
    color: #ffffff; 
    text-shadow: 
        0px 0px 25px rgba(220, 220, 220, 0.8),
         1px  1px 1px black,
         1px -1px 1px black,
        -1px  1px 1px black,
        -1px -1px 1px black;
}

.link {
    text-decoration: underline;
}

.link:hover {
    text-shadow: 0px 0px 15px rgba(220, 220, 220, 0.8), 1px 1px 5px black, 1px -1px 1px black, -1px 1px 1px black, -1px -1px 1px black;
}

/* =========================================
   FLEX-CONTAINER FÜR RESPONSIVES LAYOUT
   ========================================= */

#layout-container {
    display: flex;
    flex-direction: column; 
    gap: 4px; 
}

/* =========================================
   HAUPTNAVIGATION (Unter der Überschrift)
   ========================================= */

#hauptnavigation {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 0; 
    margin-bottom: 4px; 
    width: 100%;
    background-color: rgba(18, 21, 25, 0.8); 
    background-image: url('keltisches-muster.jpg');
    background-size: 800px auto; 
    background-position: bottom center;
}

.haupt-kachel {
    background-color: transparent; 
    background-image: linear-gradient(rgba(10, 12, 14, 0.5), rgba(10, 12, 14, 0.9));
    border: 3px solid #0d0d0d; 
    border-radius: 0; 
    padding: 5px 10px; 
    font-size: 1.3em;
    color: #e8e8e8; 
    text-decoration: none; 
    transition: all 0.3s ease;
    box-shadow: inset 0 0 0 1px #2d3339, 0 4px 6px rgba(0,0,0,0.8);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box; 
}

.haupt-kachel:nth-child(1), .haupt-kachel:nth-child(2) { border-top: 0; }
.haupt-kachel:nth-child(3), .haupt-kachel:nth-child(4) { border-bottom: 0; }
.haupt-kachel:nth-child(odd) { border-left: 0; }
.haupt-kachel:nth-child(even) { border-right: 0; }

.haupt-kachel:hover {
    background-image: linear-gradient(rgba(45, 51, 60, 0.6), rgba(45, 51, 60, 0.8));
    border-color: #0d0d0d; 
    box-shadow: inset 0 0 0 1px #e8e8e8, 0 4px 6px rgba(0,0,0,0.8);
    transform: translateY(-2px); 
    text-shadow: 0px 0px 15px rgba(220, 220, 220, 0.8), 1px 1px 2px black, -1px -1px 2px black;
}

/* =========================================
   KACHELN (Lieder-Auswahl)
   ========================================= */

#kacheln-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 6px; 
}

.kachel {
    background-color: rgba(14, 16, 19, 0.85); 
    border: 1px solid #2d3339;
    border-radius: 0; 
    padding: 2px 4px; 
    font-size: 1.0em; 
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.8);
    text-align: center; 
    display: flex;
    align-items: center;
    justify-content: center;
    
    height: auto; 
    min-height: 25px; 
    
    word-break: break-word;
    hyphens: auto;
}

#kacheln-grid .kachel:nth-last-child(4) {
    border-bottom-left-radius: 0.6em; 
}
#kacheln-grid .kachel:last-child {
    border-bottom-right-radius: 0.6em; 
}

.kachel:hover {
    background-color: rgba(30, 35, 42, 0.95);
    border-color: #e8e8e8; 
    transform: translateY(-2px);
}

/* =========================================
   LEERE PLATZHALTER-KACHELN
   ========================================= */

.kachel.kachel-leer {
    cursor: default; 
    opacity: 0.4; 
}

.kachel.kachel-leer:hover {
    background-color: rgba(14, 16, 19, 0.85); 
    border-color: #2d3339; 
    transform: none; 
}

/* =========================================
   SPEZIELLES DESIGN FÜR PIANO-KACHELN
   ========================================= */

.kachel-piano {
    background-color: rgba(8, 10, 12, 0.9); 
    border-color: #1a1e22; 
}

.kachel-piano:hover {
    background-color: rgba(22, 26, 32, 0.95); 
    border-color: #e8e8e8; 
}

/* =========================================
   LIED-BESCHREIBUNGEN & PLAYER
   ========================================= */

#munkeleien-title {
    font-size: 1.8em;
    margin-top: 15px; /* Abstand zu den Navigations-Tasten */
    margin-bottom: 15px; 
    padding-top: 0; 
    line-height: 1; 
    scroll-margin-top: 150px; 
}

.player-container {
    margin: 0 0 4px 0; 
    width: 100%;
    aspect-ratio: 16 / 9; 
    background-color: #000000;
    border: none; /* Rahmen entfernt für nahtlosen Look */
    box-sizing: border-box;
    overflow: hidden; 
    scroll-margin-top: 150px; 
}

#musik-player {
    width: 100% !important;
    height: 100% !important; 
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    outline: none !important;
    border: none !important;
    background-color: transparent !important;
    scroll-margin-top: 150px !important; 
}

/* =========================================
   NAVIGATION UNTER DEM PLAYER (Liednavigation)
   ========================================= */

#nav-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px; 
    width: 100%;
}

.nav-kachel {
    flex: 1; 
    font-size: 1.1em;
    margin: 0;
    border-radius: 0; 
}

/* =========================================
   MASSIVE SCHIEFER-SCROLLBARS (Ohne Grafik)
   ========================================= */

* {
    scrollbar-width: auto;
    scrollbar-color: #1a1e22 #0d0d0d; 
}

::-webkit-scrollbar {
    width: 14px; 
}

::-webkit-scrollbar-track {
    background-color: #0d0d0d; 
    border-left: 1px solid #0b0d10; 
}

::-webkit-scrollbar-thumb {
    background-color: #1a1e22; 
    border: 1px solid #2d3339;
    border-radius: 0.4em; 
}

::-webkit-scrollbar-thumb:hover {
    background-color: #2b323b; 
    border-color: #e8e8e8;
}

/* =========================================
   MEDIA QUERY FÜR GROßE BILDSCHIRME
   ========================================= */

@media (min-width: 900px) {

    h1 {
        font-size: 7.5em; 
        padding: 8px 20px; 
        text-shadow: 
            0px 0px 60px rgba(210, 210, 210, 0.6), 
             1px  1px 1px black,
             1px -1px 1px black,
            -1px  1px 1px black,
            -1px -1px 1px black;
    }

    #hauptnavigation {
        grid-template-columns: repeat(4, 1fr); 
    }
    
    #hauptnavigation .haupt-kachel {
        border: 3px solid #0d0d0d; 
        border-top: 0; 
        border-bottom: 0;
    }
    #hauptnavigation .haupt-kachel:first-child { border-left: 0; }
    #hauptnavigation .haupt-kachel:last-child { border-right: 0; }

    #layout-container {
        flex-direction: row-reverse; 
        align-items: stretch; 
    }

    #kacheln-grid {
        flex: 1; 
        display: grid; 
        grid-template-columns: repeat(4, 1fr); 
        
        gap: 0; 
        align-content: start; 
        margin-top: 0; 
        
        background-color: rgba(14, 16, 19, 0.85); 
        border: 1px solid #2d3339; 
        
        border-bottom-left-radius: 0.6em; 
        overflow: hidden; 
    }
    
    #kacheln-grid .kachel {
        height: 3.75em; 
        border-radius: 0 !important; 
        border: 3px solid #0d0d0d; 
        box-shadow: inset 0 0 0 1px #2d3339, 0 4px 6px rgba(0,0,0,0.8);
    }

    #kacheln-grid .kachel:hover {
        border-color: #0d0d0d; 
        box-shadow: inset 0 0 0 1px #e8e8e8, 0 4px 6px rgba(0,0,0,0.8);
    }
    
    #kacheln-grid .kachel-piano {
        border-color: #0d0d0d; 
        box-shadow: inset 0 0 0 1px #1a1e22, 0 4px 6px rgba(0,0,0,0.8);
    }
    #kacheln-grid .kachel-piano:hover {
        border-color: #0d0d0d; 
        box-shadow: inset 0 0 0 1px #e8e8e8, 0 4px 6px rgba(0,0,0,0.8);
    }
    
    #kacheln-grid .kachel.kachel-leer {
        border-color: #0d0d0d; 
        box-shadow: inset 0 0 0 1px #2d3339, 0 4px 6px rgba(0,0,0,0.8);
    }
    #kacheln-grid .kachel.kachel-leer:hover {
        border-color: #0d0d0d; 
        box-shadow: inset 0 0 0 1px #2d3339, 0 4px 6px rgba(0,0,0,0.8);
    }

    #munkeleien-box {
        flex: 2; 
        margin-top: 0;
        padding: 0 20px 15px 20px; /* Auch auf dem Desktop oben bündig */
        border-bottom-right-radius: 0.6em;
    }

}
