/* Mono Space - Dark Code Editor Theme */
/* Site 003: Developer Community */

:root {
    --primary: #0D1117;
    --accent: #58A6FF;
    --green: #3FB950;
    --yellow: #D29922;
    --orange: #D2A8FF;
    --red: #F85149;
    --bg: #0D1117;
    --surface: #161B22;
    --border: #30363D;
    --text: #C9D1D9;
    --text-muted: #8B949E;
    --text-bright: #F0F6FC;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --font-body: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 0.5rem;
    --tab-height: 2.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 1.4rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 0.5rem;
}
::-webkit-scrollbar-track {
    background: var(--primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 0.25rem;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Header - VS Code Tab Bar */
.vscode-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 1rem;
    background: #010409;
    border-bottom: 1px solid var(--border);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-bright);
    text-decoration: none;
}

.header-logo i {
    color: var(--accent);
    font-size: 1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
}

.header-action-btn:hover {
    color: var(--text-bright);
}

.avatar-indicator {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.tab-bar {
    display: flex;
    align-items: flex-end;
    overflow-x: auto;
    padding: 0;
    background: var(--primary);
}

.tab-bar::-webkit-scrollbar {
    height: 0;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    height: var(--tab-height);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-right: 1px solid var(--border);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    position: relative;
    text-decoration: none;
}

.tab-item:hover {
    color: var(--text);
    background: rgba(88, 166, 255, 0.04);
}

.tab-item.active {
    color: var(--text-bright);
    background: var(--surface);
    border-top: 2px solid var(--accent);
}

.tab-item .tab-icon {
    font-size: 0.7rem;
}

.tab-item .tab-close {
    opacity: 0;
    margin-left: 0.5rem;
    font-size: 0.6rem;
    transition: opacity 0.2s;
}

.tab-item:hover .tab-close {
    opacity: 0.6;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 1.1rem;
}

.mobile-menu-toggle:hover {
    color: var(--text-bright);
}

/* Main Content */
main {
    min-height: calc(100vh - 10rem);
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Line Numbers Gutter */
.line-numbers {
    position: fixed;
    left: 0;
    top: var(--tab-height);
    bottom: 0;
    width: 3rem;
    padding-top: 5rem;
    text-align: right;
    padding-right: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--border);
    line-height: 1.8;
    user-select: none;
    pointer-events: none;
    z-index: 1;
}

/* Hero Section - Code Block */
.hero-section {
    margin-bottom: 4rem;
    padding-top: 1rem;
}

.code-window {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.4);
}

.code-window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: #1C2128;
    border-bottom: 1px solid var(--border);
}

.window-dots {
    display: flex;
    gap: 0.4rem;
}

.window-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
}

.window-dot.red { background: var(--red); }
.window-dot.yellow { background: var(--yellow); }
.window-dot.green { background: var(--green); }

.window-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.window-actions {
    display: flex;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.code-body {
    padding: 1.5rem 2rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.9;
    overflow-x: auto;
}

.code-line {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    opacity: 0;
    transform: translateY(0.25rem);
    animation: lineReveal 0.3s ease forwards;
}

.code-line:nth-child(1) { animation-delay: 0.2s; }
.code-line:nth-child(2) { animation-delay: 0.5s; }
.code-line:nth-child(3) { animation-delay: 0.8s; }
.code-line:nth-child(4) { animation-delay: 1.1s; }
.code-line:nth-child(5) { animation-delay: 1.4s; }
.code-line:nth-child(6) { animation-delay: 1.7s; }
.code-line:nth-child(7) { animation-delay: 2.0s; }
.code-line:nth-child(8) { animation-delay: 2.3s; }
.code-line:nth-child(9) { animation-delay: 2.6s; }

@keyframes lineReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.line-num {
    color: var(--text-muted);
    min-width: 1.5rem;
    text-align: right;
    user-select: none;
    opacity: 0.5;
}

.line-content {
    flex: 1;
}

/* Syntax highlighting classes */
.syn-comment { color: var(--text-muted); font-style: italic; }
.syn-keyword { color: #FF7B72; }
.syn-const { color: #79C0FF; }
.syn-string { color: #A5D6FF; }
.syn-func { color: var(--orange); }
.syn-prop { color: var(--accent); }
.syn-value { color: var(--green); }
.syn-punc { color: var(--text); }
.syn-type { color: #FFA657; }

/* Typing Cursor */
.typing-cursor {
    display: inline-block;
    width: 0.55rem;
    height: 1.1rem;
    background: var(--accent);
    margin-left: 0.1rem;
    vertical-align: middle;
    animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* CTA Button - Run */
.hero-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-left: 3.5rem;
}

.run-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: var(--green);
    color: #0D1117;
    border: none;
    border-radius: 0.3rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.run-btn:hover {
    background: #56D364;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 1rem rgba(63, 185, 80, 0.3);
}

.run-btn i {
    font-size: 0.7rem;
}

.run-hint {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.run-hint kbd {
    padding: 0.15rem 0.4rem;
    background: var(--border);
    border-radius: 0.2rem;
    font-size: 0.65rem;
}

/* Section Title */
.section-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title .title-icon {
    color: var(--yellow);
}

/* Features - Editor Panels */
.features-section {
    margin-bottom: 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.feature-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(1rem);
}

.feature-panel.revealed {
    opacity: 1;
    transform: translateY(0);
}

.feature-panel:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 0.5rem 2rem rgba(0, 0, 0, 0.3);
}

.panel-tab {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.panel-tab .file-icon {
    font-size: 0.75rem;
}

.panel-tab .file-icon.md { color: var(--accent); }
.panel-tab .file-icon.js { color: var(--yellow); }
.panel-tab .file-icon.ts { color: #3178C6; }
.panel-tab .file-icon.vue { color: #42B883; }

.panel-content {
    padding: 1.25rem;
}

.panel-content h3 {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 0.5rem;
}

.panel-content p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.panel-tag {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 0.2rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--accent);
}

/* Board Widgets - Terminal Style */
.boards-section {
    margin-bottom: 4rem;
}

.boards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.board-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    opacity: 0;
    transform: translateY(1rem);
}

.board-panel.revealed {
    opacity: 1;
    transform: translateY(0);
}

.board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: var(--primary);
    border-bottom: 1px solid var(--border);
}

.board-header-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text);
}

.board-header-title .panel-indicator {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--green);
}

.board-header-more {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.board-header-more:hover {
    color: var(--accent);
}

.board-list {
    padding: 0.75rem 1rem;
}

.board-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(48, 54, 61, 0.3);
    text-decoration: none;
}

.board-item:last-child {
    border-bottom: none;
}

.board-item:hover {
    color: var(--accent);
    padding-left: 0.3rem;
}

.board-item .prompt {
    color: var(--green);
    font-weight: 600;
    flex-shrink: 0;
}

.board-item .item-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-item .item-date {
    color: var(--text-muted);
    font-size: 0.65rem;
    flex-shrink: 0;
}

/* Stats Section - Terminal */
.stats-section {
    margin-bottom: 4rem;
}

.stats-terminal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.stats-terminal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.stats-terminal-body {
    padding: 1.5rem 2rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 2.2;
}

.stat-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(-0.5rem);
}

.stat-line.revealed {
    animation: statReveal 0.4s ease forwards;
}

.stat-line:nth-child(1) { animation-delay: 0.1s; }
.stat-line:nth-child(2) { animation-delay: 0.3s; }
.stat-line:nth-child(3) { animation-delay: 0.5s; }
.stat-line:nth-child(4) { animation-delay: 0.7s; }

@keyframes statReveal {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.stat-label { color: var(--green); }
.stat-bracket { color: var(--text-muted); }
.stat-type { color: var(--yellow); }
.stat-value { color: var(--text-bright); font-weight: 600; }
.stat-unit { color: var(--text-muted); }

/* CTA Section */
.cta-section {
    margin-bottom: 4rem;
    text-align: center;
}

.cta-terminal {
    display: inline-block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 3rem;
    text-align: left;
}

.cta-command {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 1rem;
}

.cta-command .dollar {
    color: var(--green);
    margin-right: 0.5rem;
}

.cta-command .cmd {
    color: var(--accent);
}

.cta-command .flag {
    color: var(--yellow);
}

.cta-output {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border);
}

.cta-output .output-success {
    color: var(--green);
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 2rem;
    background: var(--accent);
    color: #0D1117;
    border: none;
    border-radius: 0.3rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.cta-btn:hover {
    background: #79C0FF;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 1rem rgba(88, 166, 255, 0.3);
}

/* Footer - Terminal */
.footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 1.5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-status .status-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--accent);
}

/* Status Bar (bottom) */
.status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.4rem;
    background: #1F6FEB;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: #fff;
    z-index: 1000;
}

.status-bar-left,
.status-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-bar-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    opacity: 0.9;
}

/* Reveal Animation */
.reveal-element {
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.3rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    background: var(--surface);
    color: var(--text);
}

.btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-primary {
    background: var(--accent);
    color: #0D1117;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: #79C0FF;
    border-color: #79C0FF;
    color: #0D1117;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-bright);
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .line-numbers {
        display: none;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }

    .features-grid,
    .boards-grid {
        grid-template-columns: 1fr;
    }

    .code-body {
        padding: 1rem;
        font-size: 0.75rem;
    }

    .hero-cta {
        padding-left: 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .cta-terminal {
        padding: 1.5rem;
        width: 100%;
    }

    .cta-command {
        font-size: 0.82rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-left,
    .footer-right {
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-top {
        padding: 0.4rem 0.75rem;
    }

    .tab-bar {
        display: none;
    }

    .tab-bar.mobile-open {
        display: flex;
        flex-direction: column;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .tab-item {
        padding: 0.5rem 0.7rem;
        font-size: 0.68rem;
    }

    .tab-item .tab-close {
        display: none;
    }

    .stats-terminal-body {
        padding: 1rem;
        font-size: 0.72rem;
    }

    .stat-line {
        flex-wrap: wrap;
    }

    .status-bar {
        font-size: 0.6rem;
        padding: 0 0.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .boards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    html { font-size: 16px; }
}

@media (min-width: 1280px) and (max-width: 1919px) {
    html { font-size: 16px; }
}

@media (min-width: 1920px) and (max-width: 2559px) {
    html { font-size: 17px; }
}

@media (min-width: 2560px) and (max-width: 3839px) {
    html { font-size: 19px; }
}

@media (min-width: 3840px) {
    html { font-size: 22px; }
}

@media (max-width: 359px) {
    .header-logo span {
        display: none;
    }

    .code-body {
        padding: 0.75rem;
        font-size: 0.68rem;
    }

    .cta-terminal {
        padding: 1rem;
    }
}
