/* Explore Page Specific Styles */

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 20px;
    max-width: 480px;
    margin: 32px auto 0;
}

.search-box svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: 16px;
    color: var(--text);
    font-family: inherit;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.section-title-left {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}

/* Categories Row */
.categories-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.categories-row::-webkit-scrollbar {
    display: none;
}

.category-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-chip:hover {
    background: var(--surface-light);
    border-color: var(--primary);
}

.category-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.category-chip .emoji {
    font-size: 18px;
}

/* Prompts Grid */
.prompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.prompt-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prompt-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.prompt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.prompt-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.prompt-card-preview {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prompt-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.prompt-card-category {
    font-size: 12px;
    color: var(--primary);
    background: rgba(249, 115, 22, 0.1);
    padding: 4px 10px;
    border-radius: 8px;
}

.prompt-card-copies {
    font-size: 12px;
    color: var(--text-muted);
}

/* Load More */
.load-more {
    text-align: center;
    margin-top: 40px;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-light);
    border: none;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--primary);
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-badge {
    margin-bottom: 20px;
}

.modal-prompt-box {
    background: #000;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.modal-prompt-text {
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    white-space: pre-wrap;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions .btn {
    flex: 1;
}

/* Loading */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 300;
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--surface-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text);
}

/* Responsive */
@media (max-width: 768px) {
    .prompts-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 24px;
    }

    .modal-actions {
        flex-direction: column;
    }
}