/* Lingotronix - Modernes Design mit festgelegten Farben */
:root {
    --accent-cyan: #30EAFF;
    --accent-cyan-dark: #28d4e6;
    --accent-blue: #4a90e2;
    --accent-purple: #6b46c1;
    --primary-dark: #0a0e27;
    --secondary-dark: #1a1f3a;
    --text-primary: #1a1f3a;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-white: #FFFFFF;
    --text-on-dark: #FFFFFF;
    --border-color: #2d3748;
    --border-hover: #4a5568;
    --bg-white: #ffffff;
    --bg-gray: #f7fafc;
    --bg-gray-light: #edf2f7;
    --bg-dark: #1F0A60;
    --bg-dark-secondary: #2a0f7a;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    /* Muss zur Höhe von .header passen – unterer Rand der Sidebar-Top-Zeile = unterer Rand des Banners */
    --header-banner-height: 200px;
}

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

html {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-white);
    color: var(--text-primary);
    min-height: 100vh;
    /* line-height 0 kollabiert Whitespace-Textknoten (PHP ?> / Einrückung), die sonst eine Zeilenhöhe erzeugen */
    line-height: 0;
    font-size: 16px;
}

body > * {
    line-height: 1.6;
}

/* Header */
.header {
    background-image: url('/images/banner.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: calc(100% - 280px);
    height: var(--header-banner-height);
    margin: 0 0 0 280px;
    box-shadow: var(--shadow-md);
    transition: margin-left 0.3s ease, width 0.3s ease;
}

.header.sidebar-closed {
    margin-left: 0;
    width: 100%;
}

@media (max-width: 767px) {
    .header {
        margin-left: 0;
        width: 100%;
    }
    
    .header.sidebar-closed {
        margin-left: 0;
        width: 100%;
    }
}


/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: var(--bg-dark);
    border-right: 1px solid var(--border-color);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 200;
    overflow: hidden;
    padding: 0;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.sidebar-top-actions {
    /* Gleiche Höhe wie Header-Banner: Trennlinie unter Abmelden/Login bündig mit Banner-Unterkante */
    flex: 0 0 var(--header-banner-height);
    height: var(--header-banner-height);
    min-height: var(--header-banner-height);
    max-height: var(--header-banner-height);
    box-sizing: border-box;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    background: var(--bg-dark);
    flex-shrink: 0;
}

.sidebar-top-actions .lang-switcher {
    width: auto;
    align-self: center;
}

.sidebar-top-actions .btn {
    width: 100%;
    text-align: center;
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar.closed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
    flex-shrink: 0;
}

.sidebar-header h2 {
    color: var(--accent-cyan);
    font-size: 1.25rem;
    font-weight: 500;
    font-family: 'Audiowide', cursive;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar-menu li {
    margin: 0.25rem 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-on-dark);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-weight: 500;
    font-family: 'Audiowide', cursive;
}

.sidebar-menu a:hover {
    background: var(--bg-dark-secondary);
    color: var(--accent-cyan);
    border-left-color: var(--accent-cyan);
}

.sidebar-menu a.active {
    background: rgba(0, 212, 255, 0.1);
    border-left-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* Submenu Styles */
.sidebar-menu li.has-submenu {
    position: relative;
}

.sidebar-menu li.has-submenu > a {
    position: relative;
}

.sidebar-menu li.has-submenu > a::after {
    content: '▼';
    margin-left: auto;
    font-size: 0.7em;
    transition: transform 0.3s;
}

.sidebar-menu li.has-submenu > a.active::after,
.sidebar-menu li.has-submenu:hover > a::after {
    transform: rotate(180deg);
}

.sidebar-menu .submenu {
    list-style: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg-dark-secondary);
}

.sidebar-menu li.has-submenu:hover .submenu,
.sidebar-menu li.has-submenu > a.active ~ .submenu,
.sidebar-menu li.has-submenu.active .submenu {
    max-height: 500px;
}

.sidebar-menu .submenu li {
    margin: 0;
}

.sidebar-menu .submenu a {
    padding-left: 3rem;
    font-size: 0.9em;
    font-weight: 400;
}

.sidebar-menu .submenu a.active {
    background: rgba(0, 212, 255, 0.15);
    border-left-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.sidebar-toggle-btn {
    position: fixed;
    bottom: 1rem;
    left: 280px;
    background: var(--bg-dark-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-on-dark);
    width: 20px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: left 0.3s ease;
    z-index: 201;
    padding: 0;
}

.sidebar-toggle-btn.sidebar-closed {
    left: 0;
}

.sidebar-toggle-btn:hover {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: var(--bg-dark);
    transform: scale(1.1);
}

.sidebar-toggle-btn svg {
    position: absolute;
    transition: opacity 0.2s, transform 0.2s;
}

.sidebar-toggle-btn .toggle-icon-reverse {
    opacity: 0;
    transform: rotate(180deg);
}

.sidebar-toggle-btn.sidebar-closed svg:first-of-type {
    opacity: 0;
    transform: rotate(180deg);
}

.sidebar-toggle-btn.sidebar-closed .toggle-icon-reverse {
    opacity: 1;
    transform: rotate(0deg);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 150;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main Content */
.main-content {
    padding: 2rem;
    max-width: none;
    width: calc(100% - 280px);
    margin: 0;
    margin-left: 280px;
    transition: margin-left 0.3s ease;
}

.main-content.index-page {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 280px;
    width: calc(100% - 280px);
    max-width: none;
}

.main-content.sidebar-closed {
    margin-left: 0;
    width: 100%;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--accent-cyan);
    color: var(--bg-dark);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--accent-cyan-dark);
    color: var(--bg-dark);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--bg-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-gray);
    border-color: var(--accent-cyan);
    color: var(--bg-dark);
}

/* Button in dunklen Bereichen */
.card .btn-secondary,
.form-container .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-on-dark);
    border-color: rgba(255, 255, 255, 0.2);
}

.card .btn-secondary:hover,
.form-container .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-cyan);
    color: var(--text-on-dark);
}

/* Buttons mit Hintergrund #1F0A60 haben weiße Schrift */
.btn[style*="background: #1F0A60"],
.btn[style*="background-color: #1F0A60"],
.btn[style*="background: var(--bg-dark)"],
.btn[style*="background-color: var(--bg-dark)"] {
    color: var(--text-on-dark) !important;
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 2rem auto;
    background: var(--bg-dark);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    color: var(--text-on-dark);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-on-dark);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: none;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-dark-secondary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-on-dark);
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-container h1 {
    color: var(--accent-cyan);
}

/* Cards */
.card {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    color: var(--text-on-dark);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--accent-cyan);
    font-family: 'Audiowide', cursive;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
    color: #6ee7b7;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--error);
    color: #fca5a5;
}

.alert-info {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* File Upload */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    background: var(--bg-dark);
    color: var(--text-on-dark);
}

.upload-area:hover {
    border-color: var(--accent-cyan);
    background: var(--bg-dark-secondary);
    color: var(--text-on-dark);
}

.upload-area.dragover {
    border-color: var(--accent-cyan);
    background: var(--bg-dark-secondary);
}

.file-list {
    list-style: none;
    padding: 0;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
    color: var(--text-on-dark);
}

.file-item:hover {
    background: var(--bg-dark-secondary);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow);
    transform: translateX(4px);
    color: var(--text-on-dark);
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: var(--text-on-dark);
    margin-bottom: 0.25rem;
}

.file-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    background: var(--bg-gray);
    padding: 0.25rem;
    border-radius: 10px;
}

.lang-switcher a {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-weight: 600;
    font-size: 0.875rem;
}

.lang-switcher a.active {
    background: var(--accent-cyan);
    color: white;
    box-shadow: var(--shadow-sm);
}

.lang-switcher a:hover:not(.active) {
    background: var(--bg-white);
    color: var(--accent-cyan);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--bg-dark);
    border-radius: 24px;
    margin-bottom: 4rem;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.index-page .hero {
    width: 67% !important;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
    flex-shrink: 0;
    align-self: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: transparent;
    pointer-events: none;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-on-dark);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.hero > div {
    position: relative;
    z-index: 1;
}

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

.index-page .features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
    margin-top: 0;
    margin-left: auto;
    margin-right: auto;
    width: 67% !important;
    max-width: none;
    box-sizing: border-box;
    flex-shrink: 0;
    align-self: center;
}

.index-page .feature-card {
    flex: 0 0 auto;
    width: calc((100% - 4rem) / 3);
    min-width: 350px;
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    align-self: stretch;
    overflow: visible;
}

@media (max-width: 1200px) {
    .index-page .features {
        flex-wrap: wrap;
    }
    
    .index-page .feature-card {
        flex: 0 0 calc(50% - 1rem);
        max-width: calc(50% - 1rem);
        min-width: calc(50% - 1rem);
        width: calc(50% - 1rem);
    }
}

@media (max-width: 767px) {
    .index-page .features {
        flex-wrap: wrap;
    }
    
    .index-page .feature-card {
        flex: 0 0 100%;
        max-width: 100%;
        min-width: 100%;
        width: 100%;
    }
}

.feature-card {
    background: var(--bg-dark);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.feature-card .feature-card-content {
    position: relative;
    z-index: 2;
    overflow: visible;
}

.index-page .feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-cyan);
    transform: scaleY(0);
    transition: transform 0.3s;
    z-index: 1;
    pointer-events: none;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-cyan);
    transform: scaleY(0);
    transition: transform 0.3s;
    z-index: 1;
    pointer-events: none;
}

.feature-card:hover::before {
    transform: scaleY(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-xl);
}

.feature-card h3 {
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 500;
    position: relative;
    padding-left: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
    z-index: 2;
    flex-shrink: 0;
    overflow: visible;
}

.feature-card h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--accent-cyan);
    border-radius: 2px;
}

.feature-card p {
    color: var(--text-on-dark);
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    flex: 1;
    z-index: 2;
    overflow: visible;
    margin: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Audiowide', cursive;
    color: var(--accent-cyan);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent-cyan);
}

.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6 {
    color: var(--accent-cyan);
}

.card p {
    color: var(--text-on-dark);
}

h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

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

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-cyan-dark);
}

/* Responsive */
@media (min-width: 768px) {
    .sidebar {
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        display: none;
    }
}

@media (max-width: 767px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 1rem;
        margin-left: 0;
        width: 100%;
    }
    
    .main-content.sidebar-closed {
        margin-left: 0;
        width: 100%;
    }
    
    .form-container {
        padding: 1.5rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex {
    display: flex;
}

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

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

