/* About Page Styles */

/* Navigation */
.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid var(--game-page-text);
    margin-bottom: 12px;
    background: var(--game-page-bg);
}

.nav-brand {
    font-size: 16px;
    font-weight: 700;
    color: var(--game-page-text);
    text-decoration: none;
    letter-spacing: -0.3px;
}

.nav-links {
    display: flex;
    gap: 16px;
}

.nav-links a {
    font-size: 12px;
    font-weight: 600;
    color: var(--game-page-text);
    opacity: 0.6;
    text-decoration: none;
    padding: 4px 8px;
    border: 2px solid transparent;
    transition: all 0.1s;
}

.nav-links a:hover {
    color: var(--game-page-text);
    opacity: 1;
    border-color: var(--game-page-text);
}

.nav-links a.active {
    color: var(--game-page-text);
    opacity: 1;
    border-color: var(--game-page-text);
}

/* Hero */
.about-hero {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 40px 32px;
    border: 2px solid var(--black);
    margin-bottom: 20px;
    background: var(--black);
    color: var(--white);
    overflow: hidden;
}

.hero-graphic {
    flex-shrink: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    width: 120px;
    height: 120px;
}

.hero-grid span {
    width: 16px;
    height: 16px;
    border: 2px solid var(--gray-700);
    background: transparent;
    transition: all 0.3s ease;
}

.hero-grid span.center-dot {
    background: var(--white);
    border-color: var(--white);
}

.hero-grid:hover span {
    border-color: var(--gray-500);
}

.hero-grid:hover span.center-dot {
    box-shadow: 0 0 20px rgba(255,255,255,0.5);
}

.hero-content {
    flex: 1;
}

.about-hero h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    color: var(--white);
}

.about-hero p {
    font-size: 14px;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.hero-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hero-tags .tag {
    padding: 4px 10px;
    border: 2px solid var(--gray-600);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-400);
}

/* Sections */
.about-section {
    border: 2px solid var(--black);
    padding: 24px;
    margin-bottom: 20px;
    background: var(--white);
}

.about-section h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.section-intro {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Big Picture Grid */
.big-picture-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-bottom: 20px;
    border: 2px solid var(--black);
}

.bp-card {
    padding: 20px 16px;
    border-right: 2px solid var(--black);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bp-card:last-child {
    border-right: none;
}

.bp-icon {
    font-size: 20px;
    font-weight: 700;
    font-family: monospace;
    color: var(--black);
}

.bp-label {
    font-size: 13px;
    font-weight: 700;
}

.bp-desc {
    font-size: 11px;
    color: var(--gray-600);
    line-height: 1.5;
}

/* Framework Diagram */
.framework-diagram {
    margin: 24px 0;
    overflow-x: auto;
}

.diagram-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 600px;
    padding: 20px 0;
}

.diagram-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    border: 2px solid var(--black);
    background: var(--white);
    min-width: 120px;
    transition: all 0.1s;
}

.diagram-node:hover {
    transform: translate(-2px, -2px);
    box-shadow: 3px 3px 0 var(--black);
}

.node-icon {
    font-size: 20px;
    font-weight: 700;
    font-family: monospace;
    margin-bottom: 8px;
    color: var(--black);
}

.node-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.node-desc {
    font-size: 10px;
    color: var(--gray-500);
    margin-top: 4px;
    text-align: center;
}

.diagram-arrow {
    font-size: 24px;
    color: var(--gray-400);
    font-weight: 300;
}

/* Code Toggle */
.code-toggle-container {
    margin: 24px 0;
}

.toggle-buttons {
    display: flex;
    gap: 0;
    margin-bottom: 0;
}

.toggle-btn {
    padding: 10px 20px;
    border: 2px solid var(--black);
    border-bottom: none;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.1s;
}

.toggle-btn:first-child {
    border-right: none;
}

.toggle-btn:last-child {
    border-left: none;
}

.toggle-btn.active {
    background: var(--white);
    color: var(--black);
    position: relative;
    z-index: 1;
}

.code-panels {
    border: 2px solid var(--black);
    background: var(--gray-50);
}

.code-panel {
    display: none;
    padding: 16px;
}

.code-panel.active {
    display: block;
}

.code-panel pre {
    margin: 0;
    overflow-x: auto;
}

.code-panel code {
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    line-height: 1.5;
}

/* Syntax Highlighting - Lua */
.lua-keyword { color: #7c3aed; font-weight: 600; }
.lua-function { color: #0891b2; }
.lua-string { color: #059669; }
.lua-number { color: #dc2626; }
.lua-comment { color: #6b7280; font-style: italic; }
.lua-param { color: #d97706; }

/* Syntax Highlighting - JSON */
.json-key { color: #7c3aed; }
.json-string { color: #059669; }
.json-number { color: #dc2626; }

/* UI Preview */
.ui-preview {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.preview-card {
    border: 2px solid var(--black);
    padding: 12px;
    background: var(--white);
    min-width: 200px;
}

.preview-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--black);
    padding-bottom: 8px;
}

.preview-stat {
    display: flex;
    flex-direction: column;
    border: 2px solid var(--black);
    padding: 8px;
    margin-bottom: 12px;
}

.preview-label {
    font-size: 9px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-value {
    font-size: 18px;
    font-weight: 700;
}

.preview-button {
    width: 100%;
    padding: 10px;
    background: var(--black);
    color: var(--white);
    border: 2px solid var(--black);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* Key Insight Box */
.key-insight {
    background: var(--gray-100);
    border: 2px solid var(--black);
    padding: 16px;
    margin-top: 20px;
    font-size: 13px;
    line-height: 1.5;
}

.key-insight strong {
    display: block;
    margin-bottom: 4px;
}

/* Two Column Layout (REST API / MCP) */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 20px;
    border: 2px solid var(--black);
}

.col-card {
    border-right: 2px solid var(--black);
}

.col-card:last-child {
    border-right: none;
}

.col-header {
    background: var(--black);
    color: var(--white);
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.col-body {
    padding: 16px;
}

.col-body p {
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 16px;
}

.api-flow {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.api-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 11px;
}

.api-step:last-child {
    border-bottom: none;
}

.api-method {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    background: var(--black);
    color: var(--white);
    letter-spacing: 0.5px;
    flex-shrink: 0;
    min-width: 36px;
    text-align: center;
}

.api-method.mcp {
    background: #7c3aed;
}

.api-step code {
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 10px;
    color: var(--black);
    flex: 1;
}

.api-desc {
    font-size: 10px;
    color: var(--gray-500);
    flex-shrink: 0;
}

/* Watch AI Section */
.watch-flow {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 2px solid var(--black);
    margin-bottom: 20px;
}

.watch-step {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    align-items: flex-start;
}

.watch-step:last-child {
    border-bottom: none;
}

.watch-num {
    width: 28px;
    height: 28px;
    border: 2px solid var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.watch-content {
    flex: 1;
}

.watch-content strong {
    font-size: 13px;
    display: block;
    margin-bottom: 4px;
}

.watch-content p {
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.5;
    margin: 0;
}

.watch-detail-box {
    border: 2px solid var(--black);
}

.watch-detail-header {
    background: var(--gray-100);
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
    border-bottom: 2px solid var(--black);
}

.watch-detail-body {
    padding: 16px;
}

.watch-detail-body p {
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0;
}

/* Visuals Grid (Graphics, Tutorials) */
.visuals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 2px solid var(--black);
}

.visual-card {
    border-right: 2px solid var(--black);
    border-bottom: 2px solid var(--black);
}

.visual-card:nth-child(2n) {
    border-right: none;
}

.visual-card:nth-last-child(-n+2) {
    border-bottom: none;
}

.visual-header {
    background: var(--black);
    color: var(--white);
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.visual-body {
    padding: 16px;
}

.visual-body p {
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 12px;
}

.visual-body code {
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 11px;
    background: var(--gray-100);
    padding: 1px 4px;
}

.visual-detail {
    font-size: 11px;
    font-weight: 600;
    color: var(--black);
    background: var(--gray-100);
    padding: 8px 12px;
    border-left: 3px solid var(--black);
}

/* Cycle Section */
.cycle-container {
    margin: 24px 0;
}

.cycle-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.cycle-btn {
    padding: 8px 16px;
    border: 2px solid var(--black);
    background: var(--white);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.1s;
}

.cycle-btn:hover {
    background: var(--black);
    color: var(--white);
}

.cycle-status {
    font-size: 12px;
    color: var(--gray-500);
}

/* Cycle SVG */
.cycle-svg {
    width: 100%;
    max-width: 500px;
    height: auto;
    display: block;
    margin: 0 auto 20px;
}

.cycle-path {
    fill: none;
    stroke: var(--gray-300);
    stroke-width: 2;
    stroke-dasharray: 8 4;
}

.cycle-pulse {
    fill: var(--black);
    filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.5));
    transition: all 0.5s ease;
}

.cycle-node {
    cursor: pointer;
}

.node-circle {
    fill: var(--white);
    stroke: var(--black);
    stroke-width: 2;
    transition: all 0.2s;
}

.cycle-node:hover .node-circle,
.cycle-node.active .node-circle {
    fill: var(--black);
}

.node-text {
    font-size: 10px;
    font-weight: 700;
    text-anchor: middle;
    fill: var(--black);
    transition: fill 0.2s;
}

.node-subtext {
    font-size: 8px;
    font-weight: 600;
    text-anchor: middle;
    fill: var(--gray-500);
    transition: fill 0.2s;
}

.cycle-node:hover .node-text,
.cycle-node:hover .node-subtext,
.cycle-node.active .node-text,
.cycle-node.active .node-subtext {
    fill: var(--white);
}

/* Cycle Detail */
.cycle-detail {
    border: 2px solid var(--black);
    background: var(--white);
}

.detail-header {
    background: var(--black);
    color: var(--white);
    padding: 10px 16px;
}

.detail-step {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.detail-content {
    padding: 16px;
}

.detail-content p {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.detail-code {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    padding: 12px;
    margin-bottom: 12px;
    overflow-x: auto;
}

.detail-code code {
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 11px;
    color: var(--black);
}

.detail-note {
    font-size: 12px;
    color: var(--gray-600);
    font-style: italic;
    margin-bottom: 0;
}

/* Rhythm Box */
.rhythm-box {
    border: 2px solid var(--black);
    margin-top: 24px;
}

.rhythm-box h3 {
    background: var(--black);
    color: var(--white);
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.rhythm-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.rhythm-item {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rhythm-item.odd {
    border-right: 2px solid var(--black);
    background: var(--white);
}

.rhythm-item.even {
    background: var(--gray-100);
}

.rhythm-num {
    font-size: 11px;
    color: var(--gray-500);
    font-family: monospace;
}

.rhythm-label {
    font-size: 13px;
    font-weight: 700;
}

.rhythm-desc {
    font-size: 11px;
    color: var(--gray-600);
}

/* Examples Section */
.examples-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 0;
}

.example-tab {
    padding: 10px 16px;
    border: 2px solid var(--black);
    border-bottom: none;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.1s;
    margin-right: -2px;
}

.example-tab.active {
    background: var(--white);
    color: var(--black);
    position: relative;
    z-index: 1;
}

.examples-content {
    border: 2px solid var(--black);
}

.example-panel {
    display: none;
}

.example-panel.active {
    display: block;
}

.example-header {
    background: var(--black);
    color: var(--white);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.example-game {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--white);
    color: var(--black);
    padding: 4px 8px;
}

.example-title {
    font-size: 14px;
    font-weight: 700;
}

.example-body {
    padding: 20px;
}

.example-desc {
    font-size: 13px;
    color: var(--gray-700);
    margin-bottom: 16px;
    line-height: 1.5;
}

.example-code {
    background: var(--gray-50);
    border: 2px solid var(--gray-300);
    margin-bottom: 16px;
    overflow-x: auto;
}

.example-code pre {
    margin: 0;
    padding: 16px;
}

.example-code code {
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 11px;
    line-height: 1.6;
}

.example-insight {
    background: var(--gray-100);
    border: 2px solid var(--black);
    padding: 16px;
    font-size: 13px;
    line-height: 1.5;
}

.example-insight strong {
    display: block;
    margin-bottom: 4px;
}

/* Footer */
.about-footer {
    text-align: center;
    padding: 24px;
    border: 2px solid var(--black);
    background: var(--white);
}

.about-footer p {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.footer-link {
    display: inline-block;
    padding: 10px 24px;
    background: var(--black);
    color: var(--white);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid var(--black);
    transition: all 0.1s;
}

.footer-link:hover {
    background: var(--white);
    color: var(--black);
}

/* Responsive */
@media (max-width: 768px) {
    .site-nav {
        flex-direction: column;
        gap: 12px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .about-hero {
        flex-direction: column;
        text-align: center;
        padding: 32px 20px;
        gap: 24px;
    }

    .hero-grid {
        width: 100px;
        height: 100px;
    }

    .hero-grid span {
        width: 12px;
        height: 12px;
    }

    .about-hero h1 {
        font-size: 24px;
    }

    .hero-tags {
        justify-content: center;
    }

    .about-section {
        padding: 16px;
    }

    .big-picture-grid {
        grid-template-columns: 1fr;
    }

    .bp-card {
        border-right: none;
        border-bottom: 2px solid var(--black);
    }

    .bp-card:last-child {
        border-bottom: none;
    }

    .diagram-flow {
        flex-direction: column;
        min-width: auto;
    }

    .diagram-arrow {
        transform: rotate(90deg);
    }

    .toggle-buttons {
        flex-wrap: wrap;
    }

    .toggle-btn {
        flex: 1;
        min-width: 80px;
        border: 2px solid var(--black) !important;
        margin-bottom: -2px;
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .col-card {
        border-right: none;
        border-bottom: 2px solid var(--black);
    }

    .col-card:last-child {
        border-bottom: none;
    }

    .visuals-grid {
        grid-template-columns: 1fr;
    }

    .visual-card {
        border-right: none !important;
        border-bottom: 2px solid var(--black) !important;
    }

    .visual-card:last-child {
        border-bottom: none !important;
    }

    .cycle-svg {
        max-width: 100%;
    }

    .rhythm-items {
        grid-template-columns: 1fr;
    }

    .rhythm-item.odd {
        border-right: none;
        border-bottom: 2px solid var(--black);
    }

    .examples-tabs {
        flex-direction: column;
    }

    .example-tab {
        border: 2px solid var(--black);
        margin-right: 0;
        margin-bottom: -2px;
    }

    .example-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
