:root {
    --bg-color: #f0f0f0;
    --text-color: #333;
    --card-bg-color: #fff;
    --header-bg-color: #EC1C24;
    --footer-bg-color: #fff;
    --timeline-color: #ccc;
    --max-content-width: 800px;
    --primary-color: #EC1C24;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    margin: 0;
    padding: 0;
}

body.night-mode {
    --bg-color: #1a1a1a;
    --text-color: #f0f0f0;
    --card-bg-color: #2a2a2a;
    --header-bg-color: #660D13;
    --footer-bg-color: #2a2a2a;
    --timeline-color: #555;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header {
    background-color: var(--header-bg-color);
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #fff;
}

.night-mode-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #fff;
}

.banner {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar {
    position: absolute;
    bottom: 20px;
    left: calc((100% - var(--max-content-width)) / 2);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid white;
}

.timeline {
    position: relative;
    padding: 20px 0;
    margin: 0 auto;
    max-width: var(--max-content-width);
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background: var(--timeline-color);
}

.timeline-point {
    position: absolute;
    left: -45px;
    top: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: bold;
    border: 2px solid white;
    z-index: 1;
}

.card {
    background-color: var(--card-bg-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    margin-left: 45px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.card-datetime {
    font-size: 0.9em;
    color: #666;
}

.card-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--timeline-color);
}

.card-footer-left,
.card-footer-center,
.card-footer-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.card-footer-center {
    justify-content: center;
}

.card-footer-right {
    justify-content: flex-end;
    width: 100%;
    margin-bottom: 10px;
}

.card-reactions {
    display: flex;
    gap: 10px;
}

.reaction {
    display: inline-flex;
    align-items: center;
    padding: 3px 6px;
    border-radius: 100px;
    background-color: #f3f3f3;
    border: 1px solid #d1d5da;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle;
}

.reaction-emoji {
    margin-right: 3px;
}

.card-labels {
    display: flex;
    gap: 8px;
}

.card-label {
    font-size: 0.8em;
    padding: 4px 8px;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.github-link {
    font-size: 1.2em;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

footer {
    background-color: var(--footer-bg-color);
    padding: 20px 0;
    text-align: center;
}

.site-info {
    max-width: var(--max-content-width);
    margin: 0 auto 10px;
}

.site-info a {
    color: var(--text-color);
    margin: 0 10px;
}

.design-by {
    font-size: 0.8em;
    color: #999;
}

.floating-time-label {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.month-divider {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    margin: 20px 0;
    color: var(--text-color);
}

/* Post detail styles */
.post-detail {
    max-width: var(--max-content-width);
    margin: 40px auto;
    background-color: var(--card-bg-color);
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.post-detail .banner {
    margin: -40px -40px 40px -40px;
    max-width: none;
}

.post-detail .avatar {
    left: calc((100% - var(--max-content-width)) / 2 + 40px);
}

.post-detail img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.comment-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.comment-button:hover {
    background-color: darken(var(--primary-color), 60%);
    text-decoration: underline;
    color: var(--primary-color);
}


.post-detail .post-content {
    margin-top: 40px;
    margin-bottom: 40px;
}

.post-detail .comment-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--timeline-color);
}


@media (max-width: 768px) {
    .avatar {
        left: 30px;
    }

    .timeline {
        padding-left: 20px;
        padding-right: 20px;
    }

    .card {
        margin-left: 30px;
    }

    .post-detail .avatar {
        left: 30px;
    }

    .card-footer {
        flex-wrap: wrap;
    }

    .card-footer-left,
    .card-footer-center {
        width: 100%;
        justify-content: flex-start;
        margin-bottom: 10px;
    }

    .card-reactions {
        display: none;
    }

    .card-labels {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .card-label {
        flex-shrink: 0;
    }

    .post-detail {
        padding: 20px;
    }

    .post-detail {
        margin-left: 20px;
        margin-right: 20px;
    }

}