:root {
    --bg: #f0f2f5;
    --text: #1c1e21;
    --primary: #007bff;
    --primary-dark: #0056b3;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: #24292e;
    color: white;
    padding: 2.5rem 0;
    text-align: center;
}

.main-header h1 { font-size: 2.2rem; margin-bottom: 0.5rem; }

/* Filter Bar */
.filter-bar {
    background: var(--white);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.search-form input, .search-form select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    flex: 1;
    min-width: 200px;
}

.btn-search {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-search:hover { background: var(--primary-dark); }

.btn-reset {
    background: #6c757d;
    color: white;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 6px;
    display: flex;
    align-items: center;
}

/* Grid & Cards */
.tatu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

.tatu-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.tatu-card:hover { transform: translateY(-5px); }

.tatu-img-container {
    aspect-ratio: 3/4;
    background: #f8f9fa;
    overflow: hidden;
}

.tatu-img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Zeigt das ganze Taschentuch ohne Anschnitt */
    padding: 5px;
}

.tatu-info { padding: 18px; flex-grow: 1; display: flex; flex-direction: column; }

.badge {
    background: #e7f3ff;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 20px;
    align-self: flex-start;
    margin-bottom: 10px;
}

.tatu-info h3 { font-size: 1.15rem; margin-bottom: 8px; color: #333; }

.bemerkung {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
    color: #999;
    display: flex;
    justify-content: space-between;
}

/* Pagination */
.pagination {
    margin: 4rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.btn-nav {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
}

.btn-nav:hover { background: var(--primary); color: white; }

.no-results { text-align: center; padding: 5rem; color: #666; font-size: 1.2rem; }

.main-footer { text-align: center; padding: 3rem; color: #888; font-size: 0.9rem; }
/* Upload Erweiterungen */
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.btn-upload {
    background: #28a745;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-upload:hover { background: #218838; }

.upload-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}

.upload-form .form-group { margin-bottom: 1.5rem; }
.upload-form label { display: block; margin-bottom: 0.5rem; font-weight: bold; }
.upload-form input, .upload-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.form-row { display: flex; gap: 15px; }
.form-row .form-group { flex: 1; }

.success { background: #d4edda; color: #155724; padding: 15px; border-radius: 6px; margin-bottom: 1rem; }
.error { background: #f8d7da; color: #721c24; padding: 15px; border-radius: 6px; margin-bottom: 1rem; }
