/* Lokale Google Fonts (DSGVO-konform) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/static/fonts/inter-regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/static/fonts/inter-medium.ttf') format('truetype');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/static/fonts/inter-semibold.ttf') format('truetype');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/static/fonts/inter-bold.ttf') format('truetype');
}

:root {
    --bg-main: #121212;
    --bg-card: #1e1e1e;
    --accent: #DA3450;
    --accent-hover: #B02A41;
    --text-main: #eeeeee;
    --text-muted: #aaaaaa;
    --border-color: #333333;
    --row-bg: #181818;
    --sage: #657B69;
    --input-bg: var(--row-bg);
    --input-border: var(--border-color);
    --blue: #4a90e2;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0;
    padding: 0 40px;
    box-sizing: border-box;
}

nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.apa-logo {
    background: var(--accent);
    color: white;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.9rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-main);
}

.btn-logout {
    font-size: 1.2rem;
    text-decoration: none;
    color: var(--text-muted);
}

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 600px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

#cookie-banner p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-main);
}

.btn-cookie {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-cookie:hover {
    background: var(--accent-hover);
}

/* Responsive Nav Fixes */
@media (max-width: 600px) {
    .user-info span {
        display: none;
    }
    .user-info {
        margin-right: 0 !important;
        gap: 5px !important;
    }
    nav .flex {
        gap: 5px !important;
    }
    .nav-content .flex:first-of-type {
        gap: 5px !important;
    }
    .nav-content {
        padding: 0 10px;
    }
}

@media (max-width: 400px) {
    .nav-content {
        padding: 0 5px;
    }
    .apa-logo {
        font-size: 0.75rem;
        padding: 2px 5px;
    }
    nav .btn-secondary, nav .btn-primary {
        padding: 5px 6px !important;
        font-size: 0.75rem !important;
    }
    .user-info {
        gap: 3px !important;
    }
}

.flex { display: flex; }
.flex-column { flex-direction: column; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-5 { gap: 5px; }
.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.gap-20 { gap: 20px; }
.w-full { width: 100%; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.flash-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    color: var(--text-main);
}
.flash-error {
    background: rgba(218, 52, 80, 0.2);
    border: 1px solid #DA3450;
}
.flash-success {
    background: rgba(101, 123, 105, 0.2);
    border: 1px solid #657B69;
}
.flash-info {
    background: rgba(74, 144, 226, 0.2);
    border: 1px solid #4a90e2;
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
    font-size: 0.85rem;
}
.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}
/* Theme Picker Modal */
#theme-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.theme-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.theme-option {
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.theme-option:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.theme-option.active {
    border-color: var(--accent);
    background: rgba(218, 52, 80, 0.05);
}

.theme-preview {
    height: 60px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.theme-preview div {
    flex: 1;
}

.mode-toggle {
    display: flex;
    background: var(--bg-main);
    padding: 5px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.mode-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

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

.btn-secondary:hover {
    background: var(--bg-main);
}

/* Toast Notification */
#toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11000;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translate(-50%, -50px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}
