/* --- CSS Variablen & Reset --- */
:root[data-theme="dark"] {
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: #334155;
    --nav-bg: rgba(15, 23, 42, 0.8);
}

:root[data-theme="light"] {
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #e2e8f0;
    --nav-bg: rgba(248, 250, 252, 0.8);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    height: 70px;
    display: flex;
    align-items: center;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* --- Theme Toggle --- */
#theme-btn {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

#theme-btn:active {
    transform: scale(0.9);
}

[data-theme="dark"] .icon-sun, 
[data-theme="light"] .icon-moon {
    display: block;
}

[data-theme="dark"] .icon-moon, 
[data-theme="light"] .icon-sun {
    display: none;
}

/* --- Hero Section --- */
.hero {
    padding: 120px 0 40px;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: -2px;
}

.highlight {
    color: #DC143C;
}

.subtitle {
    font-size: 1.25rem;
    color: #b91c1c;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.description {
    max-width: 600px;
    margin: 0 auto 1rem;
    font-size: 1.1rem;
}

.hero-btns {
    margin-bottom: 0.8rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

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

.btn.primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn.secondary {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    margin-left: 1rem;
}

/* --- Grid & Cards --- */
.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: block;
}

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

/* --- Files Section --- */
.file-list {
    background: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.file-item {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.file-item:last-child {
    border-bottom: none;
}

.download-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

/* --- Footer --- */
.footer {
    padding: 4rem 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

/* --- Responsive & Animations --- */
@media (max-width: 768px) {
    .nav-links { display: none; } /* Vereinfacht für dieses Beispiel */
    .hero h1 { font-size: 2.5rem; }
    .btn.secondary { margin-left: 0; margin-top: 1rem; width: 100%; }
    .btn.primary { width: 100%; }
}

.fade-in {
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.upload-box {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--surface-color);
    margin-bottom: 2rem;
}

.upload-box:hover {
    border-color: var(--accent-color);
    background: rgba(59, 130, 246, 0.05);
}

.upload-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.file-manager {
    margin-top: 2rem;
}

.file-manager-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 2rem;
}

.file-panel {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.file-list-panel h2,
.page-header h1 {
    margin-bottom: 1rem;
}

.file-controls {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

#file-search {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-primary);
}

.file-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.file-actions .btn {
    width: 100%;
}

.file-grid {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.file-card {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.4s ease;
}

.file-card strong,
.file-card span {
    display: block;
}

.file-card .file-meta {
    display: grid;
    gap: 0.25rem;
}

.file-card button {
    border: none;
    background: transparent;
    color: var(--accent-color);
    cursor: pointer;
    font-weight: 700;
}

.empty-state {
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 1rem;
}

.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.page-header p {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

.drive-section {
    margin-top: 2rem;
}

.drive-upload-card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    max-width: 520px;
    margin: 0 auto;
    background: var(--surface-color);
}

.drive-upload-card h3 {
    margin-top: 0.75rem;
}

.drive-upload-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

@media (max-width: 900px) {
    .file-manager-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .navbar {
        position: static;
    }
    .container {
        padding: 0 1rem;
    }
}