/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Gill Sans', 'Gill Sans MT';
}

body {
    background-color: #eef2ff;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #d6daf0;
    padding: 1rem;
    border-bottom: 1px solid #b7c5d9;
}

header h1 {
    color: #800000;
    margin-bottom: 0.5rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li a {
    display: block;
    padding: 0.5rem 1rem;
    color: #34345c;
    text-decoration: none;
    font-weight: bold;
}

nav ul li a:hover {
    color: #800000;
}

nav ul li a.active {
    color: #800000;
    text-decoration: underline;
}

main {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #b7c5d9;
}

.board-header h2 {
    color: #34345c;
}

button {
    background-color: #d6daf0;
    border: 1px solid #b7c5d9;
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: #34345c;
}

button:hover {
    background-color: #c0c4e0;
}

.thread-form {
    background-color: #d6daf0;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #b7c5d9;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #b7c5d9;
}

.form-group textarea {
    resize: vertical;
}

.threads-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.thread {
    background-color: #d6daf0;
    padding: 1rem;
    border: 1px solid #b7c5d9;
    cursor: pointer;
}

.thread:hover {
    background-color: #c0c4e0;
}

.thread-title {
    font-weight: bold;
    color: #34345c;
    margin-bottom: 0.5rem;
}

.thread-meta {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.thread-preview {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
/* Ad Popup Styles */
.ad-popup {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    z-index: 1000;
    background-color: #d6daf0;
    border: 1px solid #b7c5d9;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.ad-content {
    padding: 15px;
    position: relative;
}

.close-ad {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #800000;
}

.ad-header {
    margin-bottom: 10px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
}

.ad-label {
    font-weight: bold;
    color: #800000;
}

.ad-meta {
    color: #666;
}

.ad-body {
    margin-bottom: 10px;
    line-height: 1.4;
}

.ad-link {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #800000;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
}

.ad-link:hover {
    background-color: #600000;
}

.ad-footer {
    font-size: 0.7rem;
    color: #666;
    text-align: right;
}

.thread-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 0.5rem;
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: #d6daf0;
    border-top: 1px solid #b7c5d9;
    margin-top: 2rem;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: auto;
}

.modal-content {
    background-color: #eef2ff;
    margin: 2rem auto;
    padding: 1rem;
    max-width: 800px;
    border: 1px solid #b7c5d9;
}

.close-btn {
    float: right;
    font-size: 1.5rem;
    cursor: pointer;
}

.replies-container {
    margin-top: 1rem;
}

.reply {
    background-color: #d6daf0;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #b7c5d9;
}

.reply-meta {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.reply-form {
    margin-top: 1rem;
    background-color: #d6daf0;
    padding: 1rem;
    border: 1px solid #b7c5d9;
}
/* Settings Button Styles */
.settings-container {
    position: relative;
    display: inline-block;
    margin-left: auto;
    padding-right: 1rem;
}

#settings-btn {
    background-color: #d6daf0;
    border: 1px solid #b7c5d9;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1rem;
}

.settings-dropdown {
    display: none;
    position: absolute;
    right: 0;
    background-color: #eef2ff;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border: 1px solid #b7c5d9;
}

.settings-dropdown button {
    color: #34345c;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.settings-dropdown button:hover {
    background-color: #d6daf0;
}

.show {
    display: block;
}

/* Modal styles for support and donation */
.info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.info-modal-content {
    background-color: #eef2ff;
    margin: 15% auto;
    padding: 12px 16px;
    border: 1px solid #b7c5d9;
    width: 80%;
    max-width: 500px;
}

.close-info-modal {
    float: right;
    font-size: 1.5rem;
    cursor: pointer;
}
.auth-box {
    position: relative;
    display: inline-block;
    margin-left: 10px;
}

#auth-form {
    position: absolute;
    right: 0;
    background: #eef2ff;
    padding: 12px 16px;
    border: 1px solid #b7c5d9;
    z-index: 100;
}

#auth-form input {
    display: block;
    margin: 5px 0;
    padding: 5px;
    width: 150px;
}

#auth-message {
    font-size: 12px;
    margin-top: 5px;
    color: #800000;
}
/* Ad Window Styles */
.ad-window {
  width: 300px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  font-family: Arial, sans-serif;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background: white;
}

/* Hide the ad when close link is targeted */
.ad-window:target {
  display: none;
}

.ad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8f8f8;
  border-bottom: 1px solid #e0e0e0;
}

.ad-title {
  font-size: 12px;
  color: #666;
  font-weight: bold;
}

.close-btn {
  text-decoration: none;
  font-size: 18px;
  color: #999;
  padding: 0 5px;
  line-height: 1;
}

.close-btn:hover {
  color: #333;
}

.ad-content {
  padding: 12px;
}

.ad-image {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 12px;
}

.ad-bio h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #333;
}

.ad-bio p {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

.ad-button {
  display: inline-block;
  padding: 8px 16px;
  background: #4a6bff;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  transition: background 0.3s;
}

.ad-button:hover {
  background: #3a5bef;
}
