body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #021721;
    color: #e0e0e0;
}

h1 {
    text-align: center;
    color: #f8f8f8;
}

.nav-container {
    background-color: #021721;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.nav-links {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.nav-links li {
    margin: 0 20px;
}

.nav-links a {
    color: #f8f8f8;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ffa726;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .nav-links {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        flex-wrap: wrap;
    }

    .nav-links li {
        margin: 0 10px;
    }

    .nav-container {
        padding: 10px 15px;
    }
}

p {
    padding: 20px;
    max-width: 800px;
    width: 55%;
    margin: 0 auto;
    background-color: #021721;
    color: #e0e0e0;
    border-radius: 8px;
}

.image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

img {
    width: 27%;
    margin: calc(0.25%);
    border-radius: 3%;
}

.row {
    display: flex;
    justify-content: center;
    width: 100%;
}

.center {
    justify-content: center;
}

html {
    color-scheme: dark light;
}

/* Snowflakes container */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10px;
    background-color: #ffffff !important;
    border-radius: 50%;
    opacity: 0.9;
    animation: fall linear infinite;
    filter: brightness(1) !important;
}


/* Fall animation (vertical movement) */
@keyframes fall {
    100% {
        transform: translateY(100vh);
    }
}

/* Style for the "Happy New Year" message */
#happyNewYearMessage {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 50px;
    font-weight: bold;
    color: #f44336;
    text-transform: uppercase;
    padding: 20px;
    border-radius: 10px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease-out;
    background-image: url('christmas-new-year.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: shine 2s infinite alternate;
}

/* Shiny effect for the text */
@keyframes shine {
    0% {
        text-shadow: 0 0 5px #fff, 0 0 10px #ff0000, 0 0 15px #ff0000, 0 0 20px #ff6347, 0 0 30px #ff6347, 0 0 40px #ff6347, 0 0 50px #ff6347;
    }
    100% {
        text-shadow: 0 0 10px #fff, 0 0 20px #ff0000, 0 0 30px #ff6347, 0 0 40px #ff6347, 0 0 50px #ff6347, 0 0 60px #ff6347;
    }
}

.space {
    height: 100px;
}

.center-link {
    text-decoration: none;
    color: #4CAF50;
    display: block;
    text-align: center;
    margin-top: 20px;
    font-weight: bold;
    font-size: 16px;
}

.center-link:hover {
    text-decoration: underline;
}

.error-message {
    color: red;
    font-size: 14px;
    text-align: center;
}

.welcome-message {
    color: #f8f8f8;
}

.dropdown {
    height: 100%;
    position: relative;
}

/* The button inside the nav */
.dropbtn {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0px 5px;  /* good size for clickable area */
    display: flex;
    align-items: center; /* vertical centering */
    justify-content: center; /* horizontal centering */
    height: 100%; /* ensure it fills parent li */
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 160%; /* now this really means: below navbar */
    left: 0;
    background-color: #021721;
    z-index: 999;
    min-width: 110px;
    border: 1px solid #333;
    border-radius: 4px;
    transform: translateX(-24%);
    box-shadow: 0px 5px 10px rgba(0,0,0,0.3); /* Optional */
}

/* Add an invisible "buffer" element to extend hover */
.dropdown-content::before {
    content: "";
    position: absolute;
    top: -20px;      /* 20px above the dropdown */
    left: 0;
    width: 100%;
    height: 20px;    /* buffer height */
    /* transparent background so it's invisible */
    background: transparent;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Dropdown menu links */
.dropdown-content a {
    color: white;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: #333;
    color: #ff9800;
}

.nav-links li {
    margin: 0 20px;
    height: 100%; /* Add this */
    position: relative; /* Needed for dropdown positioning */
}

a.underline-anim {
  color: #007bff;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}

a.underline-anim:hover {
  border-bottom-color: #007bff;
  cursor: pointer;
}

.comment {
    border:1px solid #ccc; padding:10px; margin:10px 0;
}

.comments {
    margin-left:20px;
}

#newThreadModal {
    display: none;
    position: fixed;
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    border: 1px solid #333;
    border-radius: 8px;
    z-index: 10;
    width: 400px;
    max-width: 90%;
    background: #111;   /* 🔥 dark solid background */
    color: #fff;        /* make text readable */
}


#overlay {
    display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.5); z-index:5;
}

h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #fff;
    font-size: 20px;
}

#profileInfoBox {
    max-width: 400px;
    margin: 30px auto;
    padding: 25px;
    border: 2px solid #000;
    border-radius: 12px;
    background-color: #111;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    font-family: 'Segoe UI', Tahoma, Verdana, sans-serif;
    color: #fff;
}

/* Wrapper for info lines */
#profileInfoBox .infoWrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-left: 15px;
}

/* Individual line */
#profileInfoBox .infoItem {
    margin: 4px 0;
}

/* Labels in blue */
#profileInfoBox .infoItem strong {
    color: #007BFF;
}

/* Values in white */
#profileInfoBox .infoItem span {
    color: #fff;
}

/* Main wrapper */
#wrapper {
    max-width: 660px;
    width: 95%;
    margin: 20px auto;
    font-family: Arial, Helvetica, sans-serif;
}

.comment {
    display: flex;
    border: 1px solid #ccc;
    background-color: #021721;
    border-radius: 6px;
    margin: 10px 0;
    padding: 0;                  /* remove padding from flex container */
    flex-wrap: wrap;
    box-sizing: border-box;
    align-items: stretch;        /* <--- stretch children to same height */
}

/* Left column */
.comment-left {
    flex: 0 0 180px;
    min-width: 144px;
    padding: 10px;
    border-right: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-sizing: border-box;
}

/* Right column */
.comment-right {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    word-break: break-word;
    box-sizing: border-box;
}

/* Username row */
.user-row {
    display: flex;
    justify-content: space-between; /* Username left, trash right */
    align-items: center;
}

/* Trash button */
.delete-btn {
    cursor: pointer;
    background-color: #f44336;  
    border: none;
    padding: 4px 8px;
    border-radius: 2px;
    font-size: 14px;
}

.delete-btn:hover {
    background-color: #d32f2f;
}

/* Username link */
.comment-left a {
    color: #007BFF;
    text-decoration: none;
}

.comment-left a:hover {
    text-decoration: underline;
}

/* Timestamp */
.timestamp {
    font-size: 12px;
    color: #555;
}

/* Center pagination */
.comment-pagination {
    text-align: center;
    margin: 20px 0;
}

.comment-pagination a {
    margin: 0 10px;
    text-decoration: none;
    color: #007BFF;
}

.comment-pagination a:hover {
    text-decoration: underline;
}

/* Center post comment form */
h3 {
    text-align: center;
    margin-top: 30px;
    color: gray;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;   /* Center horizontally */
    margin: 0 auto;
    max-width: 500px;      /* Prevent textarea from being too wide */
}

form textarea {
    width: 100%;
    min-height: 150px;
    margin-bottom: 10px;
    resize: vertical;
    padding: 8px;
    font-size: 14px;
}

form button {
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    background-color: #007BFF;
    border: none;
    border-radius: 4px;
}

form button:hover {
    background-color: #0056b3;
}

/* Center + New Thread button */
#newThreadBtn {
    display: block;
    margin: 20px auto;
    padding: 8px 16px;
    background-color: #007BFF;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    cursor: pointer;
}

#newThreadBtn:hover {
    background-color: #0056b3;
}

/* Modal overlay */
#overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 5;
}

/* Modal box */
#newThreadModal {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #333;
    z-index: 10;
    width: 400px;
    max-width: 90%;
}

#newThreadModal form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#newThreadModal input[type="text"],
#newThreadModal textarea {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    border-radius: 4px;
}

#newThreadModal button {
    padding: 8px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#newThreadModal button[type="submit"] {
    background-color: #007BFF;
}

#newThreadModal button[type="submit"]:hover {
    background-color: #0056b3;
}

.pagination {
    text-align: center;
    margin: 20px 0;
    font-family: Arial, sans-serif;
}

.pagination a, 
.pagination strong {
    margin: 0 5px;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

.pagination a {
    color: #007BFF;
    border: 1px solid #007BFF;
}

.pagination a:hover {
    background-color: #007BFF;
    color: white;
}

.pagination strong {
    background-color: #007BFF;
    color: white;
    border: 1px solid #007BFF;
}

p em {
    display: block;
    text-align: center;
}

.thread {
    max-width: 45%;
    margin: 6px auto;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 6px 10px;
    font-family: Arial, sans-serif;
    text-align: center;
    background: #021721;
}

.thread a {
    text-decoration: none;
    color: #007BFF;
}

.thread-meta {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thread a:hover {
    text-decoration: underline;
}

h1.thread-title {
    max-width: 60%;
    margin: 20px auto;
    text-align: center;
    font-size: 22px;
    word-wrap: break-word;
}

.user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;                  /* Remove default margins */
    padding: 0;
    line-height: 1.2;
}

.user-row a {
    font-size: 14px;
    color: #fe0000;
    font-weight: bolder;
    line-height: 1.2;
    display: inline;            /* Ensure no extra spacing */
    margin: 0;
    padding: 0;
}

.timestamp {
    margin: 0;
    padding: 0;
    display: block;
}