.detail-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.detail-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.detail-top {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.detail-cover {
    flex-shrink: 0;
}

.detail-cover img {
    width: 180px;
    height: 270px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.detail-header-info {
    flex: 1;
}

.detail-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.3;
}

.detail-authors {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.detail-meta-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.detail-meta-list span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-description {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.detail-description h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 600;
}

.detail-description p {
    line-height: 1.7;
    color: #555;
    font-size: 14px;
}

.edit-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Rating Sterne - wie in Bibliothek */
.rating-container {
    margin-bottom: 30px;
}

.rating-stars {
    display: flex;
    gap: 5px;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.rating-stars input[type="radio"] {
    display: none;
}

.rating-stars label {
    font-size: 32px;
    cursor: pointer;
    color: #ddd;
    transition: color 0.2s, transform 0.1s;
}

.rating-stars label:hover,
.rating-stars label:hover ~ label {
    color: #ffd700;
}

.rating-stars input[type="radio"]:checked ~ label {
    color: #ffd700;
}

/* Gefüllte Sterne für checked */
.rating-stars input[type="radio"]:checked ~ label::before {
    content: "★";
}

.rating-stars label::before {
    content: "★";
}

/* Kategorie Input-Style mit X-Button */
.categories-section {
    margin-bottom: 30px;
}

.category-input-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    min-height: 50px;
    cursor: text;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.category-tag input[type="checkbox"] {
    display: none;
}

.category-remove {
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    transition: opacity 0.2s;
}

.category-remove:hover {
    opacity: 0.6;
}

.category-options {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
}

.category-options-title {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.category-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.category-checkbox-item label {
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 15px;
}

.btn {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #4285f4;
    color: white;
    border-color: #4285f4;
}

.btn-primary:hover {
    background: #3367d6;
    border-color: #3367d6;
}

.btn-secondary {
    background: #666;
    color: white;
    border-color: #ddd;
    width: 32px;
    height: 32px;
}
.btn-secondary.cancel {
  height: unset;
}

.btn-secondary:hover {
    background: #555;
    border-color: #999;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #4285f4;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}
.btn-detail {
    background: #17a2b8;
    color: white;
}
.btn-delete {
    background: #b02a37;
    color: white;
}
.btn-detail,.btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
    text-align: end;
}

