/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Roboto', 'Helvetica Neue', sans-serif;
    background-color: #f9fafb;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

/* Container for page content */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Headings */
h1, h2, h3 {
    color: #111;
    margin-bottom: 20px;
}

/* Paragraphs */
p {
    margin-bottom: 20px;
    font-size: 18px;
}

/* Code Block Container */
pre {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 30px;
}

/* Code Font */
code {
    font-family: 'Fira Code', monospace;
    font-size: 16px;
    color: #1f2937;
}

/* Code Block Header */
.code-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

/* Copy All Button */
.copy-all {
    background-color: #4f46e5;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}
.copy-all:hover {
    background-color: #4338ca;
}

/* Code text container */
.code-text {
    flex-grow: 1;
    white-space: pre;
    overflow-x: auto;
}



/* Syntax Highlighting */
.keyword {
    color: #2563eb;
    font-weight: bold;
}
.string {
    color: #059669;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.nav-buttons a {
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font-weight: bold;
    transition: background 0.3s;
}

.nav-buttons a:hover {
    background: #1d4ed8;
}

/* If only one button (center it) */
.nav-buttons.single {
    justify-content: center;
}


/* Desktop Layout */
.code-line, .comment-line {
    display: flex;
    background: #ffe4e6;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
    white-space: pre;
    overflow-x: auto;
    position: relative;
}

.comment-line {
    background: #e5e7eb;
    font-style: italic;
    color: #6b7280;
}

/* Code content takes all available space */
.code-content {
    flex-grow: 1;
    overflow-x: auto;
}

/* Copy button - Desktop (right side) */
.copy-line {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid gray;
    border-radius: 5px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    transition: all 0.3s;
}

.copy-line:hover {
    color: #111827;
    border-color: #111827;
}

/* Mobile Layout */
@media (max-width: 600px) {
    .code-line, .comment-line {
        padding-bottom: 30px; /* Make room for button at bottom */
        white-space: pre-wrap;
    }
    
    /* Copy button - Mobile (left bottom) */
    .copy-line {
        position: absolute;
        left: 10px;
        bottom: 6px;
        top: auto;
        transform: none;
    }
}
.code-line {
    border: 1px solid black;

}