/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-terminal: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent: #ff6b35;
    --accent-green: #34d399;
    --accent-blue: #38bdf8;
    --border: #333333;
    --code-bg: #0d1117;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
}

/* Monospace for code, terminal, headings, nav */
h1, h2, h3, h4, h5, h6,
.terminal-window,
code, pre,
.code-block,
.nav-links a,
.logo-text,
.card-badge,
.card-meta,
.guide-category,
.guide-reading-time,
.guide-updated,
.toc,
.breadcrumbs,
.copy-btn,
.tab-btn,
.expand-collapse-btn {
    font-family: 'JetBrains Mono', monospace;
}

/* === HERO === */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    background:
        radial-gradient(ellipse at top, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        var(--bg-primary);
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 700;
    margin-top: 2rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--text-primary);
    margin-top: 1rem;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    max-width: 500px;
}

.cta-button {
    display: inline-block;
    margin-top: 2rem;
    padding: 1rem 2rem;
    background: var(--accent);
    color: var(--bg-primary);
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--accent-green);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

/* === TERMINAL WINDOW === */
.terminal-window {
    width: 100%;
    max-width: 600px;
    background: var(--bg-terminal);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
}

.terminal-header {
    background: var(--bg-secondary);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-btn.red { background: #ff5f56; }
.terminal-btn.yellow { background: #ffbd2e; }
.terminal-btn.green { background: #27ca40; }

.terminal-title {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.terminal-body {
    padding: 1.5rem;
    min-height: 80px;
}

.typing-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.prompt {
    color: var(--accent-green);
    font-weight: 700;
}

.typing-text {
    color: var(--text-primary);
}

.cursor {
    color: var(--accent);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* === FEATURES === */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.feature-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.feature h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* === SECTIONS === */
.section {
    padding: 4rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.accent {
    color: var(--accent);
}

.section-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* === TABS === */
.install-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* === CODE BLOCKS === */
.code-block {
    background: var(--code-bg);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.code-block.large pre {
    max-height: 400px;
    overflow-y: auto;
}

.code-header {
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.code-header span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.copy-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.copy-btn.copied {
    background: var(--accent-green);
    color: var(--bg-primary);
    border-color: var(--accent-green);
}

.code-block pre {
    padding: 1.5rem;
    overflow-x: auto;
}

.code-block code {
    color: #c9d1d9;
    font-size: 0.9rem;
    line-height: 1.8;
}

/* === REQUIREMENTS === */
.requirements {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    border: 1px solid var(--border);
}

.requirements h4 {
    color: var(--accent);
    margin-bottom: 1rem;
}

.requirements ul {
    list-style: none;
}

.requirements li {
    color: var(--text-secondary);
    padding: 0.3rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.requirements li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent-green);
}

/* === TIP === */
.tip {
    color: var(--accent);
    font-size: 0.9rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

/* === VPS === */
.vps-recommendation {
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.1) 0%, rgba(0, 255, 136, 0.1) 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--accent-blue);
}

.vps-recommendation h4 {
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

.vps-recommendation ul {
    list-style: none;
}

.vps-recommendation li {
    color: var(--text-secondary);
    padding: 0.3rem 0;
}

.vps-recommendation strong {
    color: var(--text-primary);
}

/* === API CARDS === */
.api-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.api-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.api-card h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.api-card > p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.api-card ul {
    list-style: none;
    margin-bottom: 1rem;
}

.api-card li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.2rem 0;
}

.link-btn {
    display: inline-block;
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

/* === WARNING BOX === */
.warning-box {
    background: rgba(255, 107, 53, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--accent);
}

.warning-box h4 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.warning-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.warning-box ul {
    list-style: none;
}

.warning-box li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.2rem 0;
    padding-left: 1rem;
    position: relative;
}

.warning-box li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* === CTA SECTION === */
.cta-section {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(0, 168, 255, 0.1) 100%);
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.cta-content h2 {
    margin-bottom: 1rem;
}

.cta-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.telegram-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #0088cc;
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.telegram-btn:hover {
    background: #006699;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 136, 204, 0.3);
}

/* === FOOTER === */
footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer .small {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .hero {
        padding: 1.5rem;
    }

    .terminal-window {
        max-width: 100%;
    }

    .section {
        padding: 3rem 1.5rem;
    }

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

    .tab-btn {
        width: 100%;
    }

    .code-block pre {
        padding: 1rem;
        font-size: 0.8rem;
    }

    .features {
        padding: 2rem 1.5rem;
    }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* === SITE HEADER / NAVIGATION === */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    text-decoration: none;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-dot {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

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

.nav-telegram {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #0088cc;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-telegram:hover {
    background: #006699;
    transform: translateY(-1px);
}

.nav-telegram span {
    display: none;
}

@media (min-width: 768px) {
    .nav-telegram span {
        display: inline;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 1rem 2rem 2rem;
        gap: 0;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links li {
        border-bottom: 1px solid var(--border);
    }

    .nav-links a {
        display: block;
        padding: 1rem 0;
    }

    .nav-container {
        padding: 0.75rem 1rem;
    }
}

/* === SITE FOOTER === */
.site-footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.footer-container {
    max-width: 600px;
    margin: 0 auto;
}

.footer-main {
    margin-bottom: 1rem;
}

.footer-credit {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.footer-credit a {
    color: var(--accent);
    text-decoration: none;
}

.footer-credit a:hover {
    text-decoration: underline;
}

.footer-telegram {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #0088cc;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.footer-telegram:hover {
    background: #006699;
    transform: translateY(-2px);
}

.footer-links {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

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

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

.footer-divider {
    margin: 0 0.5rem;
    opacity: 0.5;
}

/* === CATALOG / CATEGORIES === */
.categories-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.category {
    margin-bottom: 4rem;
}

/* Compact category — smaller cards, less spacing */
.category-compact {
    margin-bottom: 2.5rem;
}

.category-compact .category-header {
    margin-bottom: 1rem;
}

.category-compact .category-icon {
    font-size: 1.5rem;
}

.category-compact h2 {
    font-size: 1.2rem;
}

.category-compact .guides-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.category-compact .guide-card {
    padding: 1rem 1.25rem;
}

.category-compact .guide-card h3 {
    font-size: 0.95rem;
}

.category-compact .guide-card > p {
    font-size: 0.82rem;
    line-height: 1.4;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.category-icon {
    font-size: 2rem;
}

.category h2 {
    margin: 0;
    font-size: 1.5rem;
}

.category-desc {
    color: var(--text-secondary);
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

/* Guide Cards Grid */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Guide Card */
.guide-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}

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

.guide-card.featured {
    border-color: var(--accent);
    background: linear-gradient(135deg,
        rgba(255, 107, 53, 0.05) 0%,
        rgba(0, 255, 136, 0.05) 100%
    );
    cursor: pointer;
}

.guide-card.coming-soon {
    opacity: 0.6;
}

.guide-card.coming-soon:hover {
    transform: none;
    border-color: var(--border);
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent);
    color: var(--bg-primary);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.card-badge.muted {
    background: var(--border);
    color: var(--text-secondary);
}

.guide-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    padding-right: 4rem;
}

.guide-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Make entire card clickable */
.guide-card h3 a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.guide-card:hover h3 a {
    color: var(--accent);
}

.guide-card > p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.card-meta {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Hero Compact (for catalog page) */
.hero-compact {
    min-height: 50vh;
    padding-top: 80px;
}

.hero-compact h1 {
    font-size: clamp(2rem, 8vw, 4rem);
}

.hero-compact .terminal-window {
    max-width: 500px;
}

/* Adjust existing hero for header */
.hero {
    padding-top: 80px;
}

@media (max-width: 768px) {
    .categories-section {
        padding: 1.5rem;
    }

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

    .guide-card h3 {
        padding-right: 0;
    }

    .card-badge {
        position: static;
        display: inline-block;
        margin-bottom: 0.75rem;
    }
}
