/* 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;
    --link-hover-bg: #4A90E2;
    --link-hover-color: #ffffff;
	--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;
    --link-hover-bg: #76c7c0;
    --link-hover-color: #1e1e2e;
	--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; /* Feste Höhe für den Header */
    box-shadow: 0 4px 8px var(--card-shadow);
}

.header-container {
    width: 100%;

    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%; /* Füllt den Header aus */
    padding: 0 20px; /* Horizontaler Abstand */
}

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

#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 */
}

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

/* Info-Section */
.info-section {
    background-color: var(--section-background);
    padding: 20px 30px;
    border-radius: 10px;
    text-align: center;
    color: var(--accent-color);
    max-width: 600px;
    font-size: 1.1em;
	margin-top: -20px;
}

/* Converter-Container */
.converter-container {
    background-color: var(--card-background);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 16px var(--card-shadow);
    text-align: center;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Eingabefeld und Label */
.input-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

label {
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 1rem;
}

input[type="text"] {
    width: 100%;
    max-width: 500px;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--card-shadow);
    font-size: 1rem;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type="text"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 8px rgba(0, 122, 204, 0.3);
    outline: none;
}

/* Dynamisch generierte Textstile */
.styled-texts-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--text-color);
    outline: none;
    font-size: 1rem;
    background-color: var(--card-background);
    color: var(--text-color);
}

/* Text Style Container */
.styled-text-container {
    background-color: var(--card-background);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 8px var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 10px 0;
}

.style-name {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.styled-text {
    font-size: 1.2rem;
    margin-bottom: 10px;
    word-wrap: break-word; /* Textumbruch bei Bedarf */
    overflow-wrap: break-word; /* Für ältere Browser */
    max-width: 100%;
    white-space: normal; /* Ermöglicht den Zeilenumbruch */
}

.button-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.copy-button {
    padding: 10px 20px;
    background-color: var(--accent-color);
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
    max-width: 120px;
    width: 100%;
    text-align: center;
}

.copy-button:hover {
    background-color: var(--link-hover-bg);
}

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

.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) {
    .header-container,
    .footer-container {
        padding: 10px;
        text-align: center;
    }
    
    .features-container {
        grid-template-columns: 1fr; /* Volle Breite für Features auf kleinen Bildschirmen */
    }

    .converter-container, .info-section, .features-section, .faq-section {
        padding: 20px;
    }

    input[type="text"] {
        width: 100%; /* Volle Breite für Eingabefeld auf mobilen Geräten */
        max-width: 100%;
    }

    .styled-text-container {
        flex-direction: column; /* Stack die Inhalte vertikal */
        align-items: flex-start;
    }
	
    .style-name {
        font-size: 0.8rem; /* Kleinere Schriftgröße für mobile Ansicht */
    }

    .copy-button {
        width: 100%; /* Volle Breite für Kopierbutton auf mobilen Geräten */
        margin-top: 10px;
    }
}
