/* ============================================ */
        /* BASE STYLES */
        /* ============================================ */
:root {
            --bg-primary: #0a0a0a;
            --bg-secondary: #121212;
            --bg-card: #1a1a1a;
            --bg-hover: #252525;
            --text-primary: #e8e8e8;
            --text-secondary: #a0a0a0;
            --text-muted: #6a6a6a;
            --btc-orange: #f7931a;
            --btc-orange-light: #ffaa44;
            --accent-blue: #3498db;
            --accent-green: #2ecc71;
            --accent-red: #e74c3c;
            --accent-purple: #9b59b6;
            --border-color: #2a2a2a;
        }
        
        [data-theme="light"] {
            --bg-primary: #f8f9fa;
            --bg-secondary: #ffffff;
            --bg-card: #ffffff;
            --bg-hover: #f0f0f0;
            --text-primary: #1a1a1a;
            --text-secondary: #4a4a4a;
            --text-muted: #888888;
            --border-color: #e0e0e0;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.7;
            transition: background 0.3s, color 0.3s;
        }
        
        /* Header */
        .site-header {
            position: sticky;
            top: 0;
            z-index: 100;
            background: var(--bg-secondary);
            border-bottom: 2px solid var(--btc-orange);
            backdrop-filter: blur(12px);
        }
        
        .header-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 16px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
        }
        
        .logo-link {
            display: flex;
            align-items: center;
            gap: 10px;
            text-decoration: none;
            color: var(--text-primary);
        }
        
        .logo-icon { font-size: 32px; color: var(--btc-orange); }
        .logo-text {
            font-weight: 700;
            font-size: 1.3rem;
            background: linear-gradient(135deg, var(--btc-orange), var(--btc-orange-light));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        
        .nav-links { display: flex; gap: 24px; align-items: center; }
        .nav-link {
            color: var(--text-secondary);
            text-decoration: none;
            transition: color 0.2s;
            font-weight: 500;
        }
        .nav-link:hover { color: var(--btc-orange); }
        .nav-link.active {
            color: var(--btc-orange);
            border-bottom: 2px solid var(--btc-orange);
            padding-bottom: 4px;
        }
        
        .theme-toggle {
            background: var(--bg-hover);
            border: 1px solid var(--border-color);
            border-radius: 50%;
            width: 40px;
            height: 40px;
            cursor: pointer;
            font-size: 18px;
            transition: all 0.2s;
        }
        .theme-toggle:hover { background: var(--btc-orange); transform: scale(1.05); }
        
        .progress-bar {
            height: 3px;
            background: linear-gradient(90deg, var(--btc-orange), var(--btc-orange-light));
            width: 0%;
            position: fixed;
            top: 0;
            left: 0;
            z-index: 101;
            transition: width 0.1s ease;
        }
        
        /* Article Container */
        .article-container {
            max-width: 1000px;
            margin: 0 auto;
            padding: 48px 24px 80px;
        }
        
        /* Breadcrumb */
        .breadcrumb {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.85rem;
            color: var(--text-muted);
            margin-bottom: 32px;
            flex-wrap: wrap;
        }
        .breadcrumb a { color: var(--btc-orange); text-decoration: none; }
        .breadcrumb a:hover { text-decoration: underline; }
        
        /* Article Header */
        .article-header { margin-bottom: 32px; }
        .article-category {
            display: inline-block;
            background: rgba(247, 147, 26, 0.15);
            color: var(--btc-orange);
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 16px;
        }
        .article-title {
            font-size: 2.5rem;
            font-weight: 800;
            color: var(--text-primary);
            margin-bottom: 16px;
            line-height: 1.2;
        }
        .article-subtitle {
            font-size: 1.1rem;
            color: var(--text-secondary);
            margin-bottom: 20px;
            border-left: 4px solid var(--btc-orange);
            padding-left: 20px;
        }
        .article-meta {
            display: flex;
            gap: 24px;
            flex-wrap: wrap;
            padding-bottom: 20px;
            border-bottom: 1px solid var(--border-color);
        }
        .meta-item { display: flex; align-items: center; gap: 8px; }
        .meta-label { color: var(--text-muted); font-size: 0.8rem; }
        .meta-value { font-family: 'JetBrains Mono', monospace; color: var(--text-primary); font-weight: 500; }

        /* ============================================ */
        /* CONTENT STYLES */
        /* ============================================ */
        
        .section { margin-bottom: 40px; }
        .section h2 {
            font-size: 1.5rem;
            margin: 32px 0 16px;
            color: var(--btc-orange);
            padding-bottom: 8px;
            border-bottom: 2px solid var(--border-color);
        }
        .section h3 {
            font-size: 1.2rem;
            margin: 24px 0 12px;
            color: var(--text-primary);
        }
        .section p { color: var(--text-secondary); margin-bottom: 16px; }
        .section ul, .section ol { margin: 16px 0; padding-left: 24px; color: var(--text-secondary); }
        .section li { margin: 8px 0; }
        
        /* Info Boxes */
        .info-box {
            background: var(--bg-hover);
            border-left: 4px solid var(--btc-orange);
            padding: 20px 24px;
            border-radius: 12px;
            margin: 24px 0;
        }
        .info-box.blue { border-left-color: var(--accent-blue); }
        .info-box.green { border-left-color: var(--accent-green); }
        .info-box.warning { border-left-color: var(--accent-red); }
        .info-box-title { font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
        
        .visual-hint {
            background: rgba(247, 147, 26, 0.08);
            padding: 12px 16px;
            border-radius: 8px;
            margin: 16px 0;
            font-size: 0.85rem;
            color: var(--btc-orange);
        }
        
        /* Code Blocks */
        .code-block {
            background: var(--bg-primary);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            margin: 24px 0;
            overflow: hidden;
        }
        .code-header {
            background: var(--bg-hover);
            padding: 10px 16px;
            border-bottom: 1px solid var(--border-color);
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        

        .code-block pre { padding: 20px; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; line-height: 1.5; margin: 0; }
        .code-block code { font-family: 'JetBrains Mono', monospace; }

        /* ============================================ */
        /* CODE COPY BUTTON STYLES */
        /* ============================================ */
        
        .code-block, pre {
            position: relative;
        }
        
        .copy-btn {
            position: absolute;
            top: 12px;
            right: 12px;
            background: var(--bg-hover, #252525);
            border: 1px solid var(--border-color, #333);
            border-radius: 6px;
            padding: 6px 12px;
            font-size: 0.7rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            color: var(--text-secondary, #a0a0a0);
            z-index: 10;
            font-family: monospace;
        }
        
        .copy-btn:hover {
            background: var(--btc-orange, #f7931a);
            color: #000;
            border-color: var(--btc-orange, #f7931a);
        }
        
        /* Copy Notification */
        .copy-notification {
            position: fixed;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%) translateY(20px);
            background: #2ecc71;
            color: #fff;
            padding: 10px 20px;
            border-radius: 30px;
            font-size: 0.85rem;
            z-index: 10000;
            opacity: 0;
            transition: all 0.3s ease;
            font-family: monospace;
            white-space: nowrap;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        }
        
        @media (max-width: 480px) {
            .copy-notification {
                white-space: normal;
                max-width: 90%;
                text-align: center;
            }
        }
        
        /* Math Box */
        .math-box {
            background: var(--bg-hover);
            padding: 20px;
            border-radius: 12px;
            font-family: 'JetBrains Mono', monospace;
            margin: 20px 0;
            overflow-x: auto;
            text-align: center;
        }
        
        /* Tables */
        .table-wrapper { overflow-x: auto; margin: 24px 0; }
        .data-table {
            width: 100%;
            border-collapse: collapse;
            background: var(--bg-hover);
            border-radius: 12px;
            overflow: hidden;
        }
        .data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-color); }
        .data-table th { background: var(--bg-card); color: var(--btc-orange); font-weight: 600; }
        .data-table tr:last-child td { border-bottom: none; }
        
        /* Flow Diagram */
        .flow-diagram { background: var(--bg-card); border-radius: 16px; padding: 24px; margin: 24px 0; text-align: center; }
        .flow-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
        .flow-box {
            background: var(--bg-primary);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 12px 20px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.85rem;
        }
        .flow-box.orange {
            background: rgba(247, 147, 26, 0.1);
            border-color: var(--btc-orange);
            color: var(--btc-orange);
        }
        .flow-arrow { color: var(--text-muted); font-size: 1.1rem; }
        
        /* Constants Grid */
        .constants-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 12px;
            margin: 20px 0;
        }
        .constant-item {
            font-family: 'JetBrains Mono', monospace;
            background: var(--bg-primary);
            padding: 12px 16px;
            border-radius: 10px;
            font-size: 0.75rem;
            border: 1px solid var(--border-color);
            word-break: break-all;
        }
        .constant-item strong { color: var(--btc-orange); display: inline-block; min-width: 28px; }
        
        /* Navigation */
        .nav-buttons {
            display: flex;
            justify-content: space-between;
            margin-top: 48px;
            padding-top: 24px;
            border-top: 1px solid var(--border-color);
        }
        .nav-btn {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            padding: 12px 24px;
            border-radius: 30px;
            text-decoration: none;
            color: var(--text-primary);
            transition: all 0.2s;
            font-weight: 500;
        }
        .nav-btn:hover { background: var(--btc-orange); color: #000; border-color: var(--btc-orange); }

        /* ============================================ */
/* PROFESSIONAL TAB NAVIGATION */
/* ============================================ */

.tab-navigation {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 32px 0 40px;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    position: relative;
    flex: 1;
    max-width: 280px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 14px;
    overflow: hidden;
}

.tab-btn-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: var(--bg-card);
    transition: all 0.3s ease;
    border-radius: 14px;
}

.tab-icon {
    font-size: 1.6rem;
    transition: transform 0.3s ease;
}

.tab-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.tab-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    transition: color 0.3s ease;
}

.tab-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.tab-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--btc-orange), var(--btc-orange-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

/* Hover Effects */
.tab-btn:hover .tab-btn-inner {
    background: var(--bg-hover);
}

.tab-btn:hover .tab-icon {
    transform: translateY(-2px);
}

.tab-btn:hover .tab-label {
    color: var(--btc-orange);
}

.tab-btn:hover .tab-desc {
    color: var(--text-secondary);
}

/* Active State */
.tab-btn.active .tab-btn-inner {
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.12), rgba(247, 147, 26, 0.05));
}

.tab-btn.active .tab-label {
    color: var(--btc-orange);
}

.tab-btn.active .tab-desc {
    color: var(--btc-orange-light);
}

.tab-btn.active .tab-icon {
    transform: scale(1.05);
}

.tab-btn.active .tab-indicator {
    transform: scaleX(1);
}

/* Tab Content */
        .tab-content { display: none; animation: fadeIn 0.3s ease; }
        .tab-content.active { display: block; }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Responsive */
@media (max-width: 768px) {
    .tab-navigation {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 6px;
        border-radius: 16px;
    }
    
    .tab-btn {
        max-width: none;
    }
    
    .tab-btn-inner {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .tab-icon {
        font-size: 1.3rem;
    }
    
    .tab-label {
        font-size: 0.9rem;
    }
    
    .tab-desc {
        font-size: 0.65rem;
    }

    .article-title { font-size: 1.8rem; }
    .tab-btn { padding: 8px 16px; }
    .tab-label { font-size: 0.85rem; }
    .tab-badge { display: none; }
    .tab-navigation { border-radius: 30px; }
    .nav-buttons { flex-direction: column; gap: 12px; }
    .nav-btn { text-align: center; }
    .logo-text { display: none; }
    .flow-row { flex-direction: column; }
    .constants-grid { grid-template-columns: 1fr; }       
}

@media (max-width: 480px) {
    .tab-desc {
        display: none;
    }
    
    .tab-btn-inner {
        justify-content: center;
        text-align: center;
    }
    
    .tab-content-wrapper {
        align-items: center;
    }
}