/**
 * Styles cho AI Image Generator
 */

/* Container chính */
.aiig-generator-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.aiig-generator-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.aiig-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 30px 0;
    color: #1a1a1a;
}

/* Info Bar */
.aiig-info-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
}

.aiig-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.aiig-info-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.aiig-info-value {
    font-size: 24px;
    font-weight: 700;
}

/* Upload Section */
.aiig-upload-section {
    margin-bottom: 30px;
}

.aiig-upload-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #333;
}

.aiig-upload-area {
    border: 3px dashed #d0d0d0;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer !important;
    transition: all 0.3s ease;
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.aiig-upload-area:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: scale(1.01);
}

.aiig-upload-area:active {
    transform: scale(0.99);
}

.aiig-upload-area.aiig-dragover {
    border-color: #667eea;
    background: #f0f2ff;
    transform: scale(1.02);
}

.aiig-upload-placeholder {
    cursor: pointer !important;
    pointer-events: all;
}

.aiig-upload-placeholder svg {
    color: #999;
    margin-bottom: 15px;
    pointer-events: none;
}

.aiig-upload-placeholder p {
    font-size: 16px;
    color: #555;
    margin: 0 0 10px 0;
    font-weight: 600;
    pointer-events: none;
}

.aiig-upload-note {
    display: block;
    font-size: 12px;
    color: #999;
    pointer-events: none;
}

/* Backup Upload Button */
.aiig-upload-button-backup {
    padding: 12px 24px;
    cursor: pointer !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.aiig-upload-button-backup:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.aiig-upload-button-backup:active {
    transform: translateY(0);
}

.aiig-upload-preview {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.aiig-upload-preview img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.aiig-remove-image {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e74c3c;
    color: white;
    border: 2px solid white;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aiig-remove-image:hover {
    background: #c0392b;
    transform: scale(1.1);
}

/* Prompt Section */
.aiig-prompt-section {
    margin-bottom: 30px;
}

.aiig-prompt-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #333;
}

.aiig-form-group {
    margin-bottom: 20px;
    position: relative;
}

.aiig-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.aiig-form-group .description {
    font-size: 12px;
    color: #666;
    margin: 5px 0 0 0;
    font-style: italic;
}

/* Prompt Select Dropdown */
.aiig-prompt-select {
    width: 100%;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.aiig-prompt-select:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.aiig-prompt-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Prompt Selected Animation */
.aiig-prompt-select.aiig-prompt-loaded {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
    animation: aiig-prompt-pulse 1s ease;
}

/* Prompt Textarea - REMOVED (using dropdown only) */

@keyframes aiig-prompt-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.01);
    }
}

/* Character counter - REMOVED (not needed with dropdown) */

/* Submit Button */
.aiig-submit-btn {
    width: 100%;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.aiig-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.aiig-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.aiig-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.aiig-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: aiig-spin 0.8s linear infinite;
}

@keyframes aiig-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Result Section */
.aiig-result-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.aiig-result-section h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-align: center;
    color: #333;
}

.aiig-result-container {
    max-width: 600px;
    margin: 0 auto;
}

.aiig-result-image {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.aiig-result-image img {
    width: 100%;
    height: auto;
    display: block;
}

.aiig-result-actions {
    display: flex;
    gap: 15px;
}

.aiig-action-btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.aiig-download-btn {
    background: #27ae60;
    color: white;
}

.aiig-download-btn:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.aiig-reset-btn {
    background: #95a5a6;
    color: white;
}

.aiig-reset-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

/* Messages */
.aiig-messages {
    margin-top: 20px;
}

.aiig-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    animation: aiig-slideIn 0.3s ease;
}

@keyframes aiig-slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aiig-alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.aiig-alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.aiig-alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.aiig-alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Responsive */
@media (max-width: 768px) {
    .aiig-generator-container {
        padding: 20px;
    }
    
    .aiig-title {
        font-size: 24px;
    }
    
    .aiig-info-bar {
        flex-direction: column;
        gap: 20px;
    }
    
    .aiig-upload-area {
        padding: 30px 20px;
    }
    
    .aiig-result-actions {
        flex-direction: column;
    }
}

