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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 50%, #45b7d1 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Header */
h1 {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 2rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    letter-spacing: -0.02em;
}

/* Hauptkarte */
.main-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.1),
        0 0 0 1px rgba(255,255,255,0.2);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.main-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 30px 60px rgba(0,0,0,0.15),
        0 0 0 1px rgba(255,255,255,0.3);
}

/* Upload-Bereich */
.upload-container {
    border: 3px dashed #e1e5e9;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    margin-bottom: 2rem;
}

.upload-container:hover {
    border-color: #ff6b6b;
    background: linear-gradient(145deg, #fff5f5, #fed7d7);
    transform: scale(1.02);
}

.upload-container.drag-over {
    border-color: #ff6b6b;
    background: linear-gradient(145deg, #fed7d7, #feb2b2);
    transform: scale(1.05);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#uploadIcon {
    width: 64px;
    height: 64px;
    fill: #ff6b6b;
    transition: all 0.3s ease;
}

.upload-container:hover #uploadIcon {
    transform: scale(1.1);
    fill: #e53e3e;
}

.upload-content p {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4a5568;
    margin: 0;
}

.file-info {
    font-size: 0.9rem !important;
    color: #718096 !important;
    font-weight: 400 !important;
}

/* Format-Auswahl */
.format-select {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    background: white;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

.format-select:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* Vorschau */
.preview-container {
    background: #f8fafc;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.preview-container h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1.5rem;
    text-align: center;
}

.image-info {
    display: flex;
    gap: 2rem;
    align-items: center;
}

#previewImage {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.info-text {
    flex: 1;
}

.info-text p {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #4a5568;
}

.info-text span {
    color: #2d3748;
    font-weight: 400;
}

/* Buttons */
button {
    background: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 1rem;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Progress */
#progress {
    text-align: center;
    margin: 2rem 0;
}

.progress {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    border-radius: 4px;
    animation: progress-animation 2s ease-in-out infinite;
}

@keyframes progress-animation {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

#progress p {
    color: #4a5568;
    font-weight: 600;
}

/* Ergebnis */
#result {
    text-align: center;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    margin-top: 2rem;
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

#result h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.download-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Footer */
footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-top: auto;
    padding-top: 2rem;
}

footer p {
    margin-bottom: 1rem;
    font-weight: 600;
}

footer nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .main-card {
        padding: 2rem 1.5rem;
    }
    
    .upload-container {
        padding: 2rem 1rem;
    }
    
    .image-info {
        flex-direction: column;
        text-align: center;
    }
    
    #previewImage {
        width: 100px;
        height: 100px;
    }
    
    footer nav {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Error States */
.error {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    margin: 1rem 0;
    text-align: center;
    font-weight: 600;
}

/* Success Animation */
@keyframes success-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success {
    animation: success-pulse 0.6s ease-in-out;
} 