* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #ffe0f0;
    color: #333;
    line-height: 1.6;
}

/* Header */
header {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(255, 20, 147, 0.3);
    border-bottom: 3px solid #ff1493;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    height: 67px;
    width: auto;
}

.user-info {
    display: flex;
    gap: 15px;
    align-items: center;
    color: white;
    font-weight: bold;
}

.user-info a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    transition: background-color 0.3s;
}

.user-info a:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

#logout-btn {
    padding: 8px 16px;
    background-color: #ff1493;
    color: white;
    border: 2px solid white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

#logout-btn:hover {
    background-color: #c71585;
    transform: scale(1.05);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    min-height: calc(100vh - 200px);
}

/* Board Header */
.board-header {
    background: linear-gradient(135deg, #ff85c1, #ff69b4);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
    border: 2px solid #ff69b4;
}

.board-header h1 {
    color: white;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
}

.board-desc {
    color: #ffe0f0;
    font-size: 1.2em;
}

/* Post Forms */
.post-form-container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.2);
    border: 2px solid #ffb6d9;
}

.post-form-container h2,
.post-form-container h3 {
    color: #ff1493;
    margin-bottom: 20px;
}

.post-form input[type="text"],
.post-form input[type="file"],
.post-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #ffb6d9;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.post-form input[type="text"]:focus,
.post-form textarea:focus {
    outline: none;
    border-color: #ff69b4;
}

.post-form textarea {
    min-height: 120px;
    resize: vertical;
    font-family: Arial, sans-serif;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff1493, #c71585);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 20, 147, 0.3);
}

.btn-secondary {
    background-color: #ffb6d9;
    color: #333;
    margin-left: 10px;
}

.btn-secondary:hover {
    background-color: #ff85c1;
}

/* Threads */
.threads-container {
    margin-top: 30px;
}

.thread {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 2px solid #ffb6d9;
    box-shadow: 0 2px 8px rgba(255, 105, 180, 0.15);
    transition: all 0.3s;
    cursor: pointer;
}

.thread:hover {
    border-color: #ff69b4;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
    transform: translateY(-2px);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ffe0f0;
}

.post-info {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.post-name {
    font-weight: bold;
    color: #ff1493;
}

.post-name.admin {
    color: #c71585;
    font-weight: bold;
}

.post-name.admin::after {
    content: " [ADMIN]";
    background-color: #ff1493;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.75em;
    margin-left: 5px;
}

.post-date {
    color: #999;
    font-size: 0.9em;
}

.post-number {
    color: #ff69b4;
    font-weight: bold;
}

.thread-subject {
    font-size: 1.3em;
    font-weight: bold;
    color: #ff1493;
    margin-bottom: 10px;
}

.post-content {
    color: #333;
    margin-bottom: 15px;
    line-height: 1.8;
}

.post-image {
    max-width: 250px;
    max-height: 250px;
    border-radius: 5px;
    margin-top: 10px;
    border: 2px solid #ffb6d9;
}

/* Thread / Reply images */
.thread-image,
.reply-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-top: 10px;
    border: 2px solid #ffb6d9;
}

/* Thumbnails in thread list */
.threads-container .thread .thread-image {
    max-width: 250px;
    max-height: 250px;
    object-fit: contain;
}

/* Larger display in thread view */
.thread-view .thread .thread-image {
    max-width: 700px;
    max-height: 700px;
    object-fit: contain;
}

.thread-view .reply .reply-image {
    max-width: 500px;
    max-height: 500px;
    object-fit: contain;
}

.reply-count {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

/* Thread View */
.thread-view {
    margin-top: 30px;
}

.op-post {
    background: #fff0f8;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 3px solid #ff69b4;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.reply {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    margin-left: 40px;
    border-radius: 8px;
    border-left: 4px solid #ffb6d9;
    box-shadow: 0 2px 5px rgba(255, 105, 180, 0.1);
}

.delete-btn {
    background-color: #ff4444;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background-color 0.3s;
}

.delete-btn:hover {
    background-color: #cc0000;
}

/* Login Page */
.login-container {
    max-width: 500px;
    margin: 50px auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(255, 105, 180, 0.3);
    border: 2px solid #ffb6d9;
}

.login-container h1 {
    color: #ff1493;
    text-align: center;
    margin-bottom: 30px;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ff1493;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ffb6d9;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #ff69b4;
}

.error-message {
    color: #ff4444;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
    display: none;
}

.error-message:not(:empty) {
    display: block;
}

.success-message {
    color: #00aa00;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

/* Discord Login Button */
.discord-login-btn {
    width: 100%;
    padding: 15px 20px;
    background-color: #5865F2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.discord-login-btn:hover {
    background-color: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.discord-login-btn:active {
    transform: translateY(0);
}

.discord-login-btn svg {
    width: 28px;
    height: 28px;
}

.form-group small {
    display: block;
    color: #999;
    font-size: 0.85em;
    margin-top: 5px;
}

.login-info {
    margin-top: 30px;
    padding: 20px;
    background-color: #ffe0f0;
    border-radius: 5px;
    border: 2px solid #ffb6d9;
}

.login-info p {
    margin-bottom: 5px;
    color: #666;
}

/* Fixed Reply Section at Bottom */
.reply-section-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(255, 224, 240, 0.98) 0%, rgba(255, 224, 240, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-top: 3px solid #ff69b4;
    box-shadow: 0 -4px 20px rgba(255, 105, 180, 0.3);
    z-index: 1000;
    padding: 15px 0;
    max-height: 40vh;
    overflow-y: auto;
}

.reply-section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.reply-section-fixed h3 {
    color: #ff1493;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.reply-section-fixed .post-form {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #ffb6d9;
}

.reply-section-fixed textarea {
    min-height: 80px;
    max-height: 150px;
}

/* Add padding to thread view when reply section is visible */
.thread-view.with-reply-form {
    padding-bottom: 280px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .reply {
        margin-left: 20px;
    }
    
    .board-header h1 {
        font-size: 1.8em;
    }
}
