/* ===== Reset & Base ===== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #c9f7a5;
    color: #000000;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* ===== Accessibility ===== */

.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000000;
    color: #ffffff;
    padding: 8px 16px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 100;
    border-radius: 0 0 4px 0;
}

.skip-to-main:focus {
    top: 0;
    outline: 2px solid #000000;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

*:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Header & Navigation ===== */

.header {
    background-color: rgba(201, 247, 165, 0.85);
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.nav-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (min-width: 640px) {
    .nav-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .nav-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #000000;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-link:hover {
    text-decoration: underline;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #000000;
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }
}

/* Mobile menu */
.mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 70vw;
    max-width: 300px;
    height: 100vh;
    background-color: #c9f7a5;
    z-index: 9999;
    padding: 5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #000000;
}

.mobile-menu-close svg {
    width: 24px;
    height: 24px;
}

.mobile-menu .mobile-nav-link {
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #000000;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-menu .mobile-nav-link:hover {
    text-decoration: underline;
}

/* ===== Main Content ===== */

.main-content {
    flex: 1;
    width: 100%;
}

.container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.container--narrow {
    max-width: 48rem;
}

/* ===== Typography ===== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: #000000;
}

.hero-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

.hero-subtitle {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    max-width: 36rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 1.125rem;
    }
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
}

/* ===== Hero Section ===== */

.hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

/* ===== Cards ===== */

.card {
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

/* ===== Upload Area ===== */

.upload-area {
    border: 2px dashed rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background-color: rgba(0, 0, 0, 0.02);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #000000;
    background-color: rgba(0, 0, 0, 0.06);
}

.upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.upload-text {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.upload-hint {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(0, 0, 0, 0.5);
    margin-top: 0.5rem;
}

.upload-filename {
    font-weight: 600;
    margin-top: 0.5rem;
    word-break: break-all;
}

/* ===== Format Selection ===== */

.format-selection {
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.format-selection label {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.format-selection select {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #000000;
    border-radius: 0.25rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    background-color: transparent;
    color: #000000;
    cursor: pointer;
    transition: all 0.2s ease;
}

.format-selection select:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

/* ===== Buttons ===== */

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border: 2px solid #000000;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background-color: #000000;
    color: #c9f7a5;
    width: 100%;
}

.btn-primary:hover {
    background-color: #333333;
}

.btn-secondary {
    background-color: transparent;
    color: #000000;
    margin-top: 0.75rem;
    width: 100%;
}

.btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

.btn-download {
    background-color: #000000;
    color: #c9f7a5;
    width: 100%;
    font-size: 1rem;
    padding: 1rem 2rem;
}

.btn-download:hover {
    background-color: #c9f7a5;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== Alerts ===== */

.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 2px solid;
}

.alert-error {
    background-color: rgba(0, 0, 0, 0.05);
    color: #000000;
    border-color: #000000;
}

/* ===== Status Page ===== */

.status-card {
    text-align: center;
}

.status-info {
    margin: 1.5rem 0;
    text-align: left;
}

.status-info p {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.status-info strong {
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid #000000;
}

.status-queued {
    background-color: rgba(0, 0, 0, 0.05);
    color: #000000;
}

.status-processing {
    background-color: rgba(0, 0, 0, 0.1);
    color: #000000;
}

.status-completed {
    background-color: #000000;
    color: #c9f7a5;
}

.status-failed {
    background-color: transparent;
    color: #000000;
    border-style: dashed;
}

/* ===== Loader ===== */

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.15);
    border-top-color: #000000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 1.5rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Info Box ===== */

.info-box {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    padding: 1.5rem;
    font-size: 0.875rem;
    border-left: 4px solid #000000;
}

.info-box h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.info-box a {
    color: #000000;
    font-weight: 600;
}

.info-box a:hover {
    text-decoration: none;
}

/* ===== Supported Formats ===== */

.formats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (min-width: 640px) {
    .formats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.format-card {
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.format-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background-color: rgba(0, 0, 0, 0.08);
}

.format-card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.format-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.format-card-desc {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(0, 0, 0, 0.5);
}

/* ===== Legal / Datenschutz ===== */

.legal h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .legal h1 {
        font-size: 2.5rem;
    }
}

.legal h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal p,
.legal ul {
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.legal ul {
    padding-left: 1.5rem;
}

.legal li {
    margin-bottom: 0.5rem;
}

.legal a {
    color: #000000;
    font-weight: 600;
}

.legal a:hover {
    text-decoration: none;
}

/* ===== Footer ===== */

.footer {
    background-color: #c9f7a5;
    margin-top: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

@media (min-width: 640px) {
    .footer-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .footer-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

.footer-copyright {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.6);
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-link {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #000000;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-link:hover {
    text-decoration: underline;
}

/* ===== Admin Tables ===== */

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.admin-table th {
    background-color: rgba(0, 0, 0, 0.08);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 2px solid #000000;
}

.admin-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* ===== Detail Table ===== */

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.6rem 1rem 0.6rem 0;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
    width: 140px;
    color: rgba(0, 0, 0, 0.6);
}

.detail-table td {
    padding: 0.6rem 0;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.detail-table tr:last-child td {
    border-bottom: none;
}

/* ===== Reduced Motion ===== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== High Contrast ===== */

@media (prefers-contrast: high) {
    .nav-link,
    .footer-link,
    .mobile-nav-link {
        text-decoration: underline;
    }

    .upload-area {
        border-width: 3px;
    }

    .status-badge {
        border-width: 3px;
    }
}
