/* Estilos base y de fondo */
html {
    height: 100%;
}
body {
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    font-family: "Fira Code", monospace;
    background-image: url(background.png);
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    color: #dcdcdc;

    display: flex;
    justify-content: center;
    align-items: center;
}

/* El contenedor principal de la app ahora es una GRID */
#app-container {
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    max-height: 800px;
    background: #1E1E1E;
    border: 1px solid #333;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    
    display: grid;
    grid-template-columns: 1fr 300px; 
    overflow: hidden;
    transition: all 0.3s ease; /* Transición suave para redimensionar */
}

/* --- Contenido Principal --- */
#main-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px dashed #444;
}

/* --- Barra Lateral --- */
#sidebar-content {
    padding: 1.5rem;
    overflow-y: auto;
}
#sidebar-content h2 {
color: #8FBC8F;
    font-size: 1rem;
    font-weight: bold;
    margin: 0 0 0.6rem 0;
}

/* --- NUEVOS ESTILOS PARA LAS LISTAS DE "CURRENTLY" --- */
.currently-category {
    margin-bottom: 1.2rem;
}
.currently-category strong {
    color: #8FBC8F;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.6rem;
}
.currently-category ul {
    margin: 0;
    font-size: 0.85rem;
    list-style: '✧ ';
    padding-left: 1rem;
}
.currently-category li {
    padding-left: 0.5rem;
    margin-bottom: 0.4rem;
}
.currently-category a {
    color: #dcdcdc;
    text-decoration: none;
    border-bottom: 1px dotted #555;
    transition: all 0.2s;
}

.currently-category a:hover {
    color: #78A080;
    border-bottom-color: #78A080;
}


/* Cabecera fija dentro del contenido principal */
.app-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px dashed #444;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.app-header h1 { margin: 0; font-size: 1.2rem; color: #78A080; }
.app-header nav a { color: #888; text-decoration: none; margin-left: 1rem; transition: color 0.2s; }
.app-header nav a:hover { color: #dcdcdc; }
.app-header nav a.active { color: #78A080; font-weight: bold; }

/* El área con scroll */
.scrollable-area {
    overflow-y: auto;
    flex-grow: 1;
    padding: 1.5rem 2rem;
}

/* Estilos de las secciones */
.about-section p, .about-section ul { font-size: 0.9rem; line-height: 1.6; }
.about-section ul { padding-left: 20px; list-style-type: '✦ '; }
.about-section li { padding-left: 10px; margin-bottom: 0.5rem; }
.paragraph-title { font-weight: 700; color: #78A080; }

.microblog-post { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid #2b2b2b; }
.microblog-post:last-child { border-bottom: none; }
.microblog-post time { font-size: 0.8rem; color: #888; }
.microblog-post p { margin: 0.5rem 0 0 0; font-size: 0.9rem; line-height: 1.6; }
.microblog-post a {
    color: #dcdcdc;
    text-decoration: none;
    border-bottom: 1px dotted #555;
    transition: all 0.2s;
}

/* Paginación */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #2b2b2b;
}
.pagination-btn {
    background: transparent;
    color: #888;
    border: 1px solid #444;
    font-family: 'Fira Code', monospace;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.pagination-btn:hover {
    background-color: #78A080;
    border-color: #78A080;
    color: #1E1E1E;
}
.page-indicator {
    font-size: 0.9rem;
    color: #888;
}

.social-links-title {
    color: #8FBC8F;
    font-size: 1rem;
    font-weight: bold;
    margin: 0 0 0.6rem 0;
}

.social-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.social-tag {
    display: inline-block;
    background-color: #333;
    color: #aaa;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
    border: 1px solid #444;
    transition: all 0.2s ease;
}

.social-tag:hover {
    background-color: #78A080;
    border-color: #78A080;
    color: #1E1E1E;
    transform: translateY(-2px);
}

.currently-main-container {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
}

/* --- Estilos del Scrollbar Personalizado --- */
.scrollable-area::-webkit-scrollbar,
#sidebar-content::-webkit-scrollbar { width: 10px; }
.scrollable-area::-webkit-scrollbar-track,
#sidebar-content::-webkit-scrollbar-track { background: #2b2b2b; }
.scrollable-area::-webkit-scrollbar-thumb,
#sidebar-content::-webkit-scrollbar-thumb { background-color: #78A080; border-radius: 20px; border: 2px solid #1E1E1E; }
.scrollable-area::-webkit-scrollbar-thumb:hover,
#sidebar-content::-webkit-scrollbar-thumb:hover { background-color: #8FBC8F; }

/* Scanlines */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15) 1px, transparent 2px, transparent 3px);
    z-index: 100;
}

.post-footer {
    font-size: 12px !important;
    margin-top: 24px !important;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/*
 =========================================
  DISEÑO RESPONSIVE PARA MÓVIL Y TABLET
 =========================================
*/
@media (max-width: 768px) {
    #app-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
        width: 100%;
        height: 100%;
        max-height: none;
        border: none;
        box-shadow: none;
    }

    #main-content {
        border-right: none;
    }

    #sidebar-content {
        grid-row: 2;
        border-top: 1px dashed #444;
        max-height: 35vh;
    }

    .app-header {
        padding: 1rem 1.5rem;
    }
    .app-header h1 {
        font-size: 1.1rem;
    }

    .scrollable-area {
        padding: 1rem 1.5rem;
    }

    .pagination-controls {
        flex-direction: column;
        gap: 1rem;
    }
}
