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

body {
    font-family: 'Roboto', sans-serif;
    padding: 1.5rem;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
    width: 100%;
    margin: 0 auto;
}

/* Container */
.container {
    max-width: 90%;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, #0066cc, #003366);
    color: #fff;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 300;
}

.subtitle {
    margin-top: 0.5rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content */
main {
    padding: 2rem;
}

/* Tabs */
.tab-container {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid #ddd;
}

.tab-button {
    background: linear-gradient(135deg, #0066cc, #003366);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    border-radius: 5px 5px 0 0;
    margin-right: 0.5rem;
}

.tab-button:hover {
    background: linear-gradient(135deg, #ff6600, #ff3300);
    transform: scale(1.05);
}

.tab-button.active {
    background: linear-gradient(135deg, #ff6600, #ff3300);
    border-bottom: 3px solid #ff3300;
}

.tab-content {
    display: none;
    padding: 1.5rem;
}

.tab-content.active {
    display: block;
}

/* Text Converter */
.converter-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.input-section {
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0066cc;
}

h2 {
    font-size: 1.3rem;
    color: #003366;
    font-weight: 500;
    margin: 0;
}

.encoding-select {
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.encoding-select:focus {
    border-color: #0066cc;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 102, 204, 0.5);
}

textarea {
    width: 100%;
    padding: 1.25rem !important;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.3s;
    background-color: #f9f9f9;
    min-height: 200px;
}

textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 5px rgba(0, 102, 204, 0.5);
}

.arrow-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrow {
    font-size: 2rem;
    color: #0066cc;
    font-weight: bold;
}

.info {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

.copy-btn {
    background: linear-gradient(135deg, #0066cc, #003366);
    color: #fff;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s, transform 0.2s;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #ff6600, #ff3300);
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Image Converter */
.image-converter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 1.5rem;
}

.upload-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.drop-zone {
    border: 3px dashed #ccc;
    border-radius: 10px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #0066cc;
    background: #e6f2ff;
}

.drop-zone-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.drop-zone p {
    margin: 0.5rem 0;
    color: #666;
}

.small {
    font-size: 0.85rem;
    color: #999;
}

.image-preview-container {
    text-align: center;
}

.image-preview-container.hidden {
    display: none;
}

#image-preview {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.clear-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.3s, transform 0.2s;
}

.clear-btn:hover {
    background: linear-gradient(135deg, #ff6600, #ff3300);
    transform: scale(1.05);
}

.base64-image-section {
    display: flex;
    flex-direction: column;
}

/* Error Messages */
.error-message {
    background: #ffe6e6;
    color: #dc3545;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    display: none;
    border-left: 4px solid #dc3545;
}

.error-message.show {
    display: block;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding: 2rem;
    border-top: 1px solid #ddd;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    background: #f9f9f9;
}

footer p {
    margin: 0.5rem 0;
}

footer a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #ff6600;
    text-decoration: underline;
}

/* Buttons (generisch) */
button {
    background: linear-gradient(135deg, #0066cc, #003366);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s, transform 0.2s;
}

button:hover {
    background: linear-gradient(135deg, #ff6600, #ff3300);
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 968px) {
    .converter-grid {
        grid-template-columns: 1fr;
    }
    
    .arrow-section {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
    
    .image-converter {
        grid-template-columns: 1fr;
    }
    
    .container {
        max-width: 95%;
        margin-top: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }

    main {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .container {
        max-width: 100%;
        margin-top: 0;
        border-radius: 0;
    }

    header {
        padding: 1.5rem;
    }

    header h1 {
        font-size: 1.8rem;
    }

    main {
        padding: 1rem;
    }

    .tab-content {
        padding: 1rem;
    }

    .tab-button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    textarea {
        padding: 1rem !important;
    }

    .image-converter {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    button {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }

    .copy-btn {
        width: auto;
        padding: 0.5rem 1rem;
    }

    .tab-container {
        flex-direction: column;
    }

    .tab-button {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.5rem;
        border-radius: 5px;
    }

    .tab-content {
        padding: 0.75rem;
    }

    textarea {
        font-size: 0.85rem;
        padding: 0.85rem !important;
    }

    .drop-zone {
        padding: 2rem 1rem;
    }

    .upload-icon {
        font-size: 2rem;
    }

    .image-converter {
        padding: 0.75rem;
    }
}

/* Bilder responsiv machen */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Impressum Tab */
.impressum-content {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.impressum-content h1,
.impressum-content h2,
.impressum-content h3 {
    color: #003366;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.impressum-content h1 {
    font-size: 2rem;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 0.5rem;
}

.impressum-content h2 {
    font-size: 1.5rem;
}

.impressum-content h3 {
    font-size: 1.2rem;
}

.impressum-content p {
    margin-bottom: 1rem;
}

.impressum-content a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s;
}

.impressum-content a:hover {
    color: #ff6600;
    text-decoration: underline;
}

.impressum-content ul,
.impressum-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

/* Responsive Anpassungen für Impressum */
@media (max-width: 768px) {
    .impressum-content {
        padding: 1.5rem;
    }
    
    .impressum-content h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .impressum-content {
        padding: 1rem;
    }
    
    .impressum-content h1 {
        font-size: 1.4rem;
    }
    
    .impressum-content ul,
    .impressum-content ol {
        margin-left: 1.5rem;
    }
}
