/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    line-height: 1.6;
    color: #333;
}

/* Header Section */
header {
    background: #4CAF50;
    color: white;
    padding: 20px 0;
    text-align: center;
}

header h1 {
    font-size: 36px;
}

header p {
    font-size: 18px;
    margin-top: 10px;
}

/* Navigation */
nav {
    background: #333;
    color: white;
    padding: 10px 0;
    text-align: center;
}

nav ul {
    list-style-type: none;
}

nav ul li {
    display: inline-block;
    margin-right: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

nav ul li a:hover {
    text-decoration: underline;
}

/* Main Content Section */
.container {
    width: 80%;
    margin: 0 auto;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #333;
    margin-bottom: 10px;
}

pre {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    margin-top: 10px;
    overflow-x: auto;  /* Allow horizontal scrolling if code is too wide */
    white-space: pre-wrap;  /* Ensure long lines wrap inside the container */
    word-wrap: break-word; /* Break long words if necessary */
}

code {
    color: #ff5722;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f4f4f4;
}

/* Footer Section */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 10px 0;
    margin-top: 30px;
}

/* Mobile-Friendly Styles */
@media screen and (max-width: 768px) {
    header h1 {
        font-size: 28px;
    }

    header p {
        font-size: 16px;
    }

    nav ul li {
        display: block;
        margin: 5px 0;
    }

    .container {
        width: 90%;
        padding: 15px;
    }

    table th, table td {
        font-size: 14px;
    }

    pre {
        padding: 8px;
        font-size: 14px;  /* Adjust font size for better readability */
    }

    footer {
        padding: 8px 0;
    }
}

/* Very Small Devices (phones in portrait mode) */
@media screen and (max-width: 480px) {
    header h1 {
        font-size: 24px;
    }

    header p {
        font-size: 14px;
    }

    nav ul li {
        font-size: 14px;
        margin-right: 10px;
    }

    .container {
        width: 95%;
        padding: 10px;
    }

    table th, table td {
        font-size: 12px;
        padding: 6px;
    }

    footer {
        font-size: 12px;
        padding: 6px 0;
    }

    pre {
        padding: 6px;
        font-size: 12px;  /* Reduce font size for very small screens */
    }
}
