/* Discourse Forum Static Archive Stylesheet */
/* Snuffhouse Color Palette */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #222222;
    color: #dddddd;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.top-bar {
    background-color: #000000;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    height: 60px;
    overflow: visible;
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    box-sizing: border-box;
    border-radius: 0 0 12px 12px;
}

.top-bar-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.top-bar-title {
    color: #dddddd;
    font-size: 1.5em;
    font-weight: 600;
    margin: 0;
    margin-left: 20px;
}

.top-bar-icon {
    border-radius: 4px;
    object-fit: contain;
    max-height: none !important;
    max-width: none !important;
    margin: -20px 0;
    flex-shrink: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.archive-header {
    background: #000000;
    color: #dddddd;
    padding: 20px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: none;
}

.header-text {
    flex: 1;
}

.archive-header h1 {
    font-size: 2.5em;
    margin-bottom: 5px;
    margin-top: 0;
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    text-align: center;
}

.site-description {
    font-size: 1.1em;
    margin-bottom: 0;
    margin-top: 5px;
    opacity: 0.95;
}

.archive-notice {
    background: rgba(99, 113, 87, 0.3);
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    border-left: 4px solid #637157;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.archive-notice p {
    margin: 5px 0;
}

.discord-card {
    background: rgba(88, 101, 242, 0.15);
    padding: 20px;
    border-radius: 6px;
    margin-top: 15px;
    border-left: 4px solid #5865F2;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.discord-card p {
    margin: 0;
    color: #dddddd;
    line-height: 1.6;
}

.discord-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #637157;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1em;
    transition: background-color 0.2s ease;
    align-self: center;
}

.discord-button:hover {
    background-color: #8a9d7f;
}

.discord-button-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.topic-meta-header {
    margin-top: 15px;
    font-size: 0.95em;
}

/* Navigation */
.archive-nav {
    background: #2c2c2c;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.archive-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.archive-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

.topic-title-nav {
    color: #cccccc;
    font-size: 1.3em;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 0 20px;
}

/* Topics List */
.topics-list {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.topic-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 25px;
    border: 1px solid #313131;
    border-radius: 12px;
    transition: background-color 0.2s;
    min-height: auto;
    background: #2c2c2c;
    box-shadow: none;
    gap: 15px;
}

.topic-row:last-child {
    border-bottom: 1px solid #313131;
}

.topic-row:hover {
    background-color: #2c2c2c;
}

.topic-avatar {
    flex-shrink: 0;
}

.poster-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.topic-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.topic-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pinned-indicator {
    font-size: 1.2em;
    opacity: 0.7;
    flex-shrink: 0;
}

.topic-title {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1em;
    transition: color 0.2s;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.topic-title:hover {
    color: #ffffff;
    text-decoration: underline;
}

.topic-excerpt {
    color: #999999;
    font-size: 0.9em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 0.9em;
    color: #969696;
    min-width: 250px;
    justify-content: flex-end;
}

.category {
    background: #313131;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    color: #969696;
}

.post-count {
    color: #969696;
}

.no-topics {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
    font-size: 1.1em;
}

/* Topic Content */
.topic-content {
    background: #2c2c2c;
    border-radius: 8px;
    box-shadow: none;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.post-container {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid #313131;
    margin: 0;
}

.post-container:last-child {
    border-bottom: none;
}

.post-header {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-bottom: 15px;
    align-items: flex-start;
}

.post-avatar {
    flex-shrink: 0;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #e9ecef;
    object-fit: cover;
    display: block;
}

.avatar-placeholder {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #637157;
    color: #222222;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    flex-shrink: 0;
}

.post-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.username {
    font-weight: 600;
    color: #dddddd;
    word-break: break-word;
}

.timestamp {
    font-size: 0.85em;
    color: #969696;
}

.post-body {
    margin-top: 15px;
    line-height: 1.8;
}

.post-body img {
    height: auto;
    display: inline;
    margin: 0 2px;
    border-radius: 4px;
}

.post-body .onebox {
    max-width: 100%;
}

.post-body aside.onebox {
    border: 1px solid #313131;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

/* Exclude avatars from global constraints */
img.avatar,
.avatar img {
    max-width: 45px !important;
    max-height: 45px !important;
    width: 45px !important;
    height: 45px !important;
}

/* Exclude poster avatars from global constraints */
.poster-avatar {
    max-width: 45px !important;
    max-height: 45px !important;
    width: 45px !important;
    height: 45px !important;
}


/* Style onebox container */
aside.onebox {
    border: 1px solid #313131;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

.post-body a {
    color: #637157;
    text-decoration: none;
}

.post-body a:hover {
    color: #8a9d7f;
    text-decoration: underline;
}

.post-body code {
    background: #050505;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #dddddd;
}

.post-body pre {
    background: #050505;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 10px 0;
    border-left: 4px solid #637157;
    color: #dddddd;
}

.post-body ul,
.post-body ol {
    margin: 10px 0;
    padding-left: 40px;
}

.post-body li {
    margin: 0;
    line-height: 1.6;
    margin-bottom: 8px;
}

.post-body pre code {
    background: none;
    padding: 0;
}

.no-posts {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
    font-size: 1.1em;
}

/* Footer */
.archive-footer {
    text-align: center;
    padding: 30px 20px;
    color: #969696;
    font-size: 0.9em;
    margin-top: 40px;
    border-top: 1px solid #313131;
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-bar-title {
        font-size: 1em;
        margin-left: 10px;
    }
    
    .topic-title-nav {
        font-size: 1.1em;
        padding: 0 10px;
    }
    
    .archive-header h1 {
        font-size: 1.8em;
    }

    .archive-nav ul {
        gap: 15px;
        flex-wrap: wrap;
    }

    .topic-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .topic-meta {
        justify-content: flex-start;
        min-width: auto;
    }

    .post-container {
        flex-direction: column;
    }

    .post-header {
        flex-direction: row;
    }

    .container {
        padding: 10px;
    }
    
    .discord-card {
        padding: 15px;
    }
    
    .discord-card p {
        font-size: 0.95em;
    }
    
    .discord-button {
        width: 100%;
        justify-content: center;
        align-self: stretch;
    }
}

/* Year Selector Styling */
.year-selector {
    background: #2c2c2c;
    border: 1px solid #313131;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.year-selector label {
    font-weight: 600;
    color: #dddddd;
    white-space: nowrap;
}

.year-selector select {
    padding: 10px 15px;
    background-color: #1a1a1a;
    color: #dddddd;
    border: 1px solid #637157;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    min-width: 150px;
}

.year-selector select:hover {
    background-color: #252525;
    border-color: #8a9d7f;
}

.year-selector select:focus {
    outline: none;
    border-color: #8a9d7f;
    box-shadow: 0 0 0 2px rgba(139, 157, 127, 0.2);
}

/* Year Section Styling */
.year-section {
    margin-bottom: 40px;
}

.year-heading {
    font-size: 1.8em;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #637157;
}

.year-topics {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Topic Poster Styling */
.topic-poster {
    font-size: 0.9em;
    color: #999999;
    margin: 5px 0;
}

.topic-poster strong {
    color: #bbbbbb;
}
