/* assets/style.css */

/* ===== Grundlayout ===== */
body.dark-bg {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #050405;
    background-image:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.06), transparent 55%),
        linear-gradient(180deg, #050405, #111018);
    color: #f5f3e9;
}

a {
    color: #f0c674;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===== Header / Footer ===== */
.main-header {
    padding: 24px 16px 18px;
    background: radial-gradient(circle at top, #3a2818, #1b130d 55%, #120c08);
    border-bottom: 3px solid #a56a30;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
    text-align: center;
}

.main-header h1 {
    margin: 0;
    font-family: "Georgia", "Times New Roman", serif;
    font-size: 2.4rem;
    letter-spacing: 1px;
    color: #fbe7c2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.subtitle {
    margin-top: 6px;
    color: #d0c4a5;
    font-size: 0.95rem;
}

.main-header nav {
    margin-top: 12px;
}

.main-header nav a {
    margin: 0 10px;
    font-weight: 500;
    font-size: 0.95rem;
}

.main-footer {
    text-align: center;
    padding: 18px;
    background: #140d08;
    border-top: 2px solid #a56a30;
    color: #c2b79b;
    font-size: 0.9rem;
}

/* ===== Content ===== */
.content {
    max-width: 1000px;
    margin: 28px auto 40px;
    padding: 0 18px 20px;
}

/* ===== Bücherliste / Regal ===== */


/* „Regalbrett“-Karte */
.book-card {
    display: flex;
    gap: 18px;
    margin: 24px 0;

    padding: 16px 24px;  /* Innenabstand zum Rahmen */

    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 55%),
        linear-gradient(135deg, #130b06, #24130b);
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.85),
        inset 0 0 0 1px rgba(0, 0, 0, 0.5);

    border-radius: 0;

    /* KEIN border-image mehr */
    border: none;

    position: relative;
    z-index: 0;  /* Basis für das Overlay */
}

/* Rahmen-Overlay über dem gesamten Post */
.book-card::before {
    content: "";
    position: absolute;
    top: -20px;    /* wie weit der Rahmen nach außen ragt */
    left: -18px;
    right: -18px;
    bottom: -20px;

    background-image: url("frame.png");
    background-repeat: no-repeat;
    background-size: 100% 100%;  /* Bild auf die gesamte Fläche strecken */

    pointer-events: none;  /* nichts anklickbares blockieren */
    z-index: 10;            /* über Inhalt + book-link */
}

/*fuizgiuwejdshdfiuazsefuzasdgdfoauhseioufz

/* erste Karte nicht extra vom vorherigen Balken absetzen, wenn du magst */


/* Horizontales Regalbrett über jedem Post */



/* dezente Vignette innen */


/* Link-Wrapper um das ganze Regalbrett */
.book-link {
    display: flex;
    width: 100%;
    gap: 18px;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 1;
}

.book-link:hover .book-title {
    text-decoration: underline;
}

/* ===== linke Seite (Cover + Sterne) ===== */
.book-left {
    flex: 0 0 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;  /* Cover oben, Sterne unten */
    align-items: center;
    z-index: 1;
}


.book-cover-frame {
    width: 130px;
    height: 195px;
    padding: 7px;
    background: radial-gradient(circle at top left, #5c3b22, #2b1a0f);
    border-radius: 10px;
    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.9),
        inset 0 0 6px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover-frame img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
    display: block;
}

.cover-placeholder {
    font-size: 0.8rem;
    color: #c2b79b;
    text-align: center;
}

.book-rating {
    margin-top: 0px;
}

/* Sterne */
.star {
    position: relative;
    display: inline-block;
    font-size: 1.05rem;
    color: #555; /* leere Sterne */
}

.star.full {
    color: #f0c674; /* volle Sterne */
}

.star.empty {
    color: #555;
}

.star.half {
    color: #555;
}

.star.half::before {
    content: '★';
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #f0c674; /* linke Hälfte golden */
}

.rating-number {
    margin-left: 6px;
    font-size: 0.9rem;
    color: #c2b79b;
}

/* ===== rechte Seite des Posts ===== */
.book-right {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    z-index: 1;
}


/* Titel links, Kategorie ganz rechts */
.book-right-header {
    display: flex;
    align-items: baseline;
    width: 100%;
    margin-bottom: 2px; 
}

.book-title {
    margin: 0;
    font-family: "Georgia", "Times New Roman", serif;
    font-size: 1.5rem;
    color: #fbe7c2;
}

/* Kategorie rechts, optisch wie Untertitel */
.book-category-badge {
    margin-left: auto;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fbe7c2;
    white-space: nowrap;
}

/* Autor unter dem Titel */
.book-author {
    margin: 0 0 0px;  
    font-size: 0.95rem;
    color: #e0d0a8;
    font-style: italic;
}

/* Kurzbeschreibung */
.book-description {
    margin-top: 0;
    margin-bottom: 5px;
    white-space: pre-line;
    line-height: 1.0;
}

/* Datum links, Seiten rechts */
.book-meta {
    margin-top: auto;        /* drückt die Zeile ganz nach unten */
    padding-top: 8px;        /* kleiner Abstand zum Textblock */
    font-size: 0.85rem;
    color: #c2b79b;
    display: flex;
    align-items: baseline;
    width: 100%;
}

.meta-pages {
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
}

/* Inline-Infos für Detailseite */
.book-category-inline,
.book-pages-inline {
    font-size: 0.95rem;
    color: #d0c4a5;
    font-style: italic;
    margin-left: 4px;
}

/* ===== Login / Register / Admin ===== */
.login-container {
    max-width: 420px;
    margin: 80px auto;
    background: #23160e;
    padding: 22px;
    border-radius: 14px;
    border: 1px solid #a56a30;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.85);
}

.login-container h1,
.login-container h2 {
    margin-top: 0;
    text-align: center;
}

.login-container label {
    display: block;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.login-container input[type="text"],
.login-container input[type="password"],
.login-container input[type="email"] {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #8b5a2b;
    background: #1b130d;
    color: #f5f3e9;
}

.login-container button {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border-radius: 6px;
    border: none;
    background: #b67a3b;
    color: #f5f3e9;
    font-weight: 600;
    cursor: pointer;
}

.login-container button:hover {
    background: #d39a59;
}

.error {
    background: #7b1c1c;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 10px;
}

/* Admin-Bereich */
.admin-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.admin-form-section,
.admin-list-section {
    background: #23160e;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid #8b5a2b;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
}

/* Regal-Hintergrund für die gesamte Bücherliste */




/* Deko: Efeu links und rechts */
body.dark-bg::before,
body.dark-bg::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    width: 220px;
    pointer-events: none;  /* nichts blockieren */
    z-index: 5;
    background-repeat: no-repeat;
    background-position: top;
}

/* linke Efeu-Seite */
body.dark-bg::before {
    left: 0;
    background-image: url("ivy-left.png");
}

/* rechte Efeu-Seite */
body.dark-bg::after {
    right: 0;
    background-image: url("ivy-right.png");
}


/* Karten selbst etwas abheben, aber Hintergrund durchscheinen lassen */



.book-form label {
    display: block;
    margin-bottom: 12px;
}

.book-form input[type="text"],
.book-form input[type="number"],
.book-form textarea,
.book-form input[type="file"],
.book-form select {
    width: 100%;
    margin-top: 4px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #8b5a2b;
    background: #1b130d;
    color: #f5f3e9;
}

.book-form button {
    margin-top: 10px;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    background: #b67a3b;
    color: #f5f3e9;
    font-weight: 600;
    cursor: pointer;
}

.book-form button:hover {
    background: #d39a59;
}

.admin-cover-preview {
    margin-top: 8px;
    max-width: 120px;
    border-radius: 4px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #4b3621;
}

.admin-table th {
    text-align: left;
    background: #2a1c12;
}

.books-list {
    background: transparent;
    /* padding/margin kannst du lassen, wie es dir gefällt */
}


.books-list .book-card:first-child {
    margin-top: 48px;   /* oder 36px, wenn du oben mehr Luft möchtest */
}

.books-list .book-card:last-child {
    margin-bottom: 24px; /* oder 36px */
}




/* ===== responsive ===== */
@media (max-width: 700px) {
    .book-card {
        flex-direction: column;
        align-items: center;
    }

    .book-left {
        flex-direction: row;
        gap: 16px;
    }

    .book-right-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .book-category-badge {
        margin-left: 0;
        margin-top: 4px;
    }

    .book-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .meta-pages {
        margin-left: 0;
    }


}
