/* ----- Globale Einstellungen & Deine Fonts ----- */
@font-face {
    font-family: 'SternenschwertFont-Regular';
    src: url('fonts/dum1.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'SternenschwertFont-Hover';
    src: url('fonts/dum3out.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    color: #d4cba9; 
    font-family: 'SternenschwertFont-Regular', 'Georgia', serif;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease;
}

/* ----- Layout-Container ----- */
.page-container {
    display: flex;
    justify-content: center;
    width: 100%;
    position: relative;
    min-height: 100vh;
}

/* VERTIKALE BORDERS - EXAKT 13px */
.vertical-border {
    width: 13px;
    background: url('images/longdivider_c.png') repeat-y center;
    background-size: 13px auto;
    position: absolute;
    top: 0;
    height: 100vh;
    z-index: 100;
    pointer-events: none;
}

/* Berechne Position basierend auf main-wrapper */
.vertical-border.left {
    left: calc(5% - 13px);
}

.vertical-border.right {
    right: calc(5% - 13px);
}

/* Anpassung für max-width des main-wrapper */
@media (min-width: 1334px) {
    .vertical-border.left {
        left: calc(50% - 613px); /* 600px (halbe max-width) + 13px */
    }
    
    .vertical-border.right {
        right: calc(50% - 613px);
    }
}

.main-wrapper {
    width: 90%;
    max-width: 1200px;
    box-shadow: 0 0 90px rgba(0, 0, 0, 0.75); 
    position: relative; 
    transition: background-color 0.3s ease;
    padding: 0 45px;
    z-index: 1;
}

/* ----- Header & Logo ----- */
header {
    text-align: center;
    position: relative;
    padding-top: 20px;
}

.logo-container img {
    max-width: 350px;
    height: auto;
}

.login-link {
    position: absolute;
    top: 20px;
    right: 20px;
}

/* NAVIGATION mit DOPPELTEM ABSTAND */
.main-nav {
    margin: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.main-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-nav li {
    padding: 0;
    margin: 0 30px;
}

.nav-group-left,
.nav-group-center,
.nav-group-right {
    flex: 1;
}

.nav-group-left {
    justify-content: flex-start;
}

.nav-group-center {
    justify-content: center;
}

.nav-group-right {
    justify-content: flex-end;
}

/* ===== BASIS LINK STYLES ===== */
a {
    color: #d4cba9;
    text-decoration: none;
    font-size: 1.1em;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
    transition: color 0.2s ease, font-family 0.1s ease;
}

/* ===== HOVER EFFEKTE FÜR WIRKLICH ALLE LINKS ===== */
/* Login Link Hover */
.login-link a:hover {
    color: #ffffff;
    font-family: 'SternenschwertFont-Hover', 'Georgia', serif;
}

.login-link a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 10px;
    background: url('images/longdivider_b.png') no-repeat center bottom;
    background-size: contain;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.login-link a:hover::after {
    opacity: 1;
}

/* Main Nav Links Hover */
.main-nav a:hover {
    color: #ffffff;
    font-family: 'SternenschwertFont-Hover', 'Georgia', serif;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 10px;
    background: url('images/longdivider_b.png') no-repeat center bottom;
    background-size: contain;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.main-nav a:hover::after {
    opacity: 1;
}

/* Footer Links Hover - EXPLIZIT für footer-left und footer-right */
.footer-left a:hover,
.footer-right a:hover {
    color: #ffffff;
    font-family: 'SternenschwertFont-Hover', 'Georgia', serif;
}

.footer-left a::after,
.footer-right a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 10px;
    background: url('images/longdivider_b.png') no-repeat center bottom;
    background-size: contain;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.footer-left a:hover::after,
.footer-right a:hover::after {
    opacity: 1;
}

/* Aktiver Link */
.main-nav a.active {
    font-weight: bold;
    color: #fff;
}

/* TRENNLINIEN - 20px HÖHE */
.divider {
    width: calc(100% + 90px);
    margin-left: -45px;
    margin-right: -45px;
    height: 20px;
    object-fit: fill;
    display: block;
}

/* ----- Hauptinhalt ----- */
main {
    padding: 20px 0; 
    min-height: 60vh;
}

h1 {
    color: #e0d6b3;
    font-weight: normal;
}

/* ----- Footer ----- */
footer {
    padding-bottom: 15px;
    text-align: center; 
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
}

.footer-center {
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: gray;
    text-align: center;
    margin-top: 15px;
}

.footer-left, .footer-right {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-basis: 250px; 
}

.footer-left a, .footer-right a {
    position: relative;
    display: inline-block;
}

.footer-right {
    justify-content: flex-end;
}

/* Theme Switcher */
.theme-switcher-wrapper {
    padding-top: 10px;
    display: flex;
    justify-content: center;
}

.theme-switcher {
    display: flex;
    gap: 5px;
}

.color-box {
    width: 20px;
    height: 20px;
    border: 1px solid #d4cba9; 
    cursor: pointer;
    transition: transform 0.2s;
}

.color-box:hover {
    transform: scale(1.2);
}

/* Die 6 Farb-Definitionen */
.color-box.theme-green    { background-color: #0e2929; }
.color-box.theme-red      { background-color: #4d0f0f; }
.color-box.theme-blue     { background-color: #0f2a4d; }
.color-box.theme-obsidian { background-color: #1a1a1a; }
.color-box.theme-purple   { background-color: #3d1a4d; }
.color-box.theme-brown    { background-color: #4d3d1a; }

/* Die eigentlichen Farb-Themen */
body.theme-green,
.theme-green body { background-color: #0c1a1a; }
body.theme-green .main-wrapper,
.theme-green .main-wrapper { background-color: #0e2929; }

body.theme-red,
.theme-red body { background-color: #1a0a0a; }
body.theme-red .main-wrapper,
.theme-red .main-wrapper { background-color: #4d0f0f; }

body.theme-blue,
.theme-blue body { background-color: #0a0f1a; }
body.theme-blue .main-wrapper,
.theme-blue .main-wrapper { background-color: #0f2a4d; }

body.theme-obsidian,
.theme-obsidian body { background-color: #000; }
body.theme-obsidian .main-wrapper,
.theme-obsidian .main-wrapper { background-color: #1a1a1a; }

body.theme-purple,
.theme-purple body { background-color: #1a0a1a; }
body.theme-purple .main-wrapper,
.theme-purple .main-wrapper { background-color: #3d1a4d; }

body.theme-brown,
.theme-brown body { background-color: #1a1a0a; }
body.theme-brown .main-wrapper,
.theme-brown .main-wrapper { background-color: #4d3d1a; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .main-nav li {
        margin: 5px 0;
    }

    .vertical-border {
        display: none;
    }

    .main-wrapper {
        width: 100%;
        padding: 0 15px;
    }

    .divider {
        width: calc(100% + 30px);
        margin-left: -15px;
        margin-right: -15px;
    }

    .login-link {
        position: static;
        text-align: center;
        margin-top: 10px;
    }

    .footer-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-left, .footer-right {
        flex-basis: auto;
        justify-content: center;
        width: 100%;
    }
}