/**
 * IMAGE GENERATION UI STYLES
 * Professional AI image generation interface
 */

/* ===== API KEY MODAL ===== */
.api-key-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s;
}

.api-key-modal.show {
    opacity: 1;
}

.api-key-content {
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    border-radius: 20px;
}

.api-key-content h2 {
    font-size: 2rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #00ff88, #8338ec);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.api-key-content > p {
    color: #b4b9d3;
    margin-bottom: 32px;
}

.api-key-section {
    margin-bottom: 32px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.api-key-section h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.api-key-section p {
    font-size: 0.875rem;
    color: #b4b9d3;
    margin-bottom: 12px;
}

.api-key-section a {
    color: #00ff88;
    text-decoration: none;
    font-weight: 600;
}

.api-key-section a:hover {
    text-decoration: underline;
}

.api-key-section input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    margin-bottom: 8px;
}

.api-key-section input:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.api-key-section small {
    display: block;
    font-size: 0.75rem;
    color: #6b7299;
}

.api-key-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.api-key-actions .btn {
    flex: 1;
}

.note {
    margin-top: 24px;
    padding: 16px;
    background: rgba(0, 217, 255, 0.1);
    border-left: 4px solid #00d9ff;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #b4b9d3;
}

/* ===== GENERATION PROGRESS ===== */
.generation-progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s;
}

.generation-progress-modal.show {
    opacity: 1;
}

.generation-content {
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    min-width: 400px;
}

.generation-content h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.generation-content p {
    color: #b4b9d3;
    margin-bottom: 24px;
}

#gen-progress, #achievement-gen-progress, #collection-gen-progress {
    background: linear-gradient(90deg, #00ff88, #8338ec);
    transition: width 0.5s ease-out;
}

#gen-count, #achievement-gen-count, #collection-gen-count {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 16px 0;
    background: linear-gradient(135deg, #00ff88, #8338ec);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.generation-content small {
    display: block;
    margin-top: 16px;
    font-size: 0.875rem;
    color: #6b7299;
}

/* ===== SUCCESS NOTIFICATION ===== */
.success-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 10002;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.success-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.success-content {
    padding: 40px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid #00ff88;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.5);
}

.success-content h3 {
    font-size: 2rem;
    margin-bottom: 16px;
    color: #00ff88;
}

.success-content p {
    color: #b4b9d3;
    margin-bottom: 24px;
}

/* ===== MASTER PROGRESS MODAL ===== */
.master-progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10003;
    opacity: 0;
    transition: opacity 0.3s;
}

.master-progress-modal.show {
    opacity: 1;
}

.master-progress-content {
    padding: 48px;
    border-radius: 24px;
    text-align: center;
    min-width: 500px;
    max-width: 90vw;
}

.master-progress-content h2 {
    font-size: 2.5rem;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #00ff88, #8338ec);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#master-status {
    font-size: 1.25rem;
    color: #b4b9d3;
    margin-bottom: 24px;
    min-height: 30px;
}

#master-progress {
    background: linear-gradient(90deg, #00ff88, #8338ec);
    transition: width 0.5s ease-out;
}

#master-percent {
    font-size: 3rem;
    font-weight: 700;
    margin: 24px 0;
    background: linear-gradient(135deg, #00ff88, #8338ec);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== MASTER SUCCESS ===== */
.master-success-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 10004;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.master-success-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.master-success-content {
    padding: 48px;
    border-radius: 24px;
    text-align: center;
    min-width: 500px;
    max-width: 90vw;
    border: 3px solid #00ff88;
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.5);
}

.master-success-content h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: #00ff88;
}

.success-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 32px 0;
}

.success-stats .stat {
    padding: 24px;
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 16px;
}

.success-stats .stat-value {
    font-size: 3rem;
    margin-bottom: 8px;
}

.success-stats .stat-label {
    font-size: 0.875rem;
    color: #b4b9d3;
    text-transform: uppercase;
}

/* ===== IMAGE SETTINGS MODAL ===== */
.image-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-settings-modal.show {
    opacity: 1;
}

.image-settings-content {
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    border-radius: 20px;
}

.image-settings-content h2 {
    font-size: 2rem;
    margin-bottom: 32px;
}

.settings-section {
    margin-bottom: 32px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.settings-section h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: #00ff88;
}

.provider-status {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.provider {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.provider.active {
    border-left: 4px solid #00ff88;
}

.provider.inactive {
    border-left: 4px solid #6b7299;
    opacity: 0.6;
}

.category-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

/* ===== GENERATED IMAGES IN UI ===== */
.quest-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 16px;
}

.quest-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(131, 56, 236, 0.1));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    margin-bottom: 16px;
}

.collection-card-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(131, 56, 236, 0.1));
}

.detail-image {
    max-width: 300px;
    width: 100%;
    border-radius: 16px;
    margin: 0 auto 24px;
    display: block;
}

.notif-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
}

.achievement-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 12px;
}

.achievement-notification .achievement-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    animation: achievement-image-bounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes achievement-image-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.1); }
}

/* ===== LOADING STATE ===== */
.image-loading {
    position: relative;
    overflow: hidden;
}

.image-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: image-shimmer 2s infinite;
}

@keyframes image-shimmer {
    to { left: 100%; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .api-key-content,
    .image-settings-content {
        padding: 24px;
    }
    
    .api-key-actions {
        flex-direction: column;
    }
    
    .generation-content,
    .master-progress-content,
    .master-success-content {
        min-width: auto;
        width: 90%;
        padding: 24px;
    }
    
    .success-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .category-buttons {
        grid-template-columns: 1fr;
    }
}
