2026-06-02 10:36:02 +02:00

509 lines
8.7 KiB
CSS

/* Post Detail page - Full prompt view, rating, example output, unlock button */
.post-detail-main {
flex: 1;
display: flex;
justify-content: center;
padding: 20px 32px;
background: transparent;
}
.post-detail-container {
max-width: 900px;
width: 100%;
background: #fff;
border-radius: 18px;
box-shadow: 0 2px 8px rgba(59, 130, 246, 0.06);
padding: 32px;
transition: box-shadow 0.2s;
}
.post-detail-container:hover {
box-shadow: 0 8px 20px rgba(59, 130, 246, 0.12);
}
/* Header */
.post-header {
margin-bottom: 28px;
border-bottom: 1px solid #eef2f7;
padding-bottom: 20px;
}
.post-title {
font-size: 2rem;
font-weight: 800;
margin-bottom: 12px;
}
.post-meta {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-bottom: 12px;
}
.category {
background: #f1f5f9;
padding: 4px 12px;
border-radius: 30px;
font-size: 0.8rem;
font-weight: 600;
color: #3b82f6;
}
.updated {
font-size: 0.85rem;
color: #64748b;
}
.post-stats {
display: flex;
gap: 20px;
font-size: 0.9rem;
color: #475569;
}
.post-stats i {
margin-right: 6px;
}
/* Prompt Section */
.prompt-section {
margin-bottom: 28px;
}
.prompt-section h2 {
font-size: 1.3rem;
font-weight: 700;
margin-bottom: 16px;
letter-spacing: -0.3px;
}
.prompt-content {
background: #f8fafc;
padding: 20px;
border-radius: 16px;
font-size: 1rem;
line-height: 1.5;
color: #1e293b;
}
.prompt-content ul {
margin-top: 12px;
padding-left: 20px;
}
.prompt-content li {
margin-bottom: 6px;
}
/* Rating & Like */
.rating-section {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 16px;
margin-bottom: 28px;
padding-bottom: 20px;
border-bottom: 1px solid #eef2f7;
}
.rating-stars {
display: flex;
gap: 20px;
font-size: 1.1rem;
font-weight: 700;
}
.rating-stars i {
color: #f59e0b;
margin-right: 6px;
}
.like-btn {
background: none;
border: 1px solid #e2e8f0;
padding: 8px 18px;
border-radius: 30px;
font-size: 0.9rem;
font-weight: 600;
color: #475569;
cursor: pointer;
transition: all 0.2s;
}
.like-btn:hover {
background: #f1f5f9;
border-color: #cbd5e1;
}
.like-btn i {
margin-right: 6px;
}
/* Reviews */
.reviews-section {
margin-top: 18px;
}
.reviews-section h2 {
font-size: 1.3rem;
font-weight: 700;
margin-bottom: 28px;
}
.review-form {
background: #f8fafc;
border: 1px solid #eef2f7;
border-radius: 16px;
padding: 22px;
margin-bottom: 28px;
}
.review-form h3 {
font-size: 1.2rem;
margin-bottom: 16px;
}
.review-star-input {
display: flex;
gap: 10px;
margin-bottom: 18px;
}
.review-star-input button {
border: none;
background: transparent;
color: #f59e0b;
cursor: pointer;
font-family: inherit;
font-size: 2.4rem;
line-height: 1;
padding: 0 2px;
}
.review-form textarea {
width: 100%;
border: 1px solid #e2e8f0;
border-radius: 12px;
color: #111827;
display: block;
font: inherit;
font-size: 1rem;
line-height: 1.5;
margin-bottom: 16px;
min-height: 96px;
padding: 14px 16px;
resize: vertical;
}
.review-form textarea:focus {
border-color: #a855f7;
box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.14);
outline: none;
}
.review-form button#submit-review-btn {
background: var(--gradient);
border: none;
border-radius: 14px;
color: #fff;
cursor: pointer;
font: inherit;
font-size: 1rem;
font-weight: 700;
padding: 12px 24px;
}
.review-form button#submit-review-btn:disabled {
cursor: wait;
opacity: 0.7;
}
#review-message {
color: #64748b;
font-size: 0.9rem;
margin-top: 12px;
}
.reviews-list {
display: grid;
gap: 14px;
}
.review-card {
border: 1px solid #eef2f7;
border-radius: 14px;
padding: 16px 18px;
}
.review-card-header {
align-items: center;
display: flex;
gap: 10px;
margin-bottom: 10px;
}
.review-card-user {
font-weight: 700;
}
.review-card-stars {
color: #f59e0b;
font-size: 1.2rem;
letter-spacing: 1px;
margin-left: auto;
}
.review-card-comment {
color: #334155;
line-height: 1.45;
margin: 0;
}
/* Example Output Section */
.example-section {
margin-bottom: 32px;
}
.example-section h2 {
font-size: 1.3rem;
font-weight: 700;
margin-bottom: 16px;
}
.example-content {
background: #ffffff;
border: 1px solid #eef2f7;
border-radius: 16px;
padding: 20px;
}
.example-content h3 {
font-size: 1rem;
font-weight: 700;
margin-bottom: 12px;
color: #3b82f6;
}
.example-output-text {
font-size: 0.95rem;
line-height: 1.5;
color: #334155;
}
.example-output-text p {
margin-bottom: 12px;
}
.example-image {
margin-top: 16px;
}
.example-image img {
max-width: 100%;
border-radius: 12px;
}
/* Unlock Section */
.unlock-section {
text-align: center;
margin-top: 16px;
}
.unlock-btn {
background: var(--gradient);
border: none;
padding: 14px 32px;
border-radius: 40px;
font-size: 1.1rem;
font-weight: 700;
color: white;
cursor: pointer;
transition: opacity 0.2s;
}
.unlock-btn:hover {
opacity: 0.9;
}
/* Responsive */
@media (max-width: 768px) {
.post-detail-main {
padding: 16px;
}
.post-detail-container {
padding: 24px;
}
.post-title {
font-size: 1.6rem;
}
}
@media (max-width: 480px) {
.post-detail-container {
padding: 20px;
}
.rating-section {
flex-direction: column;
align-items: flex-start;
}
.prompt-content {
padding: 16px;
}
}
/* ── Loading / error states ──────────────────────────────────────────── */
#detail-loading {
text-align: center;
padding: 60px 20px;
color: #64748b;
}
/* Smaller state icons for this page */
#detail-loading .state-icon,
#detail-error .state-icon {
font-size: 2.5rem;
margin-bottom: 12px;
}
#detail-error-msg {
color: #64748b;
margin-top: 8px;
}
.detail-back-btn {
margin-top: 20px;
padding: 10px 24px;
background: #6366f1;
color: #fff;
border: none;
border-radius: 10px;
font-weight: 600;
cursor: pointer;
}
/* ── Detail body ─────────────────────────────────────────────────────── */
#detail-body {
display: none;
}
.detail-creator-row {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 16px;
}
#creator-avatar {
width: 42px;
height: 42px;
border-radius: 50%;
background: #6366f1;
color: #fff;
font-weight: 700;
font-size: 1.1rem;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
#creator-name {
font-weight: 600;
font-size: 0.95rem;
}
#prompt-date {
display: block;
font-size: 0.8rem;
color: #94a3b8;
}
.detail-actions-right {
margin-left: auto;
}
#edit-prompt-btn {
display: none;
margin-left: 10px;
padding: 6px 14px;
border: none;
border-radius: 10px;
background: #f1f5f9;
color: #334155;
font-weight: 700;
cursor: pointer;
}
#prompt-body {
white-space: pre-wrap;
font-family: monospace;
background: #f8fafc;
border-radius: 10px;
padding: 16px;
font-size: 0.9rem;
line-height: 1.7;
}
#example-section {
display: none;
}
#example-output-text {
white-space: pre-wrap;
}
#example-image {
display: none;
}
/* ── Locked section ──────────────────────────────────────────────────── */
#locked-section {
display: none;
text-align: center;
padding: 40px 20px;
background: #f8fafc;
border-radius: 12px;
margin-bottom: 28px;
}
.locked-icon {
font-size: 2.5rem;
color: #94a3b8;
display: block;
margin-bottom: 12px;
}
.locked-title {
margin-bottom: 8px;
}
.locked-desc {
color: #64748b;
margin-bottom: 20px;
}
#locked-subscribe-btn {
padding: 12px 28px;
background: #6366f1;
color: #fff;
border: none;
border-radius: 10px;
font-weight: 600;
cursor: pointer;
font-size: 1rem;
}
.detail-heart-icon {
color: #ef4444;
}
.detail-bookmark-span {
margin-left: 12px;
}
.detail-bookmark-icon {
color: #f59e0b;
}
.detail-loading-text {
color: #94a3b8;
}
.detail-error-text {
color: #ef4444;
}
.rating-stars-display {
font-size: 1.1rem;
color: #f59e0b;
}
.rating-value {
margin-left: 8px;
font-weight: 600;
}
.rating-count {
font-size: 0.85rem;
color: #94a3b8;
margin-left: 4px;
}
.rating-none {
font-size: 0.9rem;
color: #94a3b8;
}
.tier-badge-paid {
background: #fef3c7;
color: #92400e;
border-radius: 20px;
padding: 4px 14px;
font-size: 0.8rem;
font-weight: 600;
}
.tier-badge-tier {
background: #f1f5f9;
color: #475569;
border-radius: 20px;
padding: 4px 14px;
font-size: 0.8rem;
font-weight: 600;
}
.tier-badge-free {
background: #dcfce7;
color: #166534;
border-radius: 20px;
padding: 4px 14px;
font-size: 0.8rem;
font-weight: 600;
}