/* Grundlegende Reset und Basisstile */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 2rem;
    position: relative;
    padding-top: 4rem;
}

main {
    max-width: 900px;
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Überschriften */
h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: #2c3e50;
}

/* Beschreibungstext */
.description {
    text-align: center;
    margin-bottom: 2rem;
    color: #666;
    line-height: 1.8;
}

/* Textareas */
textarea {
    width: 100%;
    height: 300px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    background-color: #fafafa;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Buttons und Kontrollelemente */
.input-controls, .output-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    background-color: #3498db;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: #2980b9;
}

#downloadButton {
    background-color: #2ecc71;
}

#downloadButton:hover {
    background-color: #27ae60;
}

#clearButton {
    background-color: #95a5a6;
    border-color: #7f8c8d;
}

#clearButton:hover {
    background-color: #7f8c8d;
}

#loadExampleButton {
    background-color: #9b59b6;
    border-color: #8e44ad;
}

#loadExampleButton:hover {
    background-color: #8e44ad;
}

/* File Upload Styling */
.hidden-file-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.file-upload {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.custom-file-button {
    padding: 0.8rem 1.5rem;
    border: 1px solid #95a5a6;
    border-radius: 4px;
    background-color: #95a5a6;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.custom-file-button:hover {
    background-color: #7f8c8d;
    border-color: #7f8c8d;
}

.file-name {
    color: #666;
    font-size: 0.9rem;
}

/* Nachrichtenbereich */
#messageArea {
    display: none;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    text-align: center;
}

#messageArea.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#messageArea.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer */
footer {
    margin-top: 2rem;
    padding: 1rem;
    text-align: center;
    border-top: 1px solid #ddd;
}

.footer-links {
    margin: 1rem 0;
}

.footer-links a {
    color: #0066cc;
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

.feedback-section {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.feedback-section a {
    color: #0066cc;
    text-decoration: none;
    margin-left: 0.3rem;
}

.feedback-section a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    main {
        padding: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    .input-controls, .output-controls {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    textarea {
        height: 250px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }

    main {
        padding: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }
}

/* Sprachumschalter */
.language-switcher {
    position: absolute;
    top: 1rem;
    right: 2rem;
    display: flex;
    gap: 0.5rem;
    z-index: 1000;
}

.language-switcher button {
    padding: 0.4rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.language-switcher button:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.language-switcher button.active {
    background-color: #3498db;
    border-color: #2980b9;
    color: white;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.language-switcher button.active:hover {
    background-color: #2980b9;
}

/* Info-Bereich */
.info-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.info-section article {
    margin-bottom: 2.5rem;
}

.info-section h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.info-section p {
    color: #666;
    line-height: 1.8;
    white-space: pre-line;
}
