[x-cloak] { display: none !important; }

:root {
    --bg-sidebar: #0f172a;
    --bg-main: #020617;
    --bg-card: #0b132b;
    --border-color: #1e293b;
    --sidebar-width: 320px;
}
body { 
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: #e2e8f0;
}
pre, code, .font-mono { 
    font-family: 'JetBrains Mono', monospace; 
}

/* Cruip Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    max-width: 85vw;
    background: #0f172a;
    border-right: 1px solid #1e293b;
    position: relative;
}
.sidebar.collapsing {
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s ease-in-out;
}
.sidebar.collapsed {
    width: 0px !important;
    min-width: 0px !important;
    overflow: hidden !important;
    border-right: none !important;
}

/* Custom Sleek Scrollbar for Sidebar Inner Content */
.custom-sidebar-scroll::-webkit-scrollbar {
    width: 5px;
}
.custom-sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.custom-sidebar-scroll::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 9999px;
}
.custom-sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: #38bdf8;
}

/* Resizer handle styling */
.resizer-handle {
    position: absolute;
    top: 0;
    right: -4px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    z-index: 60;
    user-select: none;
    touch-action: none;
}
.resizer-handle:hover .resizer-bar,
.resizer-handle.active .resizer-bar {
    background-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
}
.sidebar-link {
    transition: all 0.15s ease-in-out;
    color: #94a3b8;
}
.sidebar-link:hover {
    color: #f8fafc;
    background: rgba(30, 41, 59, 0.7);
}
.sidebar-link.active {
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.12);
    border-left: 3px solid #38bdf8;
}

/* Cruip Cards & Panels */
.cruip-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}
.cruip-header {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #1e293b;
}

/* Prose Markdown Styling */
.prose-custom h1 { font-size: 1.65rem; font-weight: 800; color: #f8fafc; margin-bottom: 1rem; border-bottom: 1px solid #1e293b; padding-bottom: 0.5rem; }
.prose-custom h2 { font-size: 1.3rem; font-weight: 700; color: #38bdf8; margin-top: 1.5rem; margin-bottom: 0.75rem; border-bottom: 1px solid #0f172a; padding-bottom: 0.25rem; }
.prose-custom h3 { font-size: 1.1rem; font-weight: 600; color: #2dd4bf; margin-top: 1.25rem; margin-bottom: 0.5rem; }
.prose-custom p { color: #cbd5e1; margin-bottom: 0.85rem; line-height: 1.75; font-size: 0.925rem; }
.prose-custom ul { list-style-type: disc; margin-left: 1.5rem; margin-bottom: 1rem; color: #cbd5e1; }
.prose-custom ol { list-style-type: decimal; margin-left: 1.5rem; margin-bottom: 1rem; color: #cbd5e1; }
.prose-custom li { margin-bottom: 0.35rem; font-size: 0.925rem; }
.prose-custom pre { background: #030712; border: 1px solid #1e293b; border-radius: 0.625rem; padding: 1rem; margin-bottom: 1.25rem; overflow-x: auto; color: #a5f3fc; font-size: 0.875rem; line-height: 1.6; }
.prose-custom code { background: #1e293b; padding: 0.2rem 0.4rem; border-radius: 0.375rem; font-size: 0.85rem; color: #38bdf8; }
.prose-custom blockquote { border-left: 4px solid #38bdf8; padding: 0.75rem 1.25rem; margin: 1rem 0; color: #94a3b8; font-style: italic; background: rgba(56, 189, 248, 0.05); border-radius: 0 0.5rem 0.5rem 0; }
.prose-custom table { width: 100%; text-align: left; border-collapse: collapse; margin-bottom: 1.25rem; }
.prose-custom th { background: #1e293b; color: #94a3b8; padding: 0.625rem 0.875rem; font-size: 0.75rem; text-transform: uppercase; border-bottom: 1px solid #334155; }
.prose-custom td { padding: 0.625rem 0.875rem; border-bottom: 1px solid #1e293b; color: #cbd5e1; font-size: 0.875rem; }

.prose-custom img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    border: 1px solid #334155;
    margin: 1.25rem auto;
    display: block;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    background-color: #0f172a;
}

/* Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #020617; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #334155; }

/* Cheat-Sheet Card Styling */
.cheat-card {
    background: #0b1329;
    border: 1px solid #1e293b;
    border-radius: 0.75rem;
    transition: all 0.2s ease-in-out;
}
.cheat-card:hover {
    border-color: #334155;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}
.code-item-box {
    background: #030712;
    border: 1px solid #1e293b;
    border-radius: 0.5rem;
    position: relative;
    transition: border-color 0.15s ease;
}
.code-item-box:hover {
    border-color: #38bdf8;
}
.copy-btn {
    transition: all 0.15s ease-in-out;
}
.copy-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}
.copy-btn.copied {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #059669 !important;
}

/* =============================================================================
   📱 MOBILE & TOUCH RESPONSIVENESS OPTIMIZATIONS
   ============================================================================= */
@media (max-width: 1023px) {
    body {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    .safe-area-bottom {
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }
    .prose-custom h1 {
        font-size: 1.35rem;
    }
    .prose-custom h2 {
        font-size: 1.15rem;
    }
    .prose-custom h3 {
        font-size: 1rem;
    }
    .prose-custom p, .prose-custom li {
        font-size: 0.85rem;
    }
    .prose-custom pre {
        font-size: 0.75rem;
        padding: 0.75rem;
        border-radius: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
    .prose-custom table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Floating Code Copy Button in Prose Markdown */
.prose-custom pre {
    position: relative;
    padding-top: 2.25rem !important;
}

.pre-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: #94a3b8;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    z-index: 10;
}

.pre-copy-btn:hover {
    color: #38bdf8;
    border-color: #38bdf8;
    background: #1e293b;
}

.pre-copy-btn.copied {
    color: #10b981 !important;
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.15) !important;
}

/* Glassmorphism Accents */
.glass-panel {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(30, 41, 59, 0.8);
}



/* Progress Bar Buffering Shimmer */
@keyframes progressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.progress-buffering {
    background: linear-gradient(90deg, #ec4899 0%, #f59e0b 25%, #38bdf8 50%, #ec4899 100%) !important;
    background-size: 200% 100% !important;
    animation: progressShimmer 1.2s linear infinite !important;
    width: 100% !important;
}

@keyframes pulseGlowAmber {
    0%, 100% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 25px rgba(245, 158, 11, 0.9); }
}
.buffering-glow {
    animation: pulseGlowAmber 1s ease-in-out infinite !important;
    border-color: #f59e0b !important;
}


/* ============================================================== */
/* 🖥️ KENSHIRO CYBERSHELL & MIKROTIK TERMINAL SIMULATOR STYLES */
/* ============================================================== */
@keyframes termBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}
.term-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background-color: #10b981;
    vertical-align: text-bottom;
    animation: termBlink 1s infinite;
}

.terminal-window {
    background-color: #030712;
    border: 1px solid #1f2937;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 0 20px rgba(16, 185, 129, 0.03);
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', 'Courier New', monospace;
}

.terminal-body {
    background-color: #030712;
    color: #e5e7eb;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    font-size: 12.5px;
    line-height: 1.45;
    letter-spacing: 0px;
    font-feature-settings: "liga" 0, "calt" 0;
    -webkit-font-smoothing: antialiased;
    tab-size: 4;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.terminal-body ::selection {
    background: rgba(16, 185, 129, 0.4);
    color: #ffffff;
}

.term-cmd-text { color: #facc15; font-weight: bold; }
.term-path-text { color: #38bdf8; font-weight: bold; }
.term-user-text { color: #4ade80; font-weight: bold; }
.term-root-text { color: #f87171; font-weight: bold; }
.term-output-text {
    color: #d1d5db;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.45;
}
.term-table-row {
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    white-space: pre;
    line-height: 1.35;
}
.term-success-text { color: #34d399; }
.term-error-text { color: #f87171; }
.term-info-text { color: #60a5fa; }
.term-dim-text { color: #6b7280; }
.term-routeros-prompt { color: #2dd4bf; font-weight: bold; }
.term-comment-text { color: #94a3b8; font-style: italic; }

#mobileBottomNav {
    background-color: rgba(8, 12, 20, 0.95) !important;
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(30, 41, 59, 0.8) !important;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.9) !important;
    z-index: 45 !important;
    padding-bottom: calc(0.35rem + env(safe-area-inset-bottom, 0px));
}

/* Mobile & Touch Optimizations */
* {
    -webkit-tap-highlight-color: transparent;
}

.safe-area-bottom {
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
}

/* Horizontal Table & Pre Scroll on Mobile */
.prose-custom table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.25rem;
    border-collapse: collapse;
}

.prose-custom table th,
.prose-custom table td {
    padding: 0.5rem 0.75rem;
    border: 1px solid #1e293b;
    white-space: nowrap;
}

.prose-custom pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
    .prose-custom pre {
        font-size: 0.75rem !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    .prose-custom h1 { font-size: 1.35rem; }
    .prose-custom h2 { font-size: 1.15rem; }
    .prose-custom h3 { font-size: 1rem; }
    .prose-custom p, .prose-custom li { font-size: 0.85rem; }
}

