/* ========================================================
   SAMPPLAY - Knowledge Base & Articles Stylesheet (guide.css)
   Clean, matte dark slate aesthetic complying with GEMINI.md
   ======================================================== */

:root {
    --bg-dark: #0a0b14;
    --bg-card: rgba(18, 20, 32, 0.95);
    --bg-card-hover: rgba(24, 27, 44, 0.98);
    --bg-input: rgba(12, 14, 24, 0.9);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(0, 210, 255, 0.25);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-cyan: #00d2ff;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-amber: #f59e0b;
    --accent-purple: #a855f7;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── TOPBAR NAVIGATION ── */
.guide-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(10, 11, 20, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}

.guide-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.guide-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid var(--border-highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    font-size: 1.1rem;
}

.guide-nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}

.guide-nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.guide-nav-links a:hover,
.guide-nav-links a.active {
    color: var(--accent-cyan);
}

.btn-nav-primary {
    background: var(--accent-cyan);
    color: #070913 !important;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    border: none;
    transition: opacity 0.2s ease;
}

.btn-nav-primary:hover {
    opacity: 0.92;
}

/* ── CONTAINER ── */
.guide-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    width: 100%;
    flex: 1;
}

/* ── HERO BANNER ── */
.guide-hero {
    text-align: center;
    padding: 30px 20px 45px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 40px;
}

.guide-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid var(--border-highlight);
    color: var(--accent-cyan);
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.guide-hero h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 14px;
    line-height: 1.25;
}

.guide-hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 680px;
    margin: 0 auto 24px;
}

/* ── CATEGORY PILLS ── */
.category-filter-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 35px;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 99px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-pill:hover,
.category-pill.active {
    background: rgba(0, 210, 255, 0.12);
    border-color: var(--border-highlight);
    color: var(--accent-cyan);
}

.category-pill .badge-count {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.75rem;
}

/* ── ARTICLES GRID ── */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    text-decoration: none;
    color: inherit;
}

.article-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-highlight);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.card-header-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--accent-cyan);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.read-time {
    color: var(--text-muted);
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.article-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    color: #ffffff;
    margin-bottom: 12px;
    transition: color 0.2s ease;
}

.article-card:hover .article-card-title {
    color: var(--accent-cyan);
}

.article-card-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-footer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.read-more-link {
    color: var(--accent-cyan);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ── ARTICLE DETAIL LAYOUT ── */
.article-detail-wrap {
    max-width: 820px;
    margin: 0 auto;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumb-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-nav a:hover {
    color: var(--accent-cyan);
}

.breadcrumb-separator {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.article-main-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 44px 38px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    margin-bottom: 40px;
}

.article-header {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 30px;
    margin-bottom: 35px;
}

.article-header h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.3;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
}

.article-info-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.article-info-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ── PROSE / CONTENT STYLING ── */
.article-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 40px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
    letter-spacing: -0.01em;
}

.article-body h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 28px 0 12px;
}

.article-body p {
    color: #cbd5e1;
    font-size: 1.02rem;
    margin-bottom: 20px;
    line-height: 1.8;
}

.article-body ul,
.article-body ol {
    margin: 0 0 24px 24px;
    color: #cbd5e1;
}

.article-body li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.article-body strong {
    color: #ffffff;
}

.article-body code {
    background: rgba(0, 210, 255, 0.08);
    color: var(--accent-cyan);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    border: 1px solid rgba(0, 210, 255, 0.15);
}

/* Callout Boxes */
.callout {
    padding: 20px 24px;
    border-radius: 12px;
    margin: 28px 0;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.callout-info {
    background: rgba(0, 210, 255, 0.05);
    border-color: rgba(0, 210, 255, 0.2);
    color: #e2e8f0;
}

.callout-info strong {
    color: var(--accent-cyan);
    display: block;
    margin-bottom: 8px;
}

.callout-warn {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.25);
    color: #e2e8f0;
}

.callout-warn strong {
    color: #fbbf24;
    display: block;
    margin-bottom: 8px;
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    margin: 28px 0;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    text-align: left;
}

th, td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
}

th {
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    font-weight: 700;
}

td {
    color: #cbd5e1;
}

tr:last-child td {
    border-bottom: none;
}

/* ── ADSENSE AD BOX ── */
.ad-slot-box {
    margin: 35px 0;
    padding: 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
}

.ad-slot-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

/* ── RELATED ARTICLES ── */
.related-section {
    margin-top: 40px;
}

.related-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
}

/* ── FOOTER ── */
.guide-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 30px 20px;
    background: rgba(10, 11, 20, 0.95);
    color: var(--text-muted);
    font-size: 0.88rem;
}

.guide-footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.guide-footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.guide-footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.guide-footer-links a:hover {
    color: var(--accent-cyan);
}

/* Responsive */
@media (max-width: 768px) {
    .guide-nav {
        flex-direction: column;
        gap: 14px;
        padding: 14px 16px;
    }
    .guide-nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
    }
    .article-main-card {
        padding: 28px 20px;
    }
    .articles-grid {
        grid-template-columns: 1fr;
    }
    .guide-footer-inner {
        flex-direction: column;
        text-align: center;
    }
}
