/* General Body and Typography */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styling */
header {
    background: linear-gradient(135deg, #1DA1F2, #007bff);
    color: white;
    padding: 40px 0;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

header h1 {
    font-size: 3.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

header .subtitle {
    font-size: 1.4em;
    font-weight: 300;
    opacity: 0.9;
}

/* Navigation Bar */
nav {
    background-color: #222;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 400;
    font-size: 1.1em;
    padding: 5px 0;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: #1DA1F2;
    border-bottom: 2px solid #1DA1F2;
}

/* Main Content Sections */
main {
    padding: 30px 0;
}

.content-section {
    background-color: white;
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.content-section h2 {
    font-size: 2.5em;
    color: #1DA1F2;
    margin-bottom: 25px;
    border-bottom: 3px solid #007bff;
    padding-bottom: 10px;
    font-weight: 700;
}

.content-section h3 {
    font-size: 1.8em;
    color: #007bff;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 500;
}

.content-section p {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.content-section ul {
    list-style: disc;
    margin-left: 25px;
    margin-bottom: 15px;
}

.content-section ul li {
    margin-bottom: 8px;
    font-size: 1.05em;
}

.content-section a {
    color: #1DA1F2;
    text-decoration: none;
    transition: color 0.3s ease;
}

.content-section a:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* Code Blocks */
.code-block {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.95em;
    position: relative; /* For positioning the copy button */
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.code-block pre {
    margin: 0;
    white-space: pre-wrap; /* Ensures long lines wrap */
    word-wrap: break-word; /* Breaks words if necessary */
}

.code-block code {
    display: block; /* Ensures code takes full width */
}

/* Copy Button Styling */
.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #1DA1F2;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.copy-btn:hover {
    background-color: #007bff;
}

/* Images within content */
.content-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Call to Action */
.call-to-action {
    font-size: 1.6em;
    font-weight: 700;
    text-align: center;
    color: #007bff;
    margin-top: 40px;
    padding: 20px;
    background-color: #e6f2ff;
    border-radius: 8px;
    border: 2px solid #007bff;
}

/* Footer */
footer {
    background-color: #222;
    color: white;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
    margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5em;
    }

    header .subtitle {
        font-size: 1.2em;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 8px 0;
    }

    .content-section {
        padding: 25px;
    }

    .content-section h2 {
        font-size: 2em;
    }

    .content-section h3 {
        font-size: 1.5em;
    }

    .content-section p,
    .content-section ul li {
        font-size: 1em;
    }

    .call-to-action {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2em;
    }

    header .subtitle {
        font-size: 1em;
    }

    .content-section {
        padding: 15px;
    }

    .content-section h2 {
        font-size: 1.8em;
    }
}