/* --- SCHRIFTEN & VARIABLEN --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Montserrat:wght@300;400&display=swap');

:root {
    --bg-color: #1a1f1a;       /* Dunkles Waldgrün */
    --card-bg: #262b26;        /* Kartenhintergrund */
    --text-primary: #e0e0d0;   /* Beige/Creme */
    --accent-gold: #c5a059;    /* Mattes Gold */
    --accent-green: #4a6741;   /* Farngrün */
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
}

/* --- BASIS --- */
body {
    background: url(/static/css/BG.jpg) no-repeat;
    background-size: cover;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2 {
    font-family: var(--font-heading);
    color: var(--accent-gold);
    text-align: center;
}

.eternal {
    font-family: 'Eternal';
    color: var(--accent-gold);
    text-align: center;
}

.scriptin {
    font-family: 'Scriptin';
    color: var(--accent-gold);
    text-align: center;
}

.container {
    margin: 0 auto;
    padding: 20px;
}

/* --- LOADER --- */
#loader-wrapper {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(197, 160, 89, 0.2);
    border-radius: 50%;
    border-top-color: var(--accent-gold);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loader-text {
    font-family: var(--font-heading);
    color: var(--accent-gold);
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.loader-hidden { opacity: 0; visibility: hidden; }

/* --- HEADER --- */
header {
    padding: 60px 20px;
    background: radial-gradient(circle at center, #2a332a 0%, var(--bg-color) 100%);
    border-bottom: 1px solid var(--accent-green);
    margin-bottom: 40px;
}

.header-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--accent-green);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: var(--font-body);
}

.btn:hover {
    background-color: var(--accent-gold);
    color: #1a1f1a;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
}

/* --- GALLERY GRID --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.media-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.media-card:hover { transform: translateY(-8px); }

.media-content {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.video-container { position: relative; }
.video-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
    background: rgba(0,0,0,0.2);
    color: #fff; font-size: 3rem;
    pointer-events: none;
}

.download-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.btn-download-small {
    background: rgba(0,0,0,0.6);
    color: var(--accent-gold);
    padding: 8px;
    border-radius: 50%;
    border: 1px solid var(--accent-gold);
    width: 35px; height: 35px;
    display: flex; justify-content: center; align-items: center;
    text-decoration: none;
}

/* --- LIGHTBOX --- */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 15, 10, 0.98);
    z-index: 10000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border: 1px solid var(--accent-gold);
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

.prev-btn, .next-btn {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    font-size: 3rem; color: var(--accent-gold);
    cursor: pointer; padding: 20px;
    user-select: none; transition: 0.3s;
}
.prev-btn { left: 10px; }
.next-btn { right: 10px; }
.prev-btn:hover, .next-btn:hover { color: #fff; }

.close-btn {
    position: absolute;
    top: 20px; right: 30px;
    color: #fff; font-size: 40px; cursor: pointer;
}

.lightbox-controls {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* --- LOGIN SPEZIFISCH --- */
.login-wrapper {
    height: 80vh; /* Nutzt fast die ganze Bildschirmhöhe */
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    border: 1px solid var(--accent-green);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.login-box p {
    margin-bottom: 30px;
    font-style: italic;
    color: var(--text-primary);
}

.login-box input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    background: #1a1f1a;
    border: 1px solid var(--accent-gold);
    border-radius: 4px;
    color: white;
    font-family: var(--font-body);
    box-sizing: border-box; /* Wichtig für das Padding */
    outline: none;
}

.login-box input:focus {
    box-shadow: 0 0 8px var(--accent-gold);
}

.btn-large {
    width: 100%;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.flash-msg {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.animated-fade { animation: fadeIn 0.4s ease-in; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(45%, 1fr)); gap: 10px; }
    .media-content { height: 200px; }
    .prev-btn, .next-btn { font-size: 2rem; }
}

@font-face {
    font-family: 'Eternal';
    src: url('fonts/EternalCall.ttf') format('truetype');
    font-style: normal;
}

@font-face {
    font-family: 'Scriptin';
    src: url('fonts/SCRIPTIN.ttf') format('truetype');
    font-style: normal;
}