html, body {
    height: auto;
    overflow: auto;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    background-color: black;
    color: rgb(212, 0, 212);
    font-family: "Comic Sans MS", sans-serif;
    font-size: 18px;
    position: relative;
}

/* Construction background (applied to index and frontpage only) */
.with-construction-bg::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('img/construction.gif') repeat;
    opacity: 0.2;
    z-index: -1;
}

/* Post page background */
.post-bg {
    background-color: #f0f0f0;
    color: #333;
}

.content {
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 20px;
}

/* Post specific content - no rectangle border */
.post-content {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    text-align: left;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}

/* Frontpage content - with rectangle */
.frontpage-content {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    text-align: center;
    background-color: white;
    border: 2px solid rgb(212, 0, 212);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
}

h1 {
    font-size: 60px;
    background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.post-title {
    font-size: 36px;
    color: #000080;
    background: none;
    -webkit-text-fill-color: #000080;
    text-shadow: none;
    margin-bottom: 10px;
}

p {
    font-size: 40px;
}

.post-content p {
    font-size: 16px;
    margin-bottom: 15px;
}

.post-header {
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.post-date {
    color: #666;
    font-style: italic;
    font-size: 14px;
}

.post-categories {
    margin: 10px 0;
}

.category-tag, .post-tag {
    display: inline-block;
    padding: 3px 8px;
    margin: 2px;
    border-radius: 3px;
    font-size: 12px;
    color: white;
}

.category-tag {
    background-color: #e91e63;
}

.post-tag {
    background-color: #2196f3;
}

.blink {
    animation: blink-animation 1s steps(5, start) infinite;
}
@keyframes blink-animation {
    to {
        visibility: hidden;
    }
}

.footer {
    margin-top: 40px;
    text-align: center;
}

.footer img {
    width: 200px;
    height: auto;
}

/* Header navigation */
.header {
    background-color: transparent;
    padding: 10px 20px;
    text-align: center;
}

.header .nav {
    margin-top: 10px;
    font-size: 20px;
}

.header .nav a {
    color: #1900ff;
    text-decoration: none;
    margin: 0 10px;
}

.header .nav a:hover {
    text-decoration: underline;
}

/* Post content styling */
.post-content h1, .post-content h2, .post-content h3 {
    color: #000080;
    margin-top: 30px;
    margin-bottom: 15px;
}

.post-content h1 {
    font-size: 28px;
    -webkit-text-fill-color: #000080;
    background: none;
    text-shadow: none;
}

.post-content h2 {
    font-size: 24px;
}

.post-content h3 {
    font-size: 20px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border: 1px solid #ddd;
}

.post-content pre {
    background-color: #f8f8f8;
    padding: 10px;
    border: 1px solid #ddd;
    overflow-x: auto;
    white-space: pre !important;
}

.post-content code {
    font-family: "Courier New", monospace;
    background-color: #f8f8f8;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 14px;
    white-space: pre !important;
}

.post-content blockquote {
    border-left: 4px solid #000080;
    padding-left: 15px;
    margin-left: 0;
    color: #555;
}

/* Visitor counter */
.visitor-counter {
    margin: 20px 0;
    padding: 10px;
    background-color: #000080;
    color: white;
    display: inline-block;
    border: 2px solid yellow;
}

.visitor-counter span {
    font-weight: bold;
    color: yellow;
}

/* Table styles */
.post-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
}

.post-content th, .post-content td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.post-content th {
    background-color: #f2f2f2;
}

/* LaTeX rendering improvements */
.katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
}

/* About page styling */
.about-content {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    text-align: left;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.about-content h1, .about-content h2 {
    color: #000080;
}

.about-content p {
    font-size: 16px;
    line-height: 1.6;
}

.about-section {
    margin-bottom: 30px;
}

.about-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: block;
    border: 3px solid #000080;
}
