/* ============================================
   PROMPT CATALOG (очищенный, без контейнера и сетки)
   ============================================ */

/* Бейдж тренда */
.prompt-card__trend-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #EF4444;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 3;
}
.prompt-card__trend-badge i { font-size: 14px; }

/* Цвет посещённых ссылок на тёмном фоне */
.prompt-card__neural-badge,
.prompt-card__trend-badge {
    color: #fff !important;
}
.prompt-card__neural-badge:visited,
.prompt-card__trend-badge:visited,
.prompt-card__neural-badge:hover,
.prompt-card__trend-badge:hover,
.prompt-card__neural-badge:active,
.prompt-card__trend-badge:active {
    color: #fff !important;
}

/* Карточка промта */
.prompt-card {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
}
.prompt-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.prompt-card__thumbnail {
    position: relative;
    display: block;
    height: 0;
    padding-bottom: 66.67%;
    overflow: hidden;
}
.prompt-card__image-link {
    display: block;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}
.prompt-card__img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}

.prompt-card__neural-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(4px);
    text-decoration: none;
    z-index: 2;
}
.prompt-card__neural-badge:hover { background: var(--color-primary-start); color: white; }

.prompt-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px 4px;
}
.prompt-card__theme-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--color-bg-light);
    color: var(--color-text-secondary);
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}
.prompt-card__theme-badge:hover { background: var(--primary-gradient); color: white; }
.prompt-card__rating-small {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.prompt-card__title {
    margin: 0 16px 6px;
    font-size: 1.1em;
    line-height: 1.3;
    font-weight: 600;
}
.prompt-card__title a { color: var(--color-text-primary); text-decoration: none; }
.prompt-card__title a:hover { color: var(--color-link); }

.prompt-card__excerpt {
    margin: 0 16px 12px;
    font-size: 0.8em;
    color: #888888;
    line-height: 1.2;
    flex-grow: 1;
}

.prompt-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}
.prompt-card__like {
    background: none; border: none; cursor: pointer;
    color: #9ca3af; padding: 0;
    display: flex; align-items: center; gap: 4px;
    transition: color 0.2s;
}
.prompt-card__like:hover { color: #ef4444; }
.prompt-card__like.liked { color: #ef4444; fill: #ef4444; }
.prompt-card__likes-count { font-size: 14px; font-weight: 500; }
.prompt-card__views {
    display: flex; align-items: center; gap: 4px;
    color: var(--color-text-secondary); font-size: 14px;
}
.prompt-card__generate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.1);
    color: #000;
    font-weight: 500;
    padding: 5px;
    font-size: 18px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    line-height: 1;
}
.prompt-card__generate:hover {
    background: #D97706;
    transform: scale(1.1);
}

/* ============================================
   SINGLE PROMPT
   ============================================ */
.prompt-single {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 32px;
    margin-bottom: 40px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.prompt-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    margin: 0;
}
.prompt-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-text-secondary);
}
.prompt-rating, .prompt-views {
    display: flex;
    align-items: center;
    gap: 4px;
}
.prompt-stat-divider { color: #D1D5DB; }
.prompt-primary-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.primary-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}
.primary-badge:hover { opacity: 0.85; }
.badge-neural {
    background: #E0FFF4;
    color: #065F46;
}
.badge-category {
    background: #DBEAFE;
    color: #1E40AF;
}
.prompt-block {
    background: linear-gradient(180deg, #F0F7FF 0%, #FFFFFF 100%);
    border: 1px solid #E0EAFF;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(30, 58, 95, 0.08);
    padding: 28px 32px;
    margin-bottom: 28px;
}
.prompt-tabs {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 12px;
    margin-bottom: 20px;
}
.prompt-tab {
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    padding-bottom: 12px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.prompt-tab.active {
    color: var(--color-primary-start);
    border-bottom-color: var(--color-primary-start);
}
.prompt-tab-content { display: none; }
.prompt-tab-content.active { display: block; }
.prompt-text-container { position: relative; }
.prompt-text {
    font-family: var(--font-mono);
    font-size: 14px;
    padding:20px;
    line-height: 1.7;
    color: #374151;
    white-space: pre-wrap;
    margin: 0;
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.prompt-text.expanded { max-height: none; }
.expand-prompt-btn {
    display: inline-block;
    margin-top: 8px;
    background: none;
    border: none;
    color: var(--color-link);
    cursor: pointer;
    font-size: 14px;
}
.expand-prompt-btn:hover { text-decoration: underline; }
.prompt-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.copy-btn {
    background: var(--primary-gradient);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-btn);
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.1s;
}
.copy-btn:active { transform: scale(0.97); }
.description-block { margin-bottom: 28px; }
.description-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 12px;
}
.description-text {
    font-size: 15px;
    line-height: 1.7;
    color: #4B5563;
    max-height: 96px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.description-text.expanded { max-height: none; }
.read-more-link {
    color: var(--color-primary-start);
    font-size: 14px;
    cursor: pointer;
    margin-top: 8px;
    display: inline-block;
    background: none;
    border: none;
}
.prompt-result { 
    margin-bottom: 28px;
}


.result-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}
.tags-section {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--color-border);
}
.tag-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.tag-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    min-width: 110px;
    flex-shrink: 0;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-badge {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    background: #F3F4F6;
    color: var(--color-text-secondary);
    border-radius: 14px;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.tag-badge:hover {
    background: var(--primary-gradient);
    color: #FFFFFF;
}
.prompt-rating-full {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

/* ============================================
   САЙДБАР промтов
   ============================================ */
.sidebar-prompt-section {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 24px;
    margin-bottom: 24px;
}
.sidebar-prompt-section__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 16px;
}
.sidebar-prompt-search input,
.sidebar-prompt-search select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 14px;
    margin-bottom: 12px;
    background: #fff;
}
.sidebar-prompt-search .button {
    width: 100%;
    margin-top: 8px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-btn);
    padding: 12px;
    font-weight: 600;
    cursor: pointer;
}
.sidebar-prompt-search .button-secondary {
    background: #F3F4F6;
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    margin-top: 8px;
}
.similar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #F3F4F6;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}
.similar-item:hover { background: #F9FAFB; }
.similar-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}
.similar-item-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #065F46;
}
.similar-item-title {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.similar-item-rating {
    font-size: 12px;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

/* Кнопка "В закладки" */
.ai-favorite-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-btn-cta);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.ai-favorite-button:hover { background: var(--color-link-hover); }

/* ============================================
   ПАГИНАЦИЯ
   ============================================ */
.pagination {
    text-align: center;
    margin: 30px 0;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 6px 14px;
    margin: 0 4px;
    border-radius: var(--radius-sm);
    background: var(--color-bg-light);
    color: var(--color-text-primary);
    text-decoration: none;
    transition: 0.2s;
    border: 1px solid var(--color-border);
}
.pagination .page-numbers.current {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}
.pagination .page-numbers:hover:not(.current) { background: var(--color-border); }

/* Похожие промты блок */
.related-prompts {
    margin-top: 60px;
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 32px;
}
.related-prompts__title {
    font-size: 24px; font-weight: 700;
    margin-bottom: 24px;
}
.related-prompts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 992px) { .related-prompts__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .related-prompts__grid { grid-template-columns: 1fr; } }

/* Сайдбар на странице промта */
.sidebar-prompt-single-section {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 24px;
    margin-bottom: 24px;
}
.sidebar-prompt-single-section__title {
    font-size: 16px; font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 16px;
}

.result-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}
.result-gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.result-items-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.result-item-video video,
.result-item-audio audio {
    width: 100%;
}
.result-item-text {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}