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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --success: #10b981;
    --error: #ef4444;
    --border-radius: 12px;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 50px;
}

header h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

main {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.input-section {
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px;
    background: var(--background);
    border: 2px solid var(--surface-light);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.generate-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    border-radius: 8px;
    padding: 15px;
    color: var(--error);
    margin-bottom: 20px;
}

.result-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--surface-light);
}

.result-section h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.image-container {
    background: var(--background);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.image-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 24px;
    background: var(--surface-light);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.action-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.examples-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--surface-light);
}

.examples-section h3 {
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.example-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.example-pill {
    padding: 10px 18px;
    background: var(--surface-light);
    color: var(--text-secondary);
    border: 1px solid var(--surface-light);
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-pill:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 20px;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 25px;
    }
    
    .container {
        padding: 20px 10px;
    }
}

