/* styles.css */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 70px auto 20px; /* Obere Margin für Suchcontainer */
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h1 {
    color: #444;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th {
    background-color: #e0e0e0;
    padding: 10px;
    text-align: left;
}

td {
    padding: 5px;
    border-bottom: 1px solid #eee;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #F90;
}

.download-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.download-btn:hover {
    background-color: #45a049;
}

.counter {
    text-align: right;
    font-size: 0.8em;
    color: #777;
    margin-top: 20px;
}

.error {
    color: #d32f2f;
    padding: 10px;
    background-color: #ffebee;
    border-radius: 4px;
}

/* ========== OPTIMIERTER SUCHCONTAINER ========== */
.search-container-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: white;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

#searchInput {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 250px;
    font-size: 14px;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* ========== SORTIERBARE SPALTEN ========== */
th {
    position: relative;
    padding-right: 25px !important;
}

th::after {
    content: "⇅";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
    opacity: 0.3;
}

th.sorted-asc::after {
    content: "↑";
    opacity: 1;
}

th.sorted-desc::after {
    content: "↓";
    opacity: 1;
}

th:hover::after {
    opacity: 0.8;
}

/* ========== GRÖSSEN-SPALTE ========== */
td:nth-child(5) {
    text-align: right;
    font-family: 'Courier New', monospace;
    padding-right: 15px;
    white-space: nowrap;
    font-size: 12px;
    letter-spacing: -1px;
}

/* ========== LADEANIMATION ========== */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loader-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}