/**
 * Live Prompt Generator Styles
 * Glasmorphism design matching hohl.rocks aesthetic
 */

/* ============================================
   PROMPT GENERATOR SECTION
   ============================================ */

.prompt-generator-section {
    max-width: 1400px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.prompt-generator-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.prompt-generator-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.prompt-generator-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}

.prompt-generator-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   INPUT AREA
   ============================================ */

.prompt-input-area {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

#prompt-topic-input {
    flex: 1;
    min-width: 300px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    transition: all 0.3s ease;
}

#prompt-topic-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

#prompt-topic-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#generate-prompts-btn {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#generate-prompts-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

#generate-prompts-btn:active:not(:disabled) {
    transform: translateY(0);
}

#generate-prompts-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#generate-prompts-btn .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   RESULTS GRID
   ============================================ */

#prompt-results {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (min-width: 1200px) {
    #prompt-results {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    #prompt-results {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PROMPT CARDS
   ============================================ */

.prompt-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

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

.prompt-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.prompt-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.prompt-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.prompt-title h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.25rem 0;
}

.prompt-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.prompt-content {
    flex: 1;
}

.prompt-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.prompt-card-footer {
    margin-top: auto;
}

.copy-prompt-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.copy-prompt-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.copy-prompt-btn.copied {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
}

/* ============================================
   LOADING STATE
   ============================================ */

.prompt-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.prompt-loading p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   ERROR STATE
   ============================================ */

.prompt-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.prompt-error h3 {
    font-size: 1.5rem;
    color: #ff6b6b;
    margin-bottom: 0.5rem;
}

.prompt-error p {
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(16px);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-left: 4px solid #51cf66;
}

.toast-error {
    border-left: 4px solid #ff6b6b;
}

.toast-warning {
    border-left: 4px solid #ffd43b;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .prompt-generator-container {
        padding: 2rem 1.5rem;
    }

    .prompt-generator-header h2 {
        font-size: 2rem;
    }

    .prompt-input-area {
        flex-direction: column;
    }

    #prompt-topic-input,
    #generate-prompts-btn {
        width: 100%;
    }

    .toast {
        right: 1rem;
        bottom: 1rem;
        left: 1rem;
    }
}
