body {
    background-color: #f5f5f5;
    color: #333;
    margin:0;
    padding:0;
}

nav {
    background-color: #fff;
    padding: 1rem;
    height:30px;
    position: fixed;
    top: 0;
    width: 100%;
    margin:0;
    z-index: 1000;
    outline: 1px solid #222;
}
    
nav ul {
    list-style: none;
    margin:0;
    padding:0;
    display: flex;
    justify-content: left;
    align-items: center;
}

nav ul * {
    margin-right: 1rem;
}

main {
    margin-top: 100px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    min-height:40vh;
}

main section {
    width: 60%;
    min-height: 40vh;
}

main section *:not(a, i, b, strong, em, small) {
    margin-left:1rem;
}

aside {
    min-height: 40vh;
    height: 100%;
    border-left: 1px solid #222;
    padding: 1rem;
    width: 40%;
    overflow-y: auto;

}

footer {
    margin-top: 40px;
    border-top: 1px solid #222;
}

.post {
    margin-bottom: 1rem;
    display: inline-flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    border: 1px solid #222;
    text-decoration: none;
    color: #333;
}

.post.active {
    background:#fff3449d;
}

.post:visited {
    color: #333;
    text-decoration: none;
}

.post:hover {
    color: #222;
    background:#33ff0055;
    text-decoration: none;
}

.post h3, .title-date, .desc {
    margin:4px;
}

.title-date {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #2226;
}

.title-date p {
    margin-right:6px;
}

.desc {
    margin-left:8px;
}
    
.no-appear {
    color: black;
    text-decoration: none;
    transition: color 0.3s ease;
}

.no-appear:visited {
    color: black;
    text-decoration: none;
    transition: color 0.3s ease;
}

.no-appear:hover {
    color: rgb(7, 42, 138);
    text-decoration: none;
    transition: color 0.3s ease;
}

.header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #2226;
}

.header p {
    color:#777;
}

.trivia {
    margin-top: 1rem;
    border: 1px solid #222;
    padding: 1rem;
    background:green;
    color:#fff;
    border-radius: 5px;
    margin:1rem;
}

.trivia h3 {
    margin-bottom: 0.5rem;
}

/* Hide the checkbox */
.trivia-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.trivia-hover {
    cursor: pointer;
    position: relative;
    display: inline-block;
    color: #ffeb3b;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
    margin: 0.5rem 0;
    padding: 0.25rem 0;
}

.trivia-hover:hover {
    color: #fff;
}

/* Show the answer when checkbox is checked */
.trivia-checkbox:not(:checked) ~ .trivia-answer {
    display: none;
}

.trivia-checkbox:checked ~ .trivia-hover::after {
    content: 'Hide answer';
}

.trivia-checkbox:not(:checked) ~ .trivia-hover::after {
    content: 'Click to reveal the answer';
}

.trivia-answer {
    margin-top: 0.5rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    animation: fadeIn 0.3s ease;
    border-left: 3px solid #ffeb3b;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(-5px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.trivia-link {
    color: #86adffff;
    text-decoration: underline;
    transition: color 0.3s ease;
}
