/* Detail Page Styles */

.detail-page {
    padding: 100px 0 60px;
    min-height: calc(100vh - 200px);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent);
}

.detail-article {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px;
    margin-bottom: 48px;
}

.detail-header {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.detail-tag {
    font-size: 0.75rem;
    padding: 4px 12px;
    background: var(--accent);
    border-radius: 4px;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-date {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.detail-article h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.detail-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.detail-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.detail-content p {
    margin-bottom: 20px;
}

.detail-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 32px 0 16px;
}

.detail-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 12px;
}

.detail-content ul, .detail-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.detail-content li {
    margin-bottom: 8px;
}

.detail-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Stats Grid */
.detail-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 32px 0;
    padding: 24px;
    background: var(--bg-primary);
    border-radius: var(--radius);
}

.detail-stat {
    text-align: center;
}

.detail-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

.detail-stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Benchmark Table in Detail */
.detail-benchmarks {
    margin: 32px 0;
    overflow-x: auto;
}

.detail-benchmarks table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.detail-benchmarks th,
.detail-benchmarks td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.detail-benchmarks th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-benchmarks td {
    color: var(--text-secondary);
}

.detail-benchmarks .score-highlight {
    color: var(--success);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

/* Pricing Info */
.detail-pricing {
    margin: 32px 0;
    padding: 24px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border-left: 4px solid var(--accent);
}

.detail-pricing h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.pricing-row:last-child {
    border-bottom: none;
}

.pricing-label {
    color: var(--text-secondary);
}

.pricing-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--success);
}

/* Context & Specs */
.detail-specs {
    margin: 32px 0;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: 8px;
}

.spec-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.spec-value {
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

/* Key Highlights */
.key-highlights {
    margin: 32px 0;
}

.key-highlights ul {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.key-highlights li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.key-highlights li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

/* Related News */
.related-news {
    margin-top: 64px;
}

.related-news h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.related-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s;
}

.related-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.related-card .news-meta {
    margin-bottom: 12px;
}

.related-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.related-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 48px;
    color: var(--text-muted);
}

/* Error State */
.error-state {
    text-align: center;
    padding: 64px 24px;
}

.error-state h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.error-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 1024px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .detail-article {
        padding: 24px;
    }
    
    .detail-article h1 {
        font-size: 1.75rem;
    }
    
    .detail-subtitle {
        font-size: 1.0625rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
