/* Preview Section */
.preview-section {
    background: linear-gradient(145deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid #444444;
    padding: 2rem;
}

.preview-section h3 {
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.preview-item {
    flex: 1;
}

.preview-item img {
    max-width: 100%;
    max-height: 300px;
    border: 1px solid #444444;
}

.image-info {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(42, 42, 42, 0.5);
    color: #d1d5db;
    font-size: 0.875rem;
}

/* Settings Section */
.settings-section {
    margin: 2rem 0;
    background: linear-gradient(145deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid #444444;
    padding: 2rem;
}

.settings-section h3 {
    color: #ffffff;
    margin-bottom: 2rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    border-bottom: 1px solid #444444;
    padding-bottom: 1rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.setting-group {
    background: rgba(42, 42, 42, 0.3);
    border: 1px solid #444444;
    padding: 1.5rem;
}

.setting-group h4 {
    color: #2adb5c;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
}

.setting-item {
    margin-bottom: 1rem;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.setting-item input[type="number"],
.setting-item input[type="text"],
.setting-item select {
    width: 100%;
    padding: 10px 12px;
    background: #1a1a1a;
    border: 1px solid #444444;
    color: #ffffff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.setting-item input[type="number"]:focus,
.setting-item input[type="text"]:focus,
.setting-item select:focus {
    outline: none;
    border-color: #2adb5c;
    box-shadow: 0 0 0 2px rgba(42, 219, 92, 0.1);
}

.setting-item input[type="radio"] {
    margin-right: 0.5rem;
    accent-color: #2adb5c;
}

.setting-item small {
    display: block;
    color: #9ca3af;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Generate Section */
.generate-section {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #444444;
}

.generate-btn {
    background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 200px;
    justify-content: center;
}

.generate-btn:hover {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(42, 219, 92, 0.4);
}

.generate-btn:disabled {
    background: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Results Section */
.results-section {
    margin: 2rem 0;
    background: linear-gradient(145deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid #444444;
    padding: 2rem;
}

.results-section h3 {
    color: #ffffff;
    margin-bottom: 2rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    border-bottom: 1px solid #444444;
    padding-bottom: 1rem;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem 0;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #444444;
    border-top: 4px solid #2adb5c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading p {
    color: #d1d5db;
    font-size: 1.1rem;
}

/* Result Container */
.result-container {
    background: rgba(42, 42, 42, 0.3);
    border: 1px solid #444444;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #444444;
}

.result-header h4 {
    color: #2adb5c;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.result-actions {
    display: flex;
    gap: 0.75rem;
}

.action-btn {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.action-btn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* ASCII Preview */
.ascii-preview {
    background: #0a0a0a;
    border: 1px solid #333333;
    padding: 1.5rem;
    overflow: auto;
    max-height: 500px;
}

.ascii-preview pre {
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    line-height: 1;
    margin: 0;
    white-space: pre-wrap;
    word-break: keep-all;
    overflow-wrap: normal;
    user-select: all;
    -webkit-user-select: all;
    -moz-user-select: all;
    -ms-user-select: all;
}

#originalImage {
    width: auto;
}

/* Image Preview */
.image-preview {
    text-align: center;
    background: #0a0a0a;
    border: 1px solid #333333;
    padding: 1.5rem;
}

.image-preview img {
    max-width: 100%;
    max-height: 600px;
}

/* Result Info */
.result-info {
    background: rgba(42, 42, 42, 0.3);
    border: 1px solid #444444;
    padding: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(26, 26, 26, 0.5);
}

.info-label {
    color: #9ca3af;
    font-weight: 500;
}

.info-item span:last-child {
    color: #ffffff;
    font-weight: 600;
}

/* Examples Section */

.examples-section h3 {
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-align: center;
    border: 0;
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.example-item {
    background: rgba(42, 42, 42, 0.3);
    border: 1px solid #444444;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.example-item:hover {
    border-color: #2adb5c;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.example-icon {
    font-size: 3rem;
    color: #2adb5c;
    margin-bottom: 1rem;
}

.example-item h4 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;

    font-size: 1.25rem;
    font-weight: 600;
    background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.example-item p {
    color: #d1d5db;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Tips Section */
.tips-section {
    margin: 3rem 0;
}

.tips-section h3 {
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-align: center;
    border: 0;
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tip-item {
    background: rgba(42, 42, 42, 0.3);
    border: 1px solid #444444;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    transition: all 0.3s ease;
}

.tip-item:hover {
    border-color: #2adb5c;
    background: rgba(42, 42, 42, 0.5);
}

.tip-icon {
    font-size: 2rem;
    color: #2adb5c;
    flex-shrink: 0;
}

.tip-content h4 {
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tip-content p {
    color: #d1d5db;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .examples-grid,
    .tips-grid {
        grid-template-columns: 1fr;
    }

    .result-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .result-actions {
        width: 100%;
        justify-content: center;
    }

    .ascii-preview pre {
        font-size: 0.6rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .preview-container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .ascii-preview pre {
        font-size: 0.5rem;
    }

    .generate-btn {
        width: 100%;
        padding: 14px 24px;
    }

    .action-btn {
        flex: 1;
        justify-content: center;
    }
}