@import url('https://fonts.googleapis.com/css?family=Bungee|Hammersmith+One');

* { box-sizing: border-box; }

body {
    font-family: Helvetica, Arial, "Helvetica Neue", sans-serif;
    color: #F7F7F7;
    background: #252525;
    margin: 0;
}

header {
    font-family: 'Bungee', cursive;
    text-align: center;
    line-height: 30px;
    padding-top: 10px;
}

h1 { margin-bottom: 10px; }

.page {
    position: relative;
    width: 92%;
    margin: 0 auto;
    padding-bottom: 40px;
}

/* ---------- Navigation ---------- */
.view-nav {
    text-align: center;
    margin: 10px 0 25px;
}

.view-link {
    display: inline-block;
    padding: 8px 18px;
    margin: 0 4px;
    border-radius: 6px;
    color: #F7F7F7;
    text-decoration: none;
    background: #3F3F3F;
    font-family: 'Hammersmith One', sans-serif;
    font-size: 14px;
}

.view-link:hover,
.view-link.active {
    background: #8e352e;
}

.content-wrap { margin-top: 10px; }

.section-title {
    font-family: 'Hammersmith One', sans-serif;
    text-align: center;
    margin: 10px 0 20px;
}

.empty-hint {
    text-align: center;
    color: #B0B0B0;
    padding: 40px 0;
}

/* ---------- Wochenansicht (Tabelle) ---------- */
.head {
    width: 14.285%;
    height: 35px;
    font-size: 20px;
    font-family: 'Hammersmith One', sans-serif;
    text-align: center;
    vertical-align: middle;
    border-bottom: #646464 5px solid;
}

.footer {
    width: 14.285%;
    height: 30px;
    text-align: center;
    vertical-align: middle;
    border-top: #646464 5px solid;
    font-size: 10px;
    padding: 8px 0;
}

.tag1 { background: #ff8000; text-transform: uppercase; border-radius: 10px 0 0 0; }
.tag2 { background: #ffba02; text-transform: uppercase; }
.tag3 { background: #017fbc; text-transform: uppercase; }
.tag4 { background: #50baba; text-transform: uppercase; }
.tag5 { background: #017e80; text-transform: uppercase; }
.tag6 { background: #80bb23; text-transform: uppercase; }
.tag7 { background: #bc4c7e; text-transform: uppercase; border-radius: 0 10px 0 0; }

.divLineLeft { border-left: #646464 1px solid; border-left-style: dashed; }

.divTable { display: table; width: 100%; background: #333; border-radius: 10px; }
.divTableRow { display: table-row; }
.divTableCell { display: table-cell; vertical-align: top; }

.poster-image {
    margin-top: 8px;
    width: 100px;
    height: 141px;
    object-fit: cover;
    box-shadow: 5px 5px 12px #000000;
    display: block;
}

.release-cover-wrap { position: relative; display: inline-block; }

.release-providers {
    position: absolute;
    right: -8px;
    bottom: -8px;
    display: flex;
    gap: 3px;
    transform: translateX(50%);
}
.release-providers img {
    width: 46px;
    height: 46px;
    filter: drop-shadow(1px 1px 4px rgba(0,0,0,.7));
    object-fit: contain;
}

ol, ul { padding-left: 20px; list-style: none; margin: 0; }

.release { position: relative; padding: 0 0 10px 12px; }
.release .available-time { display: block; font-size: 12px; }
.release .season-name { margin: 0; font-size: 12px; }

.release:before {
    display: block; content: ""; position: absolute;
    left: -2px; top: 4px; bottom: -4px; width: 1px;
    background: rgba(206, 202, 202, .5);
}
.release:after {
    display: block; content: ""; position: absolute;
    left: -6px; top: 4px; width: 9px; height: 9px;
    border-radius: 5px; background: #cecaca;
}

.releases-empty { min-height: 20px; }

/* ---------- Season-Auswahl ---------- */
.select {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    margin-bottom: 15px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 2px 2px 8px rgba(0,0,0,.35);
}

.select select {
    font-family: 'Hammersmith One', sans-serif;
    font-weight: bold;
    padding: 10px 36px 10px 18px;
    outline: 0;
    border: none;
    background: #3F3F3F;
    color: #F7F7F7;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 180px;
    cursor: pointer;
}

.select_arrow {
    position: absolute;
    top: 50%;
    right: 108px;
    width: 0; height: 0;
    margin-top: -3px;
    pointer-events: none;
    border-style: solid;
    border-width: 7px 5px 0px 5px;
    border-color: #B0B0B0 transparent transparent transparent;
}

.select-submit {
    padding: 10px 20px;
    min-width: 92px;
    background: #8e352e;
    color: #F7F7F7;
    border: none;
    cursor: pointer;
    font-family: 'Hammersmith One', sans-serif;
    font-size: 13px;
}
.select-submit:hover { background: #a4423a; }

#links, #rechts { width: 300px; }
#links { float: left; }
#rechts { float: right; }
#mitte { margin: 0 300px; }

.site-footer {
    text-align: right;
    padding: 12px 4px;
    margin-top: 20px;
    color: #B0B0B0;
    font-size: 11px;
    border-top: #646464 5px solid;
}

/* ---------- Anime-Detail-Modal (reines CSS, kein JS: :target-Trick) ---------- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.8);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal:target { display: flex; }

.modal-content {
    position: relative;
    background: #2b2b2b;
    border-radius: 10px;
    max-width: 800px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,.6);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3F3F3F;
    border-radius: 50%;
    color: #F7F7F7;
    text-decoration: none;
    z-index: 1;
}
.modal-close:hover { background: #8e352e; }
.modal-close svg { width: 16px; height: 16px; }

.modal-body {
    display: flex;
    gap: 24px;
    padding: 28px;
}
.modal-cover {
    flex: 0 0 200px;
    width: 200px;
    height: 282px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 4px 4px 14px rgba(0,0,0,.5);
}
.modal-info { flex: 1; min-width: 0; }
.modal-info h2 {
    margin: 0 0 4px;
    font-family: 'Hammersmith One', sans-serif;
}
.modal-subtitle { color: #999; font-size: 13px; margin: 0 0 14px; }

.modal-facts {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px 16px;
    font-size: 13px;
}
.modal-facts strong { color: #C6C6C6; font-weight: normal; margin-right: 4px; }

.modal-description {
    font-size: 13px;
    line-height: 1.6;
    color: #DDD;
    margin: 0 0 18px;
}
.modal-description-empty { color: #888; font-style: italic; }

.modal-progress {
    font-size: 13px;
    color: #F7F7F7;
    background: #3F3F3F;
    border-left: 3px solid #8e352e;
    padding: 8px 12px;
    margin: 0 0 18px;
    border-radius: 4px;
}
.modal-progress-hint {
    display: block;
    font-size: 10px;
    color: #999;
    margin-top: 3px;
}

@media (max-width: 600px) {
    .modal-body { flex-direction: column; }
    .modal-cover { width: 140px; height: 198px; flex-basis: auto; }
}

/* ---------- Season-Grid (AniChart-artig) ---------- */
.season-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 25px;
    background: #333;
    padding: 14px 18px;
    border-radius: 8px;
}
.season-filter-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 11px;
    color: #C6C6C6;
}
.season-filter-field select {
    background: #3F3F3F;
    border: 1px solid #000;
    color: #F7F7F7;
    padding: 9px 12px;
    min-width: 170px;
    height: 38px;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: #8e352e;
    border: none;
    border-radius: 6px;
    color: #F7F7F7;
    cursor: pointer;
    text-decoration: none;
}
.icon-btn:hover { background: #a4423a; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn-ghost {
    background: transparent;
    border: 1px solid #646464;
    color: #C6C6C6;
}
.icon-btn-ghost:hover { background: #3F3F3F; color: #F7F7F7; }

.format-group-title {
    font-family: 'Hammersmith One', sans-serif;
    margin: 30px 0 14px;
    padding-bottom: 6px;
    border-bottom: 2px solid #8e352e;
}
.format-group-count { color: #999; font-size: 13px; font-weight: normal; }

.poster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
    margin-bottom: 10px;
}

.poster-card {
    display: block;
    background: #333;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: #F7F7F7;
    box-shadow: 3px 3px 10px rgba(0,0,0,.4);
    transition: transform .15s ease;
}
.poster-card:hover { transform: translateY(-3px); }

.poster-card-image { position: relative; width: 100%; aspect-ratio: 2 / 3; background: #222; }
.poster-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.poster-score {
    position: absolute; top: 6px; right: 6px;
    background: #8e352e; padding: 2px 7px;
    border-radius: 4px; font-size: 11px; font-weight: bold;
}

.poster-card-body { padding: 8px 10px 12px; }
.poster-title { font-size: 13px; margin: 0 0 4px; line-height: 1.3; font-family: 'Hammersmith One', sans-serif; }
.poster-meta, .poster-studio, .poster-date { margin: 2px 0; font-size: 11px; color: #C6C6C6; }

/* ---------- Monats-Grid ---------- */
.month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}
.month-nav-link { color: #F7F7F7; text-decoration: none; font-size: 13px; }
.month-nav-link:hover { color: #ff8000; }

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    background: #333;
    padding: 10px;
    border-radius: 10px;
}

.month-grid-head {
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    padding-bottom: 6px;
    color: #ffba02;
    text-transform: uppercase;
}

.month-cell {
    min-height: 110px;
    min-width: 0;
    background: #2b2b2b;
    border-radius: 6px;
    padding: 5px;
    max-height: 220px;
    overflow-y: auto;
}
.month-cell-empty { background: transparent; }
.month-cell-day { font-size: 11px; color: #999; margin-bottom: 4px; }

.month-cell-list { padding: 0; }
.month-cell-list li { margin-bottom: 4px; min-width: 0; }
.month-cell-list a {
    display: flex; align-items: center; gap: 4px;
    color: #F7F7F7; text-decoration: none; font-size: 10px;
    min-width: 0;
}
.month-cell-list img { width: 18px; height: 24px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }
.month-cell-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }

/* ---------- Admin: Login ---------- */
.login-page { max-width: 400px; }
.login-box {
    background: #333;
    border-radius: 10px;
    padding: 25px 30px;
    margin-top: 20px;
}

.form-error { color: #ff8080; text-align: center; }
.form-success { color: #a4d68a; text-align: center; margin-bottom: 15px; }

/* ---------- Admin: Formulare ---------- */
.admin-form { display: flex; flex-direction: column; gap: 4px; }
.admin-form label {
    font-size: 12px;
    color: #C6C6C6;
    margin-top: 10px;
}
.admin-form input[type="text"],
.admin-form input[type="url"],
.admin-form input[type="date"],
.admin-form input[type="time"],
.admin-form input[type="number"],
.admin-form input[type="password"],
.admin-form select {
    background: #3F3F3F;
    border: 1px solid #000;
    color: #F7F7F7;
    padding: 8px 10px;
    font-family: Helvetica, sans-serif;
}
.admin-form .form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}
.admin-form .btn { margin-top: 18px; align-self: flex-start; }

.btn {
    display: inline-block;
    padding: 8px 16px;
    background: #8e352e;
    color: #F7F7F7;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: 'Hammersmith One', sans-serif;
    font-size: 13px;
    border-radius: 4px;
}
.btn:hover { background: #a4423a; }
.btn-small { padding: 5px 10px; font-size: 12px; }
.btn-danger { background: #5c1a1a; }
.btn-danger:hover { background: #7a2424; }

/* ---------- Admin: Bearbeiten-Layout ---------- */
.edit-layout { display: flex; gap: 25px; align-items: flex-start; }
.edit-cover { flex: 0 0 160px; }
.edit-cover img { width: 100%; border-radius: 6px; box-shadow: 3px 3px 10px rgba(0,0,0,.4); }
.edit-fields { flex: 1; }

@media (max-width: 700px) {
    .edit-layout { flex-direction: column; }
    .admin-form .form-row { grid-template-columns: 1fr; }
}

/* ---------- Admin: Tabellen ---------- */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #333;
    border-radius: 8px;
    overflow: hidden;
}
.admin-table th, .admin-table td {
    padding: 8px 10px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid #444;
    vertical-align: middle;
}
.admin-table th {
    background: #2b2b2b;
    font-family: 'Hammersmith One', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
}
.admin-table select,
.admin-table input {
    background: #3F3F3F;
    border: 1px solid #000;
    color: #F7F7F7;
    padding: 5px 7px;
    font-size: 12px;
}
.admin-table-new-row { background: rgba(142, 53, 46, .15); }

.admin-thumb { width: 42px; height: 60px; object-fit: cover; border-radius: 3px; }
.admin-thumb-sm { width: 24px; height: 24px; object-fit: contain; }
.hint-empty { color: #888; font-style: italic; }
@media (max-width: 900px) {
    #links, #rechts { width: auto; float: none; }
    #mitte { margin: 10px 0; }
    header { display: flex; flex-direction: column; align-items: center; }
    .month-grid { grid-template-columns: repeat(7, minmax(40px, 1fr)); font-size: 10px; }
    .month-cell { min-height: 60px; }
    .month-cell-list img { display: none; }
}
