:root {
    --primary: #9b59b6;
    --primary-dark: #8e44ad;
    --accent: #2ecc71;
    --accent-dark: #27ae60;
    --dark-bg: #1a1a2e;
    --dark-surface: #212136;
    --dark-surface-light: #32324a;
    --text-light: #ecf0f1;
    --text-dark: #95a5a6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    color: var(--text-light);
    background-color: var(--dark-bg);
    min-height: 100vh;
}

h1, h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(155, 89, 182, 0.3);
}

h1 {
    font-size: 2.5rem;
    margin-top: 10px;
    letter-spacing: 1px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.container {
    background-color: var(--dark-surface);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    overflow: hidden;
}

.upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    border: 2px dashed var(--primary);
    border-radius: 12px;
    background-color: var(--dark-surface-light);
    margin-bottom: 30px;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    max-height: 1000px;
    overflow: hidden;
    opacity: 1;
}

.upload-section.hidden {
    max-height: 0;
    padding: 0;
    margin: 0;
    border: none;
    opacity: 0;
    pointer-events: none;
}

#image-preview {
    max-width: 100%;
    max-height: 300px;
    margin: 25px 0;
    border-radius: 12px;
    display: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#image-preview.active {
    transform: scale(1);
}

#file-input {
    display: none;
}

.btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    margin: 10px 5px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    background-color: var(--text-dark);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn.accent {
    background-color: var(--accent);
}

.btn.accent:hover {
    background-color: var(--accent-dark);
}

.btn i {
    margin-right: 8px;
}

.json-section {
    padding: 20px;
    background-color: var(--dark-surface-light);
    border-radius: 12px;
    margin-bottom: 30px;
    margin-top: 30px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.json-section:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    font-family: 'Consolas', monospace;
    margin-bottom: 15px;
    resize: vertical;
    background-color: var(--dark-bg);
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}

.input-section {
    margin-top: 20px;
    padding: 25px;
    background-color: var(--dark-surface-light);
    border-radius: 12px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.input-section:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary);
}

input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--primary);
    border-radius: 50px;
    background-color: var(--dark-bg);
    color: var(--text-light);
    font-size: 16px;
    transition: all 0.3s ease;
}

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

.output-display {
    margin-top: 30px;
    min-height: 80px;
    text-align: center;
    padding: 20px;
    background-color: var(--dark-surface);
    border-radius: 12px;
    border-left: 5px solid var(--accent);
    font-size: 2.5rem;
    font-weight: bold;
    letter-spacing: 5px;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.output-display.empty {
    color: var(--text-dark);
    font-size: 1.2rem;
    letter-spacing: normal;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 15px auto;
    border: 4px solid rgba(155, 89, 182, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
    padding: 12px 15px;
    border-radius: 8px;
    margin: 15px 0;
    display: none;
    border-left: 4px solid #e74c3c;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    gap: 10px;
}

.toggle-upload-btn {
    display: none;
    margin: 0 auto 20px;
}

.toggle-upload-btn.visible {
    display: flex;
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
}

.logo {
    max-width: 150px;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover {
    transform: scale(1.05);
}

.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-appear {
    opacity: 0;
    transform: translateY(30px);
    animation: sectionAppear 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes sectionAppear {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.output-animation {
    animation: outputPulse 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes outputPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
.footer {
    background-color: var(--dark-surface);
    padding: 20px;
    border-radius: 15px;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.copyright {
    color: var(--text-light);
    font-size: 1rem;
}

.impressum .btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px; /* horizontal padding vergrößert */
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    display: inline-flex; /* für bessere Zentrierung mit Icons */
    align-items: center;
    justify-content: center;
    gap: 8px; /* Abstand zwischen Icon und Text */
    text-align: center;
}

.impressum .btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.impressum .btn:active {
    transform: translateY(1px);
}