.generator-section {
    padding: 3rem 0;
}

.generator-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out;
}

.generator-title {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    font-family: 'Space Grotesk', sans-serif;
}

.generator-subtitle {
    color: #94a3b8;
    font-size: 1.1rem;
}

.generator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Controls */
.generator-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-label {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.95rem;
}

.optional-label {
    font-weight: 400;
    color: #64748b;
    font-size: 0.8rem;
}

.prompt-input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #334155;
    border-radius: 0.8rem;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s;
    min-height: 120px;
}

.prompt-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.prompt-input::placeholder {
    color: #475569;
}

.prompt-char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #64748b;
}

.negative-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #334155;
    border-radius: 0.8rem;
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.negative-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.negative-input::placeholder {
    color: #475569;
}

.settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.half {
    flex: 1;
}

.style-select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #334155;
    border-radius: 0.8rem;
    color: white;
    font-size: 0.95rem;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s;
}

.style-select:focus {
    outline: none;
    border-color: #8b5cf6;
}

.style-select option {
    background: #1e293b;
    color: white;
}

.image-count-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.count-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #334155;
    background: transparent;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.count-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
}

.count-display {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    min-width: 30px;
    text-align: center;
}

/* Quick Prompts */
.quick-prompts {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.quick-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.prompt-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.prompt-tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.prompt-tag:hover {
    background: rgba(139, 92, 246, 0.15);
    color: white;
    border-color: rgba(139, 92, 246, 0.3);
    transform: scale(1.05);
}

/* Preview Panel */
.generator-preview {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    overflow: hidden;
}

.preview-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h3 {
    color: white;
    font-size: 1.2rem;
}

.preview-status {
    font-size: 0.85rem;
    padding: 0.2rem 0.8rem;
    border-radius: 2rem;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    transition: all 0.3s;
}

.preview-body {
    padding: 2rem;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
}

.image-container .image-item {
    position: relative;
    border-radius: 0.8rem;
    overflow: hidden;
    aspect-ratio: 1/1;
    transition: all 0.3s;
    cursor: pointer;
}



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

.image-container .image-item .image-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.8rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-container .image-item:hover .image-actions {
    opacity: 1;
}

.image-container .image-item .image-actions button {
    flex: 1;
    padding: 0.3rem 0.5rem;
    border: none;
    border-radius: 0.4rem;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s;
}

.image-container .image-item .image-actions .download-img {
    background: #22c55e;
    color: white;
}

.image-container .image-item .image-actions .download-img:hover {
    background: #16a34a;
}

.image-container .image-item .image-actions .copy-prompt-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.image-container .image-item .image-actions .copy-prompt-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.empty-state {
    text-align: center;
    color: #64748b;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #334155;
}

.empty-state h4 {
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.loading-state {
    text-align: center;
}

.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* History Section */
.history-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    padding: 1rem 1.5rem;
}

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

.history-header h4 {
    color: white;
    font-size: 1rem;
}

.history-actions {
    display: flex;
    gap: 0.5rem;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
}

.history-list::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 2px;
}

.history-empty {
    text-align: center;
    color: #64748b;
    padding: 0.5rem 0;
}

.history-empty p {
    font-size: 0.9rem;
}

.history-empty span {
    font-size: 0.8rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 0.8rem;
    border-radius: 0.6rem;
    cursor: pointer;
    transition: all 0.3s;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.history-item img {
    width: 40px;
    height: 40px;
    border-radius: 0.4rem;
    object-fit: cover;
    flex-shrink: 0;
}

.history-item-info {
    flex: 1;
    min-width: 0;
}

.history-item-prompt {
    font-size: 0.8rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-time {
    font-size: 0.65rem;
    color: #64748b;
}

.history-item-select {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #94a3b8;
    padding: 0.1rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.6rem;
    cursor: pointer;
    transition: all 0.3s;
}

.history-item-select:hover {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.image-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 1rem;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: -2rem;
    right: -2rem;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #94a3b8;
}

.image-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 968px) {
    .generator-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .generator-title {
        font-size: 2.5rem;
    }
    
    .settings-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .image-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .generator-section {
        padding: 1.5rem 0;
    }
    
    .generator-title {
        font-size: 2rem;
    }
    
    .settings-row {
        grid-template-columns: 1fr;
    }
    
    .image-container {
        grid-template-columns: 1fr;
    }
    
    .image-modal-content {
        max-width: 100%;
        max-height: 100%;
    }
    
    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 2rem;
    }
}
/* ===== RESPONSIVE ADDITIONS ===== */
@media (max-width: 768px) {
    .generator-grid {
        gap: 1.5rem;
    }
    
    .prompt-input {
        min-height: 100px;
        font-size: 0.95rem;
    }
    
    .preview-header {
        padding: 1rem 1.2rem;
    }
    
    .preview-header h3 {
        font-size: 1rem;
    }
    
    .preview-body {
        padding: 1rem;
        min-height: 200px;
    }
    
    .image-container {
        gap: 0.8rem;
    }
    
    .image-container .image-item .image-actions button {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
    }
    
    .history-section {
        padding: 0.8rem 1rem;
    }
    
    .history-item {
        padding: 0.4rem 0.6rem;
    }
    
    .history-item img {
        width: 32px;
        height: 32px;
    }
    
    .history-item-prompt {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .generator-title {
        font-size: 1.6rem;
    }
    
    .generator-subtitle {
        font-size: 0.9rem;
    }
    
    .preview-body {
        padding: 0.8rem;
        min-height: 150px;
    }
    
    .image-container {
        gap: 0.5rem;
    }
    
    .empty-icon {
        font-size: 3rem;
    }
    
    .empty-state h4 {
        font-size: 1rem;
    }
    
    .empty-state p {
        font-size: 0.85rem;
    }
}