/* Fuente Google VT323 */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

/* Reset global */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #1a1a1a;
    color: #ffffff;
    font-family: "VT323", monospace;
    font-size: 22px;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Lienzo de estrellas de fondo */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    pointer-events: none;
    background: #1a1a1a;
}

/* Filtro de ruido CRT estático */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0gAAAAFElEQVQYV2NkgID/j4iK+MDABKABAC9QBP6/dcl5AAAAAElFTkSuQmCC");
    background-repeat: repeat;
    background-size: 2px 2px;
    opacity: 0.10;
    z-index: 9999;
}

input, textarea {
    cursor: text;
}

/* Encabezado */
header {
    background-color: #1a1a1a;
    border-bottom: 3px solid #ffffff;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.banner-text {
    font-size: 1.5em;
    line-height: 1.5; 
    white-space: pre; 
    text-align: center; 
    margin: 0; 
    padding: 30px 0; 
    width: 100%; 
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.7), 0 0 5px rgba(255, 255, 255, 0.2);
}

/* Resplandor de títulos */
h1, h2, h3, h4, .banner-text {
    color: #f0f0f0;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.7), 0 0 10px rgba(192, 192, 192, 0.4);
}

/* Layout Principal */
.main-container {
    display: flex;
    justify-content: space-between;
    padding: 20px; 
    max-width: 1000px;
    margin: 0 auto;
}

.sidebar-left, .sidebar-right {
    width: 20%;
    display: flex;
    flex-direction: column;
}

.content-center {
    width: 55%;
}

/* Modificador para layouts de dos columnas (ej. Projects) */
.two-column .sidebar-left {
    display: none; 
}

.two-column .content-center {
    width: 73%;
    margin-right: 2%;
}

.two-column .sidebar-right {
    width: 25%;
}

/* Cajas de contenido */
.box {
    background-color: transparent;
    border: 3px double #c0c0c0;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 0 5px rgba(192, 192, 192, 0.4);
    text-shadow: 0 0 1px #f0f0f0;
}

.box h3, .box h4 {
    margin-top: 0;
}

/* Listas en cajas */
.box ul {
    list-style-type: none;
    padding-left: 0;
}

.box ul li::before {
    content: "> ";
    color: #ffffff;
    margin-right: 5px;
}

.sidebar-left .box ul li {
    margin-bottom: 20px;
    padding-bottom: 5px;
    border-bottom: 3px double #c0c0c0;
}

.sidebar-left .box ul li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Imágenes */
.box img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 15px;
    border: 3px double #ffffff;
}

.sidebar-left .box img {
    max-width: 150px;
    margin: 0 auto 15px auto;
}

.sidebar-image-retro {
    width: 100%; 
    height: auto;
    display: block;
    margin: 0 0 10px 0;
    filter: grayscale(100%) contrast(200%) brightness(100%);
    image-rendering: pixelated; 
}

/* Enlaces */
a {
    color: #ffffff;
    text-decoration: underline;
}

a:hover {
    color: #aaaaaa;
    text-decoration: none;
}

a:focus, .box:focus, .content-center:focus {
    outline-offset: -3px;
    outline: 3px solid #ffffff;
}

/* Sección About */
.about-section h2 {
    font-size: 2em;
    border-bottom: 3px solid #ffffff;
    padding-bottom: 10px;
}

.about-image-right {
    float: right;
    margin: 0 0 20px 20px;
    width: 200px;
    height: auto;
    border: 2px solid #ffffff;
}

.about-section::after {
    content: "";
    display: table;
    clear: both;
}

.about-text-content, .about-text-content p {
    text-align: justify;
    text-justify: inter-word;
}

/* Sección Updates */
.updates-section {
    padding: 0;
    margin: 20px 0;
}

.updates-section h2 {
    font-size: 2em;
    border-bottom: 3px solid #ffffff;
    padding-bottom: 10px;
    margin-top: 0;
}

.updates-section h3 {
    font-size: 1.2em;
    margin-bottom: 5px;
}

.updates-section p {
    font-size: 1em;
    margin-top: 0;
}

/* Tablas */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-bottom: 1px solid #c0c0c0;
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #444444;
}

table thead tr {
    background-color: #222222;
    color: #ffffff;
}

table tbody tr:hover {
    background-color: #1a1a1a;
}

table th:nth-child(3), table td:nth-child(3) {
    font-style: italic;
    color: #bbbbbb;
}

/* Puntuación estilo terminal */
.rating {
    font-family: 'Courier New', monospace; 
    font-size: 1rem;
    letter-spacing: 1px;
    white-space: nowrap;
    text-shadow: 0 0 5px rgba(240, 240, 240, 0.4);
}

th:last-child, td:last-child {
    text-align: center;
    width: 100px;
}

/* Barra de navegación inferior */
.main-nav-button {
    text-align: center;
    margin: 15px auto;
    max-width: 1000px;
}

.main-nav-button a {
    color: #c0c0c0;
    text-shadow: 0 0 5px #f0f0f0, 0 0 10px #c0c0c0;
    border: 3px double #c0c0c0; 
    display: inline-block;
    padding: 5px 10px;
    text-decoration: none;
}

.main-nav-button a:hover {
    color: #1a1a1a;
    background-color: #c0c0c0; 
    text-shadow: none;
}

/* Componentes externos (RSS, Contador, Guestbook) */
.visitor-counter {
    text-align: center; 
    border: none;
    background-color: transparent; 
    padding: 5px;
    margin-top: 15px; 
}

.visitor-counter img {
    filter: drop-shadow(0 0 4px #ffffff);
    vertical-align: middle;
}

.rss-link {
    text-align: center;
    margin-top: 10px;
}

.rss-link a {
    text-decoration: none;
    color: #c0c0c0;
    text-shadow: 0 0 2px #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
}

.box .rss-icon { 
    width: 50px !important; 
    height: 50px !important; 
    margin-right: 8px;
    border: none !important; 
    filter: drop-shadow(0 0 3px #f0f0f0); 
}

.box .github-icon { 
    width: 120px !important; 
    height: 120px !important; 
    margin-right: 8px;
    border: none !important; 
    filter: drop-shadow(0 0 3px #f0f0f0); 
}

.guestbook-frame {
    width: 100%;
    height: 1000px; 
    border: 1px solid #f0f0f0;
    background-color: #000000;
    margin-top: 20px;
}

.sidebar-right .box:last-child {
    margin-bottom: 0;
}

.post-content-note {
    max-width: 1000px; 
    margin: 20px auto 0 auto;
    padding-left: 20px; 
    font-size: 0.9em;
    color: #aaaaaa;
    font-style: italic;
    text-shadow: 0 0 1px #888888; 
}

/* Paginación */
.pagination {
    margin-top: 25px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.pagination button {
    background-color: transparent;
    color: #f0f0f0;
    border: 1px solid #f0f0f0;
    padding: 2px 8px;
    font-family: 'VT323', monospace;
    font-size: 1.1em;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
    appearance: none; 
    -webkit-appearance: none;
}

.pagination button:hover {
    background-color: #f0f0f0;
    color: #000000;
    box-shadow: 0 0 8px #f0f0f0;
}

.pagination button:disabled {
    border-color: #444444;
    color: #444444;
    cursor: not-allowed;
    box-shadow: none;
}

.pagination span {
    font-size: 1.1em;
    color: #f0f0f0;
    letter-spacing: 1px;
}

/* Barra de desplazamiento (WebKit / Chromium) */
::-webkit-scrollbar {
    width: 18px;
}

::-webkit-scrollbar-button {
    width: 0;
    height: 0;
}

::-webkit-scrollbar-track {
    background: #000000;
    border-left: 3px solid #ffffff; 
    border-right: 1px solid #000000; 
}

::-webkit-scrollbar-thumb {
    background-color: #aaaaaa;
    border-top: 2px solid #ffffff; 
    border-left: 2px solid #ffffff; 
    border-bottom: 2px solid #555555;
    border-right: 2px solid #555555;
}

/* Barra de desplazamiento (Firefox) */
* {
    scrollbar-color: #aaaaaa #000000;
    scrollbar-width: auto;
}