/* =====================================================================
   lochj.de  Astrofotografie  -  Stylesheet (dunkles Deep-Space-Theme)
   ===================================================================== */
:root {
    --bg:        #070a14;
    --bg-2:      #0d1122;
    --panel:     #121734;
    --panel-2:   #1a2044;
    --border:    #26305e;
    --text:      #e8ecf7;
    --muted:     #99a2c4;
    --accent:    #6ea8ff;
    --accent-2:  #b38bff;
    --danger:    #ff6b81;
    --ok:        #4ade80;
    --radius:    14px;
    --shadow:    0 10px 30px rgba(0,0,0,.45);
    --wrap:      1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: radial-gradient(1200px 800px at 70% -10%, #16204a 0%, var(--bg) 55%) fixed;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* dezenter Sternenhintergrund */
.stars {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 20% 30%, #fff, transparent),
        radial-gradient(1px 1px at 60% 70%, #cfe0ff, transparent),
        radial-gradient(1.5px 1.5px at 80% 20%, #fff, transparent),
        radial-gradient(1px 1px at 40% 80%, #dfe8ff, transparent),
        radial-gradient(1px 1px at 90% 60%, #fff, transparent),
        radial-gradient(1px 1px at 10% 60%, #bcd0ff, transparent);
    background-size: 400px 400px, 350px 350px, 500px 500px, 300px 300px, 450px 450px, 380px 380px;
    opacity: .5;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ---- Header / Navigation ------------------------------------------ */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(9,12,24,.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-logo { font-size: 1.7rem; color: var(--accent-2); filter: drop-shadow(0 0 8px rgba(179,139,255,.6)); }
.brand-text { font-weight: 700; font-size: 1.25rem; letter-spacing: .3px; line-height: 1; }
.brand-text .accent { color: var(--accent); }
.brand-text small { display: block; font-size: .62rem; font-weight: 500; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; margin-top: 3px; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
    color: var(--muted); padding: 8px 13px; border-radius: 9px;
    font-size: .95rem; font-weight: 500; transition: all .15s;
}
.main-nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.main-nav a.active { color: var(--text); background: var(--panel-2); }
.main-nav .nav-login, .main-nav .nav-admin {
    border: 1px solid var(--border); color: var(--accent); margin-left: 6px;
}
.nav-toggle, .nav-burger { display: none; }

/* ---- Layout -------------------------------------------------------- */
.site-main { padding: 34px 20px 60px; min-height: 60vh; }

.page-title { font-size: 2rem; margin: 0 0 6px; letter-spacing: .3px; }
.page-lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 28px; }

.panel {
    background: linear-gradient(180deg, var(--panel), var(--bg-2));
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px; box-shadow: var(--shadow);
}

/* ---- Flash-Meldungen ---------------------------------------------- */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; border: 1px solid var(--border); }
.flash-info    { background: #16204a; }
.flash-success { background: #103021; border-color: #1f6f47; color: #b8f5d0; }
.flash-error   { background: #351320; border-color: #7a2740; color: #ffc2cd; }

/* ---- Buttons ------------------------------------------------------- */
.btn {
    display: inline-block; cursor: pointer;
    background: linear-gradient(180deg, var(--accent), #4f86e6);
    color: #06122e; font-weight: 600; border: none;
    padding: 10px 18px; border-radius: 10px; font-size: .95rem;
    transition: transform .1s, filter .15s;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: linear-gradient(180deg, #ff6b81, #e0455f); color: #2a0a11; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }

/* ---- Startseite / Hero -------------------------------------------- */
.hero { text-align: center; padding: 30px 0 10px; }
.hero-quote { font-size: 1.35rem; font-style: italic; color: #cdd8ff; max-width: 760px; margin: 0 auto 8px; }
.hero-quote-author { color: var(--muted); font-size: .95rem; margin-bottom: 30px; }

/* ---- Bilder-Slideshow --------------------------------------------- */
.slideshow {
    position: relative; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border); box-shadow: var(--shadow);
    aspect-ratio: 16 / 9; background: #05070f;
}
.slideshow .slide {
    position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease;
    display: flex; align-items: center; justify-content: center;
}
.slideshow .slide img { width: 100%; height: 100%; object-fit: cover; }
.slideshow .slide.active { opacity: 1; }
.slideshow .slide-caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: linear-gradient(0deg, rgba(5,7,15,.9), transparent);
    padding: 40px 24px 18px; text-align: left;
}
.slideshow .slide-caption h3 { margin: 0; font-size: 1.2rem; }
.slideshow .slide-caption p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.slide-dots { position: absolute; bottom: 12px; right: 16px; display: flex; gap: 7px; }
.slide-dots button { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255,255,255,.35); cursor: pointer; padding: 0; }
.slide-dots button.active { background: var(--accent); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 44px 0 18px; }
.section-head h2 { margin: 0; font-size: 1.5rem; }

/* ---- Blog-/Bilder-Raster ------------------------------------------ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.card {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; transition: transform .18s, border-color .18s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card a { color: inherit; }
.card a:hover { text-decoration: none; }
.card-thumb { aspect-ratio: 4 / 3; background: #05070f; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px 16px; }
.card-body h3 { margin: 0 0 4px; font-size: 1.08rem; }
.card-meta { color: var(--muted); font-size: .82rem; }
.card-object { display: inline-block; background: var(--panel-2); color: var(--accent); font-size: .72rem; padding: 2px 8px; border-radius: 20px; margin-top: 8px; }

/* ---- Einzelbild-Ansicht ------------------------------------------- */
.post-header { margin-bottom: 20px; }
.post-image-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); cursor: zoom-in; box-shadow: var(--shadow); }
.post-image-wrap img { display: block; max-width: 100%; height: auto; }
.post-extra { margin: 28px 0 0; }
.post-extra .post-image-wrap { display: inline-block; max-width: 100%; }
.post-extra figcaption { margin-top: 8px; color: var(--muted); font-size: .92rem; }
.post-layout { display: grid; grid-template-columns: 1fr; gap: 26px; }
.post-desc { font-size: 1.05rem; }

.param-table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.param-table th, .param-table td { text-align: left; padding: 11px 15px; border-bottom: 1px solid var(--border); vertical-align: top; }
.param-table tr:last-child th, .param-table tr:last-child td { border-bottom: none; }
.param-table th { width: 38%; color: var(--muted); font-weight: 600; background: rgba(255,255,255,.02); }

/* ---- Lightbox ------------------------------------------------------ */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(3,5,12,.95); display: none; align-items: center; justify-content: center; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 96vw; max-height: 92vh; width: auto; height: auto; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.7); }
.lightbox-close { position: absolute; top: 20px; right: 28px; font-size: 2.4rem; color: #fff; cursor: pointer; line-height: 1; background: none; border: none; }

/* ---- Formulare ----------------------------------------------------- */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .92rem; }
.form-row input[type=text], .form-row input[type=password], .form-row input[type=date],
.form-row input[type=email], .form-row select, .form-row textarea {
    width: 100%; padding: 10px 13px; border-radius: 9px;
    background: var(--bg-2); border: 1px solid var(--border); color: var(--text); font-size: .95rem; font-family: inherit;
}
.form-row textarea { min-height: 120px; resize: vertical; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-hint { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.auth-box { max-width: 400px; margin: 40px auto; }

/* ---- Prosa (Seiteninhalte) ---------------------------------------- */
.prose { font-size: 1.05rem; }
.prose h2 { margin-top: 32px; font-size: 1.4rem; }
.prose h3 { margin-top: 24px; }
.prose img { border-radius: 10px; margin: 18px 0; border: 1px solid var(--border); }
.prose ul { padding-left: 22px; }

/* ---- Admin --------------------------------------------------------- */
.admin-layout { display: grid; grid-template-columns: 210px 1fr; gap: 28px; align-items: start; }
.admin-side { position: sticky; top: 90px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.admin-side a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.admin-side a:hover, .admin-side a.active { background: var(--panel-2); color: var(--text); text-decoration: none; }
.admin-side hr { border: none; border-top: 1px solid var(--border); margin: 10px 0; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.data-table th { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .5px; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: .75rem; background: var(--panel-2); }
.tag-admin { background: #2a1d4a; color: var(--accent-2); }
.tag-off { background: #351320; color: var(--danger); }
.inline-form { display: inline; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 18px; margin-bottom: 8px; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card .num { font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-card .lbl { color: var(--muted); font-size: .9rem; }

/* ---- Footer -------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; background: rgba(9,12,24,.6); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; padding: 22px 20px; color: var(--muted); font-size: .9rem; flex-wrap: wrap; gap: 10px; }
.footer-links a { margin-left: 16px; color: var(--muted); }

/* ---- Responsiv ----------------------------------------------------- */
@media (max-width: 820px) {
    .nav-burger { display: block; font-size: 1.6rem; cursor: pointer; color: var(--text); }
    .main-nav {
        position: absolute; top: 68px; left: 0; right: 0; flex-direction: column;
        background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 10px 16px;
        display: none;
    }
    .nav-toggle:checked ~ .main-nav { display: flex; }
    .main-nav a { padding: 12px; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-side { position: static; }
    .form-grid { grid-template-columns: 1fr; }
}
@media (min-width: 720px) {
    .post-layout.has-side { grid-template-columns: 1.6fr 1fr; }
}
