@font-face {
    font-family: 'terminus';
    src: url('assets/Terminus (TTF) 500.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'terminus';
    src: url('assets/Terminus (TTF) Italic 500.ttf') format('truetype');
    font-weight: 500;
    font-style: italic;
}

@font-face {
    font-family: 'terminus';
    src: url('assets/Terminus (TTF) Bold 700.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'terminus';
    src: url('assets/Terminus (TTF) Bold Italic 700.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}

:root {
    --bg-color: #fcfcfc;
    --text-color: #232629;
}

[data-theme="dark"] {
    --bg-color: #232629;
    --text-color: #eff0f1;
}

* {
    box-sizing: border-box;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'terminus', 'courier new', courier, monospace;
    font-weight: 500;
    margin: 0;
    padding: 20px;
    transition: background-color 0.2s, color 0.2s;
}

pre {
    margin: 0;
    font-family: 'terminus', 'courier new', courier, monospace;
    line-height: 1.0 !important;
    letter-spacing: 0px !important;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: block;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.ascii-logo {
    font-size: 1rem;
    margin-bottom: 10px;
    text-align: center;
    line-height: 1.0 !important;
    letter-spacing: 0px !important;
    max-width: 100%;
    overflow: hidden;
    color: #3daee9;
}

[data-theme="light"] .ascii-logo {
    color: #1d99f3;
}

.header-text {
    text-align: center;
    margin-bottom: 25px;
    max-width: 600px;
    font-size: 0.95rem;
    color: #7f8c8d;
}

.layout {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 30px;
    align-items: start;
    width: 100%;
}

.posts, .sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    min-width: 0; 
}

.ascii-widget {
    white-space: pre;
    font-family: 'terminus', 'courier new', courier, monospace;
    display: block;
    width: 100%;
    overflow: hidden;
    word-wrap: break-word;
    line-height: 1.0 !important;
    letter-spacing: 0px !important;
    padding-top: 2px;
    padding-bottom: 2px;
    margin-bottom: 25px;
    color: var(--text-color);
}

.ascii-widget[data-join-group] {
    margin-bottom: 0px;
}

.ascii-widget[data-join-group] + .ascii-widget[data-join-group] {
    margin-top: -1px;
    margin-bottom: 0px;
}

.ascii-widget[data-join-group]:last-of-type {
    margin-bottom: 25px;
}

.dynamic-toggle {
    cursor: pointer;
    user-select: none;
    width: fit-content;
    color: #3daee9;
}

[data-theme="light"] .dynamic-toggle {
    color: #1d99f3;
}

.dynamic-toggle:hover {
    filter: brightness(1.2);
}

.ascii-widget a {
    color: #3daee9;
    text-decoration: underline;
    position: relative;
    z-index: 10;
    cursor: pointer;
}

[data-theme="light"] .ascii-widget a {
    color: #1d99f3;
}

.ascii-widget a:hover {
    filter: brightness(1.2);
}

.iframe-container {
    grid-column: 1 / -1; 
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 40px;
}

.iframe-container iframe {
    width: 100%;
    max-width: 950px;
    height: 500px;
    border: 2px solid #31363b;
    background: transparent;
}

[data-theme="light"] .iframe-container iframe {
    border: 2px solid #bdc3c7;
}

.nabh-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(49, 54, 59, 0.8);
    backdrop-filter: blur(2px);
    z-index: 5000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.nabh-popup-content {
    max-width: 600px;
    background: #31363b;
    color: var(--text-color);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

[data-theme="light"] .nabh-popup-content {
    background: #ffffff;
}

#mobile-blocker {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #232629;
    color: #da4453;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

@media (max-width: 1023px) {
    .container { display: none; }
    #mobile-blocker { display: flex; }
}