/* =====================================================
   Generalagentur Mario Martin
   Premium Style - Apple & Safari Optimized v8
===================================================== */

:root {
    --primary: #0097a9;
    --primary-dark: #008191;
    --bg: #f8fbfb;
    --card: #ffffff;
    --text: #1d1d1f;
    --muted: #6e6e73;
    --border: #d7d7dc;
    --border-focus: rgba(0, 151, 169, 0.4);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    background-image: 
        radial-gradient(circle at 15% 50px, rgba(0, 151, 169, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(0, 151, 169, 0.06) 0%, transparent 40%);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.wrap {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

/* ================= HERO ================= */
.hero {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 40px 35px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.logo {
    display: block;
    margin: 0 auto 20px auto;
    width: 100%;
    max-width: 338px;
    max-height: 110px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.tag-label {
    display: inline-block;
    background: #e7f8fa;
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.hero h1 {
    font-size: clamp(1.5rem, 4vw, 2.1rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 12px 0;
    color: #000;
}

.hero p {
    max-width: 480px;
    margin: 0 auto;
    color: var(--muted);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* ================ BENEFITS ================ */
.benefits-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
    margin-top: 25px;
}

.benefit-item {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

.benefit-item svg {
    min-width: 18px;
    flex-shrink: 0;
    margin-right: 8px;
    color: var(--primary);
}

/* ================= FORMULAR ================= */
form {
    background: #fff;
    border-radius: 28px;
    padding: 35px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

textarea {
    grid-column: 1 / -1;
    min-height: 100px;
    resize: vertical;
}

input, textarea {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    padding: 14px 16px;
    font-size: 16px !important;
    font-family: inherit;
    color: var(--text);
    background-color: #fafafa;
    border-radius: 14px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    outline: none;
}

input::placeholder, textarea::placeholder {
    color: #999;
}

input:focus, textarea:focus {
    background-color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--border-focus);
}

/* ================= UPLOAD BEREICH ================= */
#fileInput {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 20px 0;
    padding: 28px 16px;
    border-radius: 16px;
    border: 2px dashed rgba(0, 151, 169, 0.3);
    background: #fafbfc;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload:hover {
    background: #f0f9fa;
    border-color: var(--primary);
}

.upload-icon {
    min-width: 38px;
    flex-shrink: 0;
    color: var(--primary);
    margin-bottom: 10px;
}

.upload-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.upload-desc {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
}

#fileList {
    width: 100%;
}

.file-item {
    background: #f7f9fa;
    border: 1px solid #e1e7e9;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    word-break: break-all;
}

.file-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding-right: 15px;
}

.remove-file {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.remove-file:active {
    transform: scale(0.85);
}

.dragging {
    border-color: var(--primary) !important;
    background: #e7f8fa !important;
}

/* ================= BUTTON ================= */
button.btn, button[type="submit"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 18px;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 15px rgba(0, 151, 169, 0.2);
}

button.btn:active, button[type="submit"]:active {
    transform: scale(0.98);
    background: var(--primary-dark);
}

/* ================= OVERLAY & ANIMATION ================= */
#loading-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(248, 251, 251, 0.92); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999; 
    display: none; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    text-align: center; 
    padding: 20px; 
}

.spinner { 
    border: 4px solid #e1e7e9; 
    border-top: 4px solid var(--primary); 
    border-radius: 50%; 
    width: 50px; 
    height: 50px; 
    animation: spin 1s linear infinite; 
    margin: 0 auto 20px auto; 
}

.overlay-title { 
    font-size: 1.5rem; 
    font-weight: 800; 
    color: var(--text); 
    margin-bottom: 12px; 
}

.overlay-text { 
    font-size: 0.95rem; 
    color: var(--muted); 
    line-height: 1.5; 
    max-width: 400px; 
    margin: 0 auto; 
}

.result-icon { 
    margin-bottom: 20px; 
    display: flex;
    justify-content: center;
}

.success-icon { color: var(--primary); }
.error-icon { color: #ef4444; }

.btn-reload { 
    margin-top: 30px; 
    background: var(--text) !important; 
    max-width: 250px; 
    margin-left: auto; 
    margin-right: auto; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important; 
}

.uploaded-files-summary {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    margin: 25px auto 0 auto;
    text-align: left;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
}

.uploaded-files-summary strong {
    display: block;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text);
}

.uploaded-files-summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.uploaded-files-summary li {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    background: #f7f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e1e7e9;
}

.uploaded-files-summary li:last-child {
    margin-bottom: 0;
}

.uploaded-files-summary li::before {
    content: '📄';
    margin-right: 10px;
    font-size: 1rem;
}

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

/* ================= MOBILE ================= */
@media (max-width: 600px) {
    body {
        padding: 25px 16px;
    }
    .hero {
        padding: 35px 20px;
        border-radius: 24px;
    }
    .logo {
        max-width: 260px;
        margin-bottom: 20px;
    }
    .hero h1 {
        font-size: 1.6rem;
    }
    .benefits-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-left: 5px;
    }
    form {
        padding: 25px 20px;
        border-radius: 24px;
    }
    .grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}