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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    height: 8px;
    border-radius: 4px;
    margin-top: 20px;
    overflow: hidden;
}

.progress-fill {
    background: white;
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    margin-top: 10px;
    font-size: 0.9em;
    opacity: 0.9;
}

.content {
    padding: 40px 30px;
}

.step-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    display: none;
}

.step-card.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: bold;
    margin-right: 20px;
}

.step-title {
    font-size: 1.6em;
    color: #333;
    font-weight: 600;
}

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

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.example-box {
    background: #fff9e6;
    border-left: 4px solid #ffc107;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 0.95em;
}

.example-label {
    font-weight: bold;
    color: #f57c00;
    margin-bottom: 8px;
    display: block;
}

.image-upload {
    margin-top: 15px;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
}

input[type="file"] {
    display: none;
}

.file-button {
    background: #e9ecef;
    color: #333;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid #dee2e6;
}

.file-button:hover {
    background: #dee2e6;
}

.file-list {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

button {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e9ecef;
    color: #333;
}

.btn-secondary:hover {
    background: #dee2e6;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.review-card {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.review-section {
    margin-bottom: 20px;
}

.review-section h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.review-section p {
    color: #555;
    line-height: 1.8;
}

.final-prompt {
    background: #e8f5e9;
    border: 3px solid #4caf50;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.final-prompt h3 {
    color: #2e7d32;
    margin-bottom: 15px;
}

.final-prompt-text {
    background: white;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.api-key-section {
    background: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.api-key-section h3 {
    color: #f57c00;
    margin-bottom: 10px;
}

input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    font-family: monospace;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.image-result {
    margin-top: 30px;
    text-align: center;
}

.image-result img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading.active {
    display: block;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.error-message {
    background: #ffebee;
    border: 2px solid #f44336;
    color: #c62828;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    display: none;
}

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

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

    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 1.6em;
    }

    .content {
        padding: 20px 15px;
    }

    .step-card {
        padding: 20px;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.4em;
    }

    .step-title {
        font-size: 1.3em;
    }

    .button-group {
        flex-direction: column;
    }
}
