/* ================================================
   BLOG POSTS - WINDOWS 98 STYLE
   ================================================ */

/* Container principal */
#blogPostsContainer {
    width: 100%;
}

/* ================================================
   CONTROLES
   ================================================ */
.blog-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    justify-content: center;
    align-items: center;
}

.blog-control-btn {
    padding: 4px 12px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    color: #000;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
}

.blog-control-btn:hover {
    background: #d4d0c8;
}

.blog-control-btn:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

.blog-control-btn.active {
    background: #ff8c00;
    color: #fff;
    border-color: #cc7000 #ffaa44 #ffaa44 #cc7000;
}

.blog-category-select {
    padding: 3px 8px;
    background: #fff;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    font-size: 11px;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    cursor: pointer;
}

.blog-nsfw-container {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    font-size: 11px;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
}

.blog-nsfw-container input[type="checkbox"] {
    cursor: pointer;
}

.blog-nsfw-container label {
    cursor: pointer;
    color: #000;
}

.blog-controls-separator {
    width: 1px;
    height: 20px;
    background: #808080;
    margin: 0 5px;
}

/* ================================================
   JANELA DO POST
   ================================================ */
.blog-window {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 15px;
    box-shadow: 2px 2px 0px #000;
}

.blog-window.nsfw-post {
    display: none;
}

.blog-window.nsfw-post.nsfw-visible {
    display: block;
}

/* Titlebar */
.blog-window-titlebar {
    background: linear-gradient(to right, #451a03, #ff9403);
    color: white;
    padding: 4px 6px;
    font-weight: bold;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: default;
    user-select: none;
}

.blog-window-titlebar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    overflow: hidden;
}

.blog-window-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-window-category {
    font-size: 9px;
    background: rgba(0,0,0,0.3);
    padding: 1px 6px;
   
    text-transform: uppercase;
}

.blog-window-category.nsfw {
    background: #ff0000;
}

/* Botões da janela */
.blog-window-buttons {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.blog-window-btn {
    width: 16px;
    height: 14px;
    background: #c0c0c0;
    border: 1px solid;
    border-color: #ffffff #000000 #000000 #ffffff;
    font-size: 9px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
}

.blog-window-btn:hover {
    background: #d4d0c8;
}

.blog-window-btn:active {
    border-color: #000000 #ffffff #ffffff #000000;
}

/* ================================================
   CONTEÚDO DO POST
   ================================================ */
.blog-window-content {
    background: #ffffff;
    padding: 15px;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    margin: 3px;
    max-height: 400px;
    overflow-y: auto;
}

.blog-window-content.minimized {
    display: none;
}

/* Meta info */
.blog-window-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #c0c0c0;
}

.blog-window-date {
    font-size: 11px;
    color: #666;
}

.blog-window-author {
    font-size: 10px;
    color: #888;
    font-style: italic;
}

/* Footer do post */
.blog-window-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #c0c0c0;
    display: flex;
    gap: 8px;
}

.blog-window-footer-btn {
    padding: 4px 10px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    color: #000;
    font-size: 10px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
}

.blog-window-footer-btn:hover {
    background: #d4d0c8;
}

.blog-window-footer-btn:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

/* ================================================
   TEXTO DO POST - FORMATAÇÃO COMPLETA
   ================================================ */
.blog-window-text {
    font-size: 13px;
    line-height: 1.7;
    color: #000;
    text-align: justify;
    word-wrap: break-word;
    /* Permite seleção */
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    cursor: text;
}

/* Parágrafos */
.blog-window-text p {
    margin-bottom: 12px;
}

.blog-window-text p:last-child {
    margin-bottom: 0;
}

/* Links */
.blog-window-text a {
    color: #0066cc;
    text-decoration: underline;
    cursor: pointer;
}

.blog-window-text a:hover {
    color: #ff8c00;
}

/* Bold e Italic */
.blog-window-text strong,
.blog-window-text b {
    font-weight: bold;
}

.blog-window-text em,
.blog-window-text i {
    font-style: italic;
}

/* Underline e Strike */
.blog-window-text u {
    text-decoration: underline;
}

.blog-window-text s,
.blog-window-text strike,
.blog-window-text del {
    text-decoration: line-through;
}

/* Imagens */
.blog-window-text img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    border-radius: 5px;
    display: block;
}

/* Blockquote */
.blog-window-text blockquote {
    border-left: 3px solid #ff8c00;
    padding: 10px 15px;
    margin: 15px 0;
    font-style: italic;
    background: rgba(255, 140, 0, 0.1);
}

/* Listas */
.blog-window-text ul,
.blog-window-text ol {
    margin: 10px 0 10px 25px;
    padding-left: 10px;
}

.blog-window-text li {
    margin-bottom: 5px;
}

/* Código */
.blog-window-text code {
    background: #1a1a1a;
    color: #0f0;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    border-radius: 3px;
    font-size: 0.9em;
}

.blog-window-text pre {
    background: #1a1a1a;
    color: #0f0;
    padding: 15px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    border-radius: 5px;
    margin: 15px 0;
    border: 1px solid #333;
}

.blog-window-text pre code {
    background: none;
    padding: 0;
}

/* Headers */
.blog-window-text h1,
.blog-window-text h2,
.blog-window-text h3,
.blog-window-text h4,
.blog-window-text h5,
.blog-window-text h6 {
    margin: 15px 0 10px 0;
    color: #ff8c00;
    font-weight: bold;
}

.blog-window-text h1 { font-size: 1.8em; }
.blog-window-text h2 { font-size: 1.5em; }
.blog-window-text h3 { font-size: 1.3em; }
.blog-window-text h4 { font-size: 1.1em; }

/* Linha horizontal */
.blog-window-text hr {
    border: none;
    border-top: 2px solid #444;
    margin: 15px 0;
}

/* Tabelas */
.blog-window-text table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
}

.blog-window-text table td,
.blog-window-text table th {
    border: 1px solid #444;
    padding: 8px;
}

.blog-window-text table th {
    background: #ff8c00;
    color: #000;
    font-weight: bold;
}

/* Divs e quebras de linha */
.blog-window-text div {
    margin-bottom: 5px;
}

.blog-window-text br {
    display: block;
    margin: 2px 0;
    content: "";
}

/* Centralização */
.blog-window-text div[style*="text-align: center"],
.blog-window-text div[style*="text-align:center"],
.blog-window-text p[style*="text-align: center"],
.blog-window-text p[style*="text-align:center"],
.blog-window-text center {
    text-align: center !important;
}

/* Subscript e Superscript */
.blog-window-text sub {
    vertical-align: sub;
    font-size: 0.8em;
}

.blog-window-text sup {
    vertical-align: super;
    font-size: 0.8em;
}

/* Highlight */
.blog-window-text mark {
    background: yellow;
    color: black;
    padding: 0 3px;
}

/* ================================================
   SCROLLBAR WINDOWS 98
   ================================================ */
.blog-window-content::-webkit-scrollbar {
    width: 16px;
}

.blog-window-content::-webkit-scrollbar-track {
    background: #c0c0c0;
    border: 1px solid #808080;
}

.blog-window-content::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.blog-window-content::-webkit-scrollbar-thumb:hover {
    background: #d4d0c8;
}

.blog-window-content::-webkit-scrollbar-button {
    background: #c0c0c0;
    border: 1px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    height: 16px;
}

/* ================================================
   MODAL NSFW
   ================================================ */
.nsfw-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.nsfw-modal-overlay.active {
    display: flex;
}

.nsfw-modal {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    width: 400px;
    max-width: 90%;
    box-shadow: 4px 4px 0px #000;
}

.nsfw-modal-titlebar {
    background: linear-gradient(to right, #cc0000, #ff3333);
    color: white;
    padding: 4px 8px;
    font-weight: bold;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nsfw-modal-content {
    padding: 20px;
}

.nsfw-modal-warning {
    background: #fff;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 15px;
    margin-bottom: 15px;
    font-size: 12px;
    line-height: 1.5;
    color: #000;
}

.nsfw-modal-warning strong {
    color: #cc0000;
}

.nsfw-modal-birthdate {
    margin-bottom: 15px;
}

.nsfw-modal-birthdate label {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: bold;
    color: #000;
}

.nsfw-modal-birthdate-inputs {
    display: flex;
    gap: 5px;
}

.nsfw-modal-birthdate-inputs select {
    padding: 4px;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    font-size: 11px;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    background: #fff;
}

.nsfw-modal-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.nsfw-modal-btn {
    padding: 6px 20px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    color: #000;
}

.nsfw-modal-btn:hover {
    background: #d4d0c8;
}

.nsfw-modal-btn:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

.nsfw-modal-btn.confirm {
    background: #ff8c00;
    color: #fff;
}

.nsfw-modal-btn.confirm:hover {
    background: #ff9922;
}

.nsfw-modal-error {
    color: #cc0000;
    font-size: 11px;
    margin-top: 10px;
    text-align: center;
}

/* ================================================
   ESTADOS: LOADING E ERROR
   ================================================ */
.blog-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.blog-loading img {
    width: 50px;
    margin-bottom: 10px;
}

.blog-loading p {
    color: #888;
    font-size: 12px;
}

.blog-error {
    text-align: center;
    padding: 20px;
    color: #ff0000;
    background: #fff;
    border: 2px solid #808080;
}

.blog-error a {
    color: #ff8c00;
    font-weight: bold;
}

/* ================================================
   RESPONSIVO
   ================================================ */
@media (max-width: 768px) {
    .blog-window-content {
        max-height: 300px;
        padding: 10px;
    }
    
    .blog-window-text {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .blog-window-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .blog-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .blog-controls-separator {
        display: none;
    }
    
    .blog-window-titlebar {
        font-size: 11px;
        padding: 3px 5px;
    }
    
    .blog-window-category {
        font-size: 8px;
    }
    
    .nsfw-modal {
        width: 95%;
    }
    
    .nsfw-modal-birthdate-inputs {
        flex-direction: column;
    }
}