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

:root {
    --bg: #0a0a0a;
    --surface: #141414;
    --surface-hover: #1a1a1a;
    --border: #222;
    --text: #e5e5e5;
    --text-muted: #888;
    --accent: #fff;
    --badge-product: #ef4444;
    --badge-audience: #f59e0b;
    --badge-funnels: #8b5cf6;
    --badge-marketing: #3b82f6;
    --badge-content: #10b981;
    --badge-sales: #ec4899;
    --badge-youtube: #6366f1;
    --badge-tools: #f97316;
    --badge-dev: #64748b;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.hero {
    text-align: center;
    padding: 60px 0 48px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 0%, #999 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    justify-content: center;
}

.filter-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.filter-btn.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* Table */
.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.skills-table {
    width: 100%;
    border-collapse: collapse;
}

.skills-table thead {
    border-bottom: 1px solid var(--border);
}

.skills-table th {
    text-align: left;
    padding: 16px 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 500;
}

.skills-table td {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    vertical-align: middle;
}

.skills-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}

.skills-table tbody tr:hover {
    background: var(--surface-hover);
}

.skill-name {
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
}

.skill-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-product { background: var(--badge-product); color: #fff; }
.badge-audience { background: var(--badge-audience); color: #000; }
.badge-funnels { background: var(--badge-funnels); color: #fff; }
.badge-marketing { background: var(--badge-marketing); color: #fff; }
.badge-content { background: var(--badge-content); color: #000; }
.badge-sales { background: var(--badge-sales); color: #fff; }
.badge-youtube { background: var(--badge-youtube); color: #fff; }
.badge-tools { background: var(--badge-tools); color: #000; }
.badge-dev { background: var(--badge-dev); color: #fff; }

.stream-link {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.row-arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.skills-table tbody tr:hover .row-arrow {
    transform: translateX(4px);
    color: var(--text);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    max-width: 720px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-scroll {
    overflow-y: auto;
    flex: 1;
    padding-bottom: 32px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text);
}

/* Modal Header */
.modal-header {
    padding: 32px 32px 16px;
}

.modal-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.modal-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.meta-value {
    color: var(--text);
    font-size: 0.85rem;
    background: var(--surface-hover);
    padding: 2px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

/* Modal Sections */
.modal-section {
    padding: 0 32px;
    margin-top: 20px;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    margin-bottom: 12px;
}

.section-label svg {
    opacity: 0.6;
}

.detail-text {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Items (files, links) */
.item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s;
    cursor: default;
}

.item-row svg {
    flex-shrink: 0;
    opacity: 0.5;
}

a.item-row:hover,
.item-row.clickable:hover {
    background: var(--surface-hover);
    cursor: pointer;
}

.item-row.dimmed {
    opacity: 0.5;
}

.item-note {
    margin-left: auto;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Instruction Preview */
.instruction-preview {
    margin-top: 12px;
    position: relative;
}

.preview-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.82rem;
    border-radius: 8px;
}

.btn-primary {
    background: #fff;
    color: #000;
}

.btn-primary:hover {
    background: #ddd;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: #444;
}

.instruction-preview pre {
    background: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    overflow: auto;
    max-height: 350px;
}

.instruction-preview code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.copy-success {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--badge-content);
    color: #000;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 5;
}

.copy-success.show {
    display: block;
    animation: fadeInOut 1.5s ease forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(5px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px 60px;
    }

    .hero {
        padding: 40px 0 32px;
    }

    .skills-table th:nth-child(4),
    .skills-table td:nth-child(4) {
        display: none;
    }

    .skills-table th,
    .skills-table td {
        padding: 12px 14px;
    }

    .modal-header,
    .modal-section {
        padding-left: 20px;
        padding-right: 20px;
    }

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

@media (max-width: 480px) {
    .skills-table .skill-desc {
        font-size: 0.85rem;
    }

    .filter-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* Example chat */
.example-chat {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 0;
}

.chat-msg {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.chat-avatar-user {
    background: rgba(59, 130, 246, 0.15);
}

.chat-avatar-bot {
    background: rgba(16, 185, 129, 0.15);
}

.chat-bubble {
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.6;
    max-width: 100%;
}

.chat-bubble-user {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.chat-bubble-bot {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: rgba(255,255,255,0.8);
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.82rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Plugin components */
.plugin-components {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 4px 0;
}

@media (max-width: 600px) {
    .plugin-components {
        grid-template-columns: 1fr;
    }
}

.component-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    background: rgba(245, 158, 11, 0.04);
    border: 1px solid rgba(245, 158, 11, 0.12);
    border-radius: 12px;
    transition: border-color 0.2s;
}

.component-card:hover {
    border-color: rgba(245, 158, 11, 0.3);
}

.component-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.component-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.component-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
}

.component-desc {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.4;
}

/* Lock badge */
.locked-row {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

.lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 4px 12px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 20px;
    font-size: 0.72rem;
    color: #f59e0b;
    white-space: nowrap;
}

.lock-badge svg {
    stroke: #f59e0b;
}

/* VIP star */
.vip-star {
    display: inline-block;
    font-size: 0.7rem;
    animation: pulse-star 2s ease-in-out infinite;
    vertical-align: middle;
    margin-left: 4px;
}

@keyframes pulse-star {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Pipeline */
.pipeline-section {
    margin-bottom: 24px;
    text-align: center;
}

.pipeline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 30px;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
}

.pipeline-toggle:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,0.2);
}

.pipeline-toggle.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.pipeline-wrapper {
    margin-top: 20px;
    overflow-x: auto;
    padding: 10px 0 20px;
}

.pipeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    min-width: max-content;
    padding: 0 20px;
}

.pipeline-stage {
    min-width: 180px;
    max-width: 220px;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    transition: all 0.3s;
}

.pipeline-stage:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.stage-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.stage-icon {
    font-size: 20px;
}

.stage-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stage-skills {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stage-chip {
    padding: 6px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.stage-chip:hover {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.95);
    border-color: rgba(255,255,255,0.2);
}

.stage-chip.plugin-chip {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    font-weight: 600;
}

.stage-chip.plugin-chip:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
}

.pipeline-arrow {
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 24px;
    color: rgba(255,255,255,0.15);
    margin-top: 40px;
    user-select: none;
}

@media (max-width: 900px) {
    .pipeline {
        flex-direction: column;
        align-items: center;
        min-width: auto;
    }
    .pipeline-arrow {
        transform: rotate(90deg);
        margin-top: 0;
        padding: 4px 0;
    }
    .pipeline-stage {
        min-width: 280px;
        max-width: 320px;
    }
}
