:root {
    --bg          : #162431;
    --text        : #c9d1d9;
    --line        : #fdfff4;
    --link        : #3f7d79;
    --code        : #1a2b3a;
    --codeBG      : #274760;
    --precode     : #dde6ef;
    --precodeBG   : #274760;
    --font        : Georgia, serif;
    --border-style: 2px solid var(--line);
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font);
    background-color: var(--bg);
    background-image: url("/system/resources/images/blurry.png");
    color: var(--text);
}

/* Code Styling */
code,
.post-body a,
.content-left a,
.content-right a,
.marquee-content a {
    font-weight: bold;
    color: var(--text);
    text-decoration: none;
    position: relative;
    z-index: 1;
}

code {
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--precodeBG);
    color: var(--precode);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.95em;
}

pre code {
    display: block;
    background-color: var(--precodeBG);
    color: var(--precode);
    padding: 1em;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.9em;
}

pre code::-webkit-scrollbar {
    height: 4px;
}

pre code::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
}

/* Container */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem;
}

/* Portrait & Date */
.portrait,
.date {
    width: 100px;
    height: 135px;
    object-fit: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.date .day {
    font-size: 2em;
    line-height: 1;
}

.date .month {
    font-size: 1em;
    text-transform: uppercase;
}

/* Blogroll */
.blogroll-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5em 0;
    overflow: hidden;
    white-space: nowrap;
}

.blogroll-label {
    flex-shrink: 0;
    color: var(--text);
    font-weight: bold;
    margin: 0;
}

.marquee-container {
    flex-grow: 1;
    overflow: hidden;
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-left 10s linear infinite;
    gap: 1rem;
}

.marquee-content > * {
    display: inline-block;
    margin-right: 1rem;
}

.blogroll-wrapper:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0%   { transform: translateX(0%); }
    100% { transform: translateX(-100%); } 
}

.marquee-content a::before,
.content-left a::before,
.content-right a::before,
.post-body a::before,
.corner a::before {
    content: "";
    background-color: var(--link);
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    z-index: -1;
    transition: all 0.3s ease-in-out;
}

.marquee-content a:hover::before,
.content-left a:hover::before,
.content-right a:hover::before,
.post-body a:hover::before,
.corner a:hover::before {
    height: 100%;
}

/* Divider */
.main-divider {
    height: 2px;
    background-color: var(--line);
    width: 100%;
}

/* Card Layout */
.card {
    display: flex;
    align-items: center;
    border-top: var(--border-style);
}

.content-left,
.content-right {
    flex: 2;
    height: 135px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.content-left {
    border-right: var(--border-style);
    padding-right: 1rem;
    align-items: flex-start;
    text-align: left;
}

.content-right {
    border-left: var(--border-style);
    padding-left: 1rem;
    align-items: flex-end;
    text-align: right;
}

/* Post Styling */
.post {
    margin: 0 auto;
    border-top: var(--border-style);
}

.post-title {
    margin-top: 1rem;
    text-align: justify;
}

.post-body {
    font-size: 1rem;
    margin-top: 0.5rem;
    text-align: justify;
}

.post-body p {
    margin-bottom: 1.5em;
}

.post-body blockquote {
    border-left: 5px solid var(--line);
    margin: 0;
    padding: 0.5em 10px;
}

.post-body blockquote:before {
    color: var(--text);
    font-size: 4em;
    line-height: 0.1em;
    margin-right: 0.25em;
    vertical-align: -0.4em;
}

.post-body img {
    width: 24.99999%;
    height: auto;
    float: left;
    margin-bottom: 1.5rem;
}

.post-body br {
    display: none;
}

/* Gallery */
.skin-gallery img {
    width: 100%;
    height: auto;
    box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
}

.skin-gallery .desc {
    padding: 15px;
    text-align: center;
}

.responsive {
    float: left;
}

/* Footer */
.copyright {
    text-align: center;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    border-top: var(--border-style);
}

.copyright p {
    margin: 0;
    word-break: break-word;
    display: inline;
    text-align: justify;
    width: 100%;
}

/* Badges */
.badges-showcase {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    max-height: 100px;
    opacity: 1;
    overflow: hidden;
}

.badges-showcase a,
.badges-showcase a::before {
    all: unset;
    display: contents;
}

.badges-showcase img {
    width: 248px;
    height: 30px;
}

/* Misc */
.mirrored {
    transform: scaleY(-1);
}

[disabled],
.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 600px) {
    .portrait,
    .date,
    .rate,
    .content-left:first-child,
    .content-left:last-child,
    .content-right:first-child,
    .content-right:last-child,
    .wcbBadgeWrapper {
        width: 80px;
        height: 108px;
    }

    .nav li a {
        font-size: 0.9rem;
    }

    .content-left {
        padding-right: 0.5rem;
    }

    .content-right {
        padding-left: 0.5rem;
    }

    .rate .first,
    .rate .second {
        font-size: 1.5em;
        line-height: 1;
    }

    .copyright {
        text-align: center;
        padding: 0.5rem 0;
        font-size: 0.9rem;
    }

    .copyright p {
        margin: 0;
        display: inline;
        word-break: break-word;
    }
}

.corner {
	width: 0; 
	height: 0; 
	border-left: 0px solid transparent;
	border-right: 100px solid transparent;
	border-top: 100px solid var(--precodeBG);
    position: fixed;
    top: 0;
    left: 0; 
    z-index: 1;
}

.corner a {
    position: fixed;
    top: 60px;
    z-index: 2;
    color: var(--precode);
    font-size: 24px;
    transform: rotate(-45deg);
    transform-origin: top left;
    text-decoration: none;
}