/* Basic Reset */
body,
html {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: sans-serif;
    background-color: #333;
    color: white;
}

/* Base links */
a {
    color: white;
}

a:hover {
    text-decoration: underline;
}

/* Navigation Bar */
nav {
    width: 100%;
    background-color: #222;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 100;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}

/* General Layout Elements */
h1 {
    margin: 0;
}

pre {
    font-family: monospace;
    line-height: 1.2;
    font-size: 1.8vw;
}

/* Centering Containers */
.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding-top: 60px;
    box-sizing: border-box;
}

.index-content {
    text-align: left;
}

.contact-content {
    margin: 10px 0;
    word-break: break-word;
    flex-direction: column;
    text-align: center;
    font-size: 30px;
    gap: 15px;
}

/* Blog Specifics */
.blog-container {
    max-width: 600px;
    margin: 80px auto;
    padding: 20px;
}

.post-card {
    display: block;
    background-color: #444;
    padding: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    border-left: 5px solid #888;
    transition: background-color 0.2s ease;
}

.post-card:hover {
    background-color: #555;
}

/* Individual Blog Post Specifics */
.blog-post {
    display: block;
    max-width: 800px;
    margin: 80px auto;
    padding: 100px 40px 40px 40px;
    background-color: #383838;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.blog-post h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
    color: #fff;
    border-bottom: 2px solid #555;
    padding-bottom: 10px;
}

.blog-post .post-meta {
    font-size: 0.9rem;
    color: #bbb;
    margin-bottom: 30px;
    font-style: italic;
}

.blog-post p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #ddd;
    text-align: justify;
}

.blog-post a {
    color: #4da6ff;
    text-decoration: none;
}

.blog-post a:hover {
    text-decoration: underline;
    color: #80bfff;
}

.blog-element img {
    max-width: 100%;
    /* This is the magic line */
    height: auto;
    /* Keeps the aspect ratio perfect */
    display: inline-block;
}

.blog-element {
    text-align: center;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* Chat Layout Helper */
.chat-layout {
    flex-direction: column;
}

/* Chat Room Styles */
#chat-container {
    width: 90vw;
    max-width: 600px;
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

#chat-messages {
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    height: 400px;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.chat-message {
    word-break: break-word;
    font-size: 0.95rem;
    line-height: 1.4;
}

.chat-time {
    color: #888;
    font-size: 0.8rem;
    margin-right: 5px;
}

.chat-user {
    color: #4da6ff;
    font-weight: bold;
    margin-right: 5px;
}

.chat-text {
    color: #ddd;
}

#chat-input-area {
    display: flex;
    gap: 10px;
}

#chat-username {
    width: 25%;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #1a1a1a;
    color: white;
}

#chat-text {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #1a1a1a;
    color: white;
}

#chat-send {
    padding: 10px 20px;
    background-color: #4da6ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

#chat-send:hover {
    background-color: #3a86df;
}