/* General Body & Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #2d2f44;
    color: #edecec;
    font-size: 1.1rem;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2 {
    font-family: "Georgia", serif;
    color: #ebc802ee;
}

h1 {
    font-size: 3rem;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

h2 {
    font-size: 2.2rem;
    border-bottom: 2px solid #4a4d6a;
    padding-bottom: 10px;
    margin-top: 40px;
}

p {
    text-align: justify;
}

hr {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(255, 215, 0, 0), rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0));
    margin: 20px 0;
}

/* Header, Nav, & Footer Containers */
header, nav, footer {
    background-color: #1e202f;
}

header {
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

nav {
    display: flex;
    justify-content: center;
    padding: 15px 0;
    gap: 25px;
}

nav a {
    color: #f5f5f5;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav a:hover {
    background-color: #ebc802ee;
    color: #1e202f;
    text-decoration: none;
}

/* Main Content & Layout */
main {
    flex-grow: 1;
    width: 80%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background-color: #242638;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border-radius: 8px;
    border: 1px solid #4a4d6a;
}

/* NEW: Styles for links within the main content */
main a {
    color: #ebc802ee;
    text-decoration: underline;
    font-weight: bold;
}

main a:hover {
    text-decoration: none;
}

section {
    margin-bottom: 40px;
}

/* Images & Media */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    margin-top: 20px;
}

/* Responsive Video Container */
.video-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Lists & Code Blocks */
ul {
    list-style-type: square;
    padding-left: 20px;
    text-align: left;
}

pre {
    background-color: #0d0f1a;
    color: #c9d1d9;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
    border: 1px solid #4a4d6a;
}

/* AI Page Specifics */
form {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

input[type="text"] {
    width: 50%;
    padding: 12px;
    border: 2px solid #4a4d6a;
    background-color: #2d2f44;
    color: #f0f0f0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus {
    border-color: #ebc802ee;
    outline: none;
}

button[type="submit"] {
    padding: 12px 25px;
    border: none;
    background-color: #ebc802ee;
    color: #1e202f;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #ebc802ee;
}

div.ai-response {
    background-color: #2d2f44;
    border-left: 5px solid #ebc802ee;
    padding: 20px;
    margin-top: 20px;
    border-radius: 5px;
    text-align: left;
}

.ai-response ul, .ai-response ol {
    margin: 1em 0;
    padding-left: 1.5em;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    color: #a0a0a0;
    font-size: 1.1rem;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
    border-top: 1px solid #4a4d6a;
    background-color: #1e202f;
}

.footer-content p {
    margin: 10px 0;
    text-align: center;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: #ebc802ee;
    text-decoration: none;
    margin: 0 10px;
    display: inline-block;
}

.footer-links a:hover {
    text-decoration: underline;
}

.copyright {
    text-align: center;
    margin-top: 15px;
    font-size: 1.1rem;
    color: #8b949e;
}