/* Friendica Smart-Archive: WriteFreely Theme
   Minimalist, Typography-focused, Clean
*/

:root {
    --wf-body: #ffffff;
    --wf-text: #111111;
    --wf-meta: #777777;
    --wf-link: #555555;
    --wf-primary: #222222;
    --wf-border: #eeeeee;
    /* Schriften wie bei WriteFreely */
    --font-serif: "Lora", Georgia, "Times New Roman", serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Basis Setup */
body {
    font-family: var(--font-serif);
    line-height: 1.8;
    color: var(--wf-text);
    background-color: var(--wf-body);
    margin: 0; padding: 0;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 680px; margin: 0 auto; padding: 0 25px; }

/* HEADER - WriteFreely Style (sehr dezent) */
.main-header {
    padding: 80px 0 40px;
    text-align: center;
}

h1 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: -1px;
}

h1 a {
    color: var(--wf-text);
    text-decoration: none;
}

.subtitle {
    margin-top: 15px;
    color: var(--wf-meta);
    font-size: 1rem;
    font-family: var(--font-sans);
    font-style: italic;
}

/* BEITRAGS-LISTE (Keine Karten mehr, nur Trennung) */
.post {
    padding: 60px 0;
    border-bottom: 1px solid var(--wf-border);
}

.post:last-child { border-bottom: none; }

.post-content {
    font-size: 1.25rem;
    word-wrap: break-word;
}

/* Typography Details */
.post-content p { margin-bottom: 1.5em; }
.post-content a { color: var(--wf-link); text-decoration: underline; }

/* MEDIEN - WriteFreely mäßig eingebettet */
.post-media { margin: 30px 0; }
.post-media img, .post-media video {
    display: block; width: 100%; height: auto;
    border-radius: 2px; /* Fast eckig */
    cursor: zoom-in;
}

.video-container {
    position: relative; padding-bottom: 56.25%; height: 0;
    overflow: hidden; margin: 30px 0;
}
.video-container iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}

/* META INFORMATIONEN */
.post-meta {
    margin-top: 30px;
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--wf-meta);
}

.post-meta a {
    color: var(--wf-meta);
    text-decoration: none;
    font-weight: bold;
}
.post-meta a:hover { color: var(--wf-text); }

/* LOADING & INFINITY SCROLL STYLES */
.loading, .scroll-loader {
    text-align: center;
    padding: 60px 0;
    font-family: var(--font-sans);
}

.spinner {
    border: 2px solid rgba(0,0,0,0.05);
    width: 25px; height: 25px;
    border-radius: 50%;
    border-left-color: var(--wf-text);
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* LIGHTBOX (Funktion bleibt identisch) */
.lightbox {
    display: none; position: fixed; z-index: 2000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.98); /* Heller Lightbox-Stil passend zum Theme */
    overflow: hidden; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.3s ease;
}

.lightbox.active { display: flex; opacity: 1; }
.lightbox-content {
    max-width: 95%; max-height: 95%;
    transition: transform 0.1s ease-out;
    cursor: grab;
}

.lightbox-close {
    position: absolute; top: 20px; right: 30px;
    color: #000; font-size: 35px; cursor: pointer;
}

/* BACK TO TOP & DEKO */
#backToTop {
    display: none; position: fixed; bottom: 40px; right: 40px;
    background: var(--wf-text); border: none; width: 40px; height: 40px;
    border-radius: 50%; cursor: pointer; opacity: 0.7; transition: 0.3s;
}
#backToTop:hover { opacity: 1; }

#background-icon {
    display: none; /* WriteFreely ist zu minimal für das Background-Icon */
}

.main-footer {
    padding: 100px 0;
    text-align: center;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--wf-meta);
}

/* DARK MODE (Optionaler Support) */
@media (prefers-color-scheme: dark) {
    :root {
        --wf-body: #111111;
        --wf-text: #eeeeee;
        --wf-meta: #888888;
        --wf-link: #bbbbbb;
        --wf-border: #222222;
    }
    .lightbox { background-color: rgba(0,0,0,0.95); }
    .lightbox-close { color: #fff; }
}

/* Paginierung Styling */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 60px 0;
    font-family: var(--font-sans);
}

.nav-btn {
    background: transparent;
    border: 1px solid var(--wf-border);
    padding: 8px 20px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--wf-text);
    transition: all 0.2s;
}

.nav-btn:hover:not(:disabled) {
    border-color: var(--wf-text);
    background: #fdfdfd;
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#pageInfo {
font-size: 0.85rem;
color: var(--wf-meta);
text-transform: uppercase;
letter-spacing: 1px;
}
