/* Belux Alt-Text Generator - Main Styles */

/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Neues Farbschema basierend auf Screenshot */
    --primary-color: #c7d245;
    --primary-hover: #b0bc3a;
    --primary-light: #d6dd6e;
    --accent-color: #7fe7d4;
    --accent-hover: #5ed9c3;
    --success-color: #7fe7d4;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --text-color: #2d3436;
    --text-secondary: #636e72;
    --bg-color: #fafafa;
    --bg-light: #fefefe;
    --border-color: #e8e8e8;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
    font-weight: 400;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Page Header Icon */
.page-icon {
    width: 64px;
    height: 64px;
    vertical-align: middle;
    margin-right: 1rem;
    padding: 16px;
    color: var(--primary-color);
    background: #f4f7d9;
    border-radius: 12px;
    stroke-width: 2;
    box-sizing: border-box;
}

/* Navigation */
.main-nav {
    background: var(--primary-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(0, 0, 0, 0.1);
}

.nav-badge {
    background: var(--error-color);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.25rem;
}

/* Page Header - Neues Design */
.page-header {
    margin-bottom: 2.5rem;
}

.page-header h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin: 0;
}

/* Flash Messages */
.flash-message {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.flash-success {
    background: #f4f7d9;
    color: #5a6b1a;
    border-left: 4px solid var(--primary-color);
}

.flash-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error-color);
}

.flash-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--primary-color);
}

/* Form Sections */
.analysis-form {
    background: #FAFBE8;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.form-section {
    margin-bottom: 2rem;
    padding: 2.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Model Selector */
.model-selector {
    display: grid;
    gap: 1rem;
}

.model-option {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.model-option:hover {
    border-color: var(--primary-color);
    background: rgba(199, 210, 69, 0.05);
}

.model-option:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background: rgba(199, 210, 69, 0.1);
    box-shadow: 0 0 0 3px rgba(199, 210, 69, 0.15);
}

.model-option input[type="radio"] {
    width: auto;
    margin-right: 1rem;
}

.model-info {
    flex: 1;
}

.model-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.model-cost {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.badge-success {
    background: var(--primary-color);
    color: var(--text-color);
    font-weight: 600;
}

.badge-warning {
    background: var(--warning-color);
    color: var(--white);
    font-weight: 400;
    font-size: 0.65rem;
    white-space: nowrap;
}

.badge-secondary {
    background: var(--text-secondary);
    color: var(--white);
    font-weight: 600;
}

/* Upload Area */
.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.drag-active {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.02);
}

.upload-label {
    cursor: pointer;
    display: block;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    padding: 16px;
    color: var(--primary-color);
    stroke-width: 2;
    background: #f4f7d9;
    border-radius: 14px;
    box-sizing: border-box;
}

.upload-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.upload-text span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Image Preview Grid */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.image-preview-item {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--white);
}

.image-preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.image-preview-info {
    padding: 0.75rem;
}

.image-name {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-size {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-remove:hover {
    background: var(--error-color);
}

.upload-stats {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Buttons - Neues Design */
.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    text-align: center;
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(199, 210, 69, 0.25);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(199, 210, 69, 0.35);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-light);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1.125rem 2.25rem;
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.form-actions {
    text-align: center;
    margin-top: 2rem;
}

/* Results Section */
.results-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.results-grid {
    display: grid;
    gap: 2rem;
}

.result-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-md);
}

.result-image {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 1rem;
    border-radius: 0.5rem;
}

.result-image img {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 0.5rem;
}

.result-content {
    padding: 1.5rem;
}

.result-content h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.result-field {
    margin-bottom: 1rem;
}

.result-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.result-field p {
    color: var(--text-color);
    line-height: 1.5;
}

.translations {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.translations details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
}

.translation-group {
    margin-top: 1rem;
}

.translation-group h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    font-size: 1rem;
    color: var(--text-color);
}

.translation-group h4:first-child {
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .image-preview-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-color);
    color: var(--text-color);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #FAFBE8;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.language-option:hover {
    border-color: var(--primary-color);
    background: #f4f7d9;
}

.language-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.language-option span {
    font-weight: 600;
    color: var(--text-color);
}

.modal-actions-secondary {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
}

/* Alpine.js cloak */
[x-cloak] {
    display: none !important;
}

/* Copy to Clipboard Button */
.field-with-copy {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.field-with-copy p {
    flex: 1;
    margin: 0;
}

.btn-copy {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 600;
}

.btn-copy:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--text-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(199, 210, 69, 0.3);
}

.btn-copy:active {
    transform: translateY(0);
}

.btn-copy.copied {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--text-color);
    box-shadow: 0 2px 12px rgba(199, 210, 69, 0.5);
}

.btn-copy svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .language-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem 1.5rem;
    }
    
    .btn-copy {
        padding: 0.375rem;
    }
}

