/* ==========================================================================
   1. GRUNDDESIGN & ALLGEMEINE ELEMENTE
   ========================================================================== */
body { 
    font-family: sans-serif; 
    background: #f4f6f9; 
    margin: 0; 
    padding: 20px; 
    box-sizing: border-box;
}

/* System-Benachrichtigungen (Erfolg / Fehler) */
.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: bold;
    font-size: 14px;
}
.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


/* ==========================================================================
   2. FORMULAR- & ADMIN-LAYOUTS (login.php / eingabe.php / bearbeiten.php)
   ========================================================================== */
.container { 
    max-width: 600px; 
    background: white; 
    margin: 0 auto; 
    padding: 30px; 
    border-radius: 8px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
}

.header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 2px solid #eee; 
    padding-bottom: 15px; 
    margin-bottom: 20px; 
}

.logout-btn { 
    color: #dc3545; 
    text-decoration: none; 
    font-weight: bold; 
}

.form-group { 
    margin-bottom: 20px; 
}

.form-group label { 
    display: block; 
    margin-bottom: 5px; 
    font-weight: bold; 
    color: #333; 
}

.form-group input, 
.form-group select { 
    width: 100%; 
    padding: 10px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    box-sizing: border-box; 
    font-size: 15px; 
}

.submit-btn { 
    background: #28a745; 
    color: white; 
    border: none; 
    padding: 12px 20px; 
    border-radius: 4px; 
    cursor: pointer; 
    font-size: 16px; 
    width: 100%; 
    font-weight: bold; 
}
.submit-btn:hover { 
    background: #218838; 
}

.hint { 
    font-size: 13px; 
    color: #666; 
    margin-top: 5px; 
}


/* ==========================================================================
   3. BANNER & BILDWECHSLER (index.php)
   ========================================================================== */
.site-banner {
    position: relative;
    width: 100%;
    height: 300px;
    background: #111;
    margin-bottom: 20px;
}

.banner-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Alle Slides liegen unsichtbar übereinander */
.banner-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

/* Nur das aktive Bild wird sichtbar */
.banner-slider .slide.active {
    opacity: 0.4;
    z-index: 2;
}

.banner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 3;
    width: 90%;
}
.banner-overlay h1 { 
    font-size: 2.5rem; 
    margin: 0 0 10px 0; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8); 
}

/* Grüner Admin-Button im Startseiten-Banner */
.admin-banner-btn {
    display: inline-block;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    font-weight: bold;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    transition: transform 0.2s, background-color 0.2s;
}
.admin-banner-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
}


/* ==========================================================================
   4. SUCH- & FILTERLEISTE (index.php)
   ========================================================================== */
.search-filter-section {
    /* max-width: 1200px; */
	max-width: 100%;
    margin: 0 auto 30px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.search-container input {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-container input:focus {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.2);
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filter-btn {
    background: #fff;
    border: 2px solid #ddd;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    color: #555;
    transition: all 0.2s ease;
}
.filter-btn:hover {
    border-color: #007bff;
    color: #007bff;
}
.filter-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}


/* ==========================================================================
   5. TONTRÄGER GRID & KARTEN (index.php)
   ========================================================================== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.tontraeger-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}
.tontraeger-card:hover { 
    transform: translateY(-5px); 
}

/* Klickbarer Bereich innerhalb der karte */
.card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 1. Der Container gibt das vorgegebene Maß starr vor */
.card-cover {
    width: 100%;
    height: 220px;          /* Feste Höhe für absolut einheitliche Kacheln */
    overflow: hidden;       /* Verhindert, dass ungerade Bilder herausragen */
    background: #e9ecef;    /* Heller Standard-Hintergrund */
    position: relative;
}

/* 2. Das Bild passt sich an: Kleine werden vergrößert, große perfekt eingepasst */
.card-cover img {
    width: 100%;
    height: 100%;           /* Nutzt exakt die 220px Höhe des Containers */
    object-fit: cover;      /* Füllt das Quadrat komplett aus ohne Streifen */
}

/* 3. Der Platzhalter für Tonträger ohne Cover */
.cover-placeholder {
    width: 100%;
    height: 100%;           /* Nutzt ebenfalls die Container-Höhe */
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
}

.card-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.badge-format {
    background: #007bff;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    align-self: flex-start;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.card-info h3 { 
    margin: 0 0 5px 0; 
    font-size: 16px; 
    color: #222; 
}

.album-title { 
    margin: 0 0 10px 0; 
    color: #555; 
    font-size: 14px; 
    flex-grow: 1; 
}

.release-year { 
    margin: 0; 
    font-size: 12px; 
    color: #888; 
    border-top: 1px solid #eee; 
    padding-top: 5px; 
}


/* ==========================================================================
   6. DETAILSEITE MODERNE TABELLE (details.php)
   ========================================================================== */
.detail-container {
    max-width: 850px;
    margin: 40px auto;
}

.back-btn {
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
    font-size: 15px;
}

.detail-layout {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.detail-cover {
    flex: 1;
    min-width: 280px;
}

/* BILD-KORREKTUR: Zeigt auch das große Cover vollständig an */
.detail-cover img {
    width: 100%;
    max-width: 350px;
    height: auto;
    aspect-ratio: 1/1;
    border-radius: 12px;
    object-fit: contain; /* Ganzes Bild ohne Beschnitt */
    background: #212529; /* Dunkler Hintergrund für die Ränder */
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.cover-placeholder.large {
    width: 100%;
    max-width: 350px;
    height: auto;
    aspect-ratio: 1/1;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    font-size: 1.4rem;
    color: #6c757d;
}

.detail-info {
    flex: 1.5;
    min-width: 280px;
}

.detail-title { 
    margin: 0 0 20px 0; 
    font-size: 2.2rem; 
    color: #111; 
    border-bottom: 2px solid #f4f6f9;
    padding-bottom: 10px;
}

/* Tabellen-Struktur für Detaildaten */
.details-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.details-table tr {
    border-bottom: 1px solid #eaeaea;
}

.details-table tr:last-child {
    border-bottom: none;
}

.details-table th, 
.details-table td {
    padding: 12px 5px;
    font-size: 15px;
    text-align: left;
    vertical-align: middle;
}

.details-table th {
    color: #666;
    font-weight: bold;
    width: 35%;
}

.details-table td {
    color: #222;
}

.text-muted {
    color: #999;
    font-style: italic;
}

/* Admin-Aktionsbuttons auf Detailseite */
.admin-actions {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    border-top: 1px dashed #ddd;
    padding-top: 25px;
}

.btn-edit, .btn-delete {
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    flex: 1;
    transition: background 0.2s;
}

.btn-edit {
    background: #ffc107;
    color: #212529;
}
.btn-edit:hover { 
    background: #e0a800; 
}

.btn-delete {
    background: #dc3545;
    color: white;
}
.btn-delete:hover { 
    background: #bd2130; 
}


/* ==========================================================================
   7. FOOTER-BEREICH
   ========================================================================== */
.site-footer {
    background: #222;
    color: #aaa;
    text-align: center;
    padding: 30px 20px;
    margin-top: auto;
    font-size: 14px;
}

.admin-link { 
    color: #007bff; 
    text-decoration: none; 
}
.admin-link:hover { 
    text-decoration: underline; 
}
