:root {
    --primary-blue: #2A5D9E;
    --primary-dark: #1e4578;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --bg-overlay: rgba(80, 80, 80, 0.8);
    --bg-overlay-dark: rgba(40, 40, 40, 0.95);
}

/* Base Reset & Typography */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    height: 100%;
    background: url('/hintergrund.webp') no-repeat center center fixed;
    background-size: cover;
}

/* Layout Containers */
.page-overlay {
    background: linear-gradient(to bottom, var(--bg-overlay), var(--bg-overlay-dark));
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    background: white;
    width: 100%;
    max-width: 800px;
    border-radius: 4px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    animation: fadeIn 0.5s ease-out;
}

/* Header & Branding */
.header {
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.sub-title {
    margin-top: 5px;
    color: var(--text-light);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Settings Area */
.settings-area {
    padding: 15px;
    background: #f9f9f9;
    display: flex;
    justify-content: center;
    gap: 30px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.radio-group {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.radio-group input {
    margin-right: 8px;
    accent-color: var(--primary-blue);
}

/* Content & Scroll Area */
.content-area {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}

.content-scroll {
    overflow-y: auto;
    flex-grow: 1;
    position: relative;
    /* Custom Scrollbar for better UX */
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
}

/* Dropzone */
.dropzone {
    padding: 40px 20px;
    text-align: center;
    border: 2px dashed #ccc;
    margin: 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.dropzone:hover, 
.dropzone:focus,
.dropzone.dragover {
    border-color: var(--primary-blue);
    background-color: rgba(42, 93, 158, 0.05);
}

.dropzone h3 {
    margin: 0 0 8px 0;
    color: var(--primary-blue);
    font-size: 1.2rem;
}

.dropzone p {
    margin: 0;
    color: #888;
    font-size: 0.9rem;
}

/* Results List */
.results-list {
    padding: 0 20px 20px 20px;
}

.result-item {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #eee;
    margin-bottom: 8px;
    padding: 8px;
    border-radius: 4px;
}

.result-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 3px;
    margin-right: 15px;
    background: #eee;
}

.result-info {
    flex-grow: 1;
    overflow: hidden;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    font-size: 0.95rem;
}

.file-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 2px;
}

.savings {
    color: var(--success-color);
    font-weight: bold;
    margin-left: 5px;
}

/* Buttons */
.btn {
    padding: 6px 14px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn-download {
    background-color: var(--primary-blue);
    color: white;
    white-space: nowrap;
}

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

.batch-actions {
    padding: 15px;
    background: #f1f1f1;
    text-align: center;
    border-top: 1px solid var(--border-color);
    display: none;
    flex-shrink: 0;
}

.btn-zip {
    background-color: var(--text-dark);
    color: white;
    padding: 10px 20px;
    font-size: 0.95rem;
}

.btn-zip:hover {
    background-color: black;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none; /* Toggled via JS */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-text {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

/* Footer */
.footer {
    padding: 15px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    background-color: #f9f9f9;
    color: var(--text-light);
    flex-shrink: 0;
}

.footer a {
    color: var(--text-light);
    text-decoration: none;
    margin: 0 5px;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}