/* ========================================
   CODE BLOCKS - Generic Styles
   Future: Add custom syntax highlighting themes here
   ======================================== */

.code-container {
    position: relative;
    margin: 24px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    margin-left: -0.9rem;
    margin-right: -0.9rem;
}

pre {
    background: #0d1117 !important;
    color: #e2e8f0 !important;
    border: none;
    border-radius: 0;
    padding: 20px;
    margin: 0;
    font-family: 'Fira Code', 'Monaco', 'Cascadia Code', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: scroll;
}

pre code {
    background: transparent !important;
    color: inherit !important;
    padding: 0;
    border: none;
    white-space: pre;
    font-family: inherit;
    font-size: inherit;
}

/* ========================================
   COPY BUTTON
   ======================================== */

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(74, 85, 104, 0.9);
    color: #e2e8f0;
    border: none;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 14px;
    z-index: 10;
    transition: all 0.2s ease;
    opacity: 0.8;
    backdrop-filter: blur(4px);
}

.copy-btn:hover {
    background: #4CAF50;
    opacity: 1;
    transform: scale(1.05);
}

.copy-btn.copied {
    background: #10b981;
    transform: scale(1.1);
}

/* ========================================
   SCROLLBAR
   ======================================== */

pre::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

pre::-webkit-scrollbar-track {
    background: #1a202c;
    border-radius: 4px;
}

pre::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

pre::-webkit-scrollbar-corner {
    background: #1a202c;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .code-container {
        margin-left: 0;
        margin-right: 0;
    }

    .code-container pre {
        max-height: 300px;
        padding: 16px;
        font-size: 13px;
    }

    .copy-btn {
        top: 8px;
        right: 8px;
        padding: 6px 8px;
        font-size: 12px;
    }
}
