/* Basis-Reset und globale Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS-Variablen für Light Mode */
:root {
    --background-color: #f8f8f8;
    --text-color: #333;
    --accent-color: #ff914d;
    --card-background: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --section-background: #f0f0f5;
	--section-background-body: #f1f0f5;
    --link-hover-bg: #4A90E2;
    --link-hover-color: #ffffff;
    --editor-border-color: rgba(0, 0, 0, 0.1); /* Dunklere Umrandung für Light Mode */
	--box-gradient-header-colors: linear-gradient(90deg, #ffd6e0, #ffc1e3, #e3b2f5, #b2d7f5, #a4f0e0);
}

/* CSS-Variablen für Dark Mode */
body.dark-mode {
    --background-color: #1e1e2e;
    --text-color: #e0e0e0;
    --accent-color: #8131b4;
    --card-background: #2b2b3c;
    --card-shadow: rgba(0, 0, 0, 0.3);
    --section-background: #2b2b3c;
	--section-background-body: #1f1e2e;
    --link-hover-bg: #76c7c0;
    --link-hover-color: #1e1e2e;
    --editor-border-color: rgba(255, 255, 255, 0.1); /* Helle Umrandung für Dark Mode */
	--box-gradient-header-colors: linear-gradient(90deg, #fb6c80, #cc3e83, #910083, #4c3b78, #00696a);
}

body {
    font-family: 'Arial', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
}

/* Header */
header {
    background-color: var(--card-background);
    width: 100%;
    height: 60px;
    box-shadow: 0 4px 8px var(--card-shadow);
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.logo {
    font-size: 1.8em;
    color: var(--accent-color);
    font-weight: bold;
}

/* Toggle-Button für Dark/Light Mode */
#theme-toggle {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--accent-color);
}

.language-switcher {
    position: relative;
    display: inline-block;
}

#languageIcon {
    width: 30px; /* Größe des Sprachsymbols */
    cursor: pointer;
}

.language-menu {
    display: none; /* Menü standardmäßig versteckt */
    position: absolute;
    top: 100%; /* Direkt unter dem Sprachsymbol anzeigen */
    background-color: var(--accent-color);
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    padding: 5px;
    border-radius: 4px;
    z-index: 1;
}

.language-menu img {
    width: 24px; /* Größe der Flaggen */
    margin: 5px;
    cursor: pointer;
}

.language-menu img:hover {
    opacity: 0.7; /* Leichter Hover-Effekt für die Flaggen */
}

.icon-container {
    display: flex;
    align-items: center;
    gap: 10px; /* Abstand zwischen Sprachsymbol und Toggle-Button */
}

/* Verbesserte Struktur und Design für Editor-Container */
.editor-section {
    display: flex;
    justify-content: center;
    padding: 20px;
    width: 100%;
    background-color: var(--section-background-body);
    border-radius: 10px;
	margin-top: -40px;
}

.editor-container {
    display: flex;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--card-shadow);
    border: 1px solid var(--editor-border-color); /* Anpassung der Border-Farbe für Light und Dark Mode */
}

#html-editor, #live-preview {
    flex: 1;
    height: 500px;
    border-radius: 8px;
    border: 1px solid var(--editor-border-color); /* Konsistente Border für beide Elemente */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#html-editor {
    padding: 10px;
    font-size: 16px;
    background-color: #2d2d2d;
    color: #e0e0e0;
    resize: none;
}

/* Hauptinhalt */
main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Funktionen Section */
.features-section {
    background-color: var(--section-background);
    padding: 40px 20px;
    border-radius: 10px;
	text-align: center;
    width: 100%;
    max-width: 1200px;
    margin-top: -20px;
}

.features-section h2 {
    color: var(--accent-color);
    margin-bottom: 20px;
}

/* Grid Layout für die Feature Cards */
.features-container {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    justify-items: center;
}

.feature-item {
	position: relative;
    background-color: var(--card-background);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--card-shadow);
    text-align: left;
    width: 100%;
    max-width: 300px;
}

.feature-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px; /* Dünner Balken */
    background: var(--box-gradient-header-colors); /* Farbverlauf entsprechend des Bildes */
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

/* FAQ Section */
.faq-section {
    background-color: var(--section-background);
    padding: 40px 20px;
    border-radius: 10px;
    width: 100%;
    max-width: 1200px;
    margin-top: 0px;
}

.faq-section h2 {
    color: var(--accent-color);
    margin-bottom: 20px;
    text-align: center;
}

.faq-item {
	position: relative;
    margin-bottom: 20px;
    background-color: var(--card-background);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--card-shadow);
}

.faq-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px; /* Dünner Balken */
    background: var(--box-gradient-header-colors); /* Farbverlauf entsprechend des Bildes */
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.faq-item p {
    margin: 0;
}

/* Footer */
.footer {
    background-color: var(--card-background);
    color: var(--text-color);
    width: 100%;
    padding: 15px;
    text-align: center;
    box-shadow: 0 -4px 8px var(--card-shadow);
	margin-top: -20px;	
}

#top-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
    font-size: 16px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Sichtbar, wenn gescrollt wird */
#top-button.show {
    opacity: 1;
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
    .editor-container {
        flex-direction: column;
        gap: 10px;
    }

    #html-editor, #live-preview {
        width: 100%;
        height: 300px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5em;
    }

    #html-editor, #live-preview {
        height: 400px;
    }
}
