/* Theme Custom Styles - Bootstrap 5 Customization */

/* Base styles */
body {
    font-family: "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #434343;
    background-color: #f8f9fa;
    line-height: 1.8;
    letter-spacing: 0.5px;
}

/* Custom Navbar */
.navbar-custom {
    background-color: rgba(255, 255, 255, 0.95) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
    padding: 0.8rem 0;
}

.navbar-custom .nav-link {
    color: #333 !important;
    font-size: 14px;
    margin: 0 10px;
    transition: color 0.3s ease;
    text-decoration: none;
}

.navbar-custom .nav-link:hover {
    color: #06f !important;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Logo样式 */
.navbar-brand {
    padding: 0;
    margin-right: 1rem;
}

.navbar-brand img {
    max-height: 40px;
    width: auto;
    display: block;
}

/* 确保移动端按钮在右侧 */
.navbar-toggler.ms-auto {
    margin-left: auto !important;
}

/* Main Wrapper */
.main-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

@media (max-width: 768px) {
    .main-wrapper {
        padding: 10px;
    }
}

/* Content Cards */
.content-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 30px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .content-card {
        padding: 20px;
        border-radius: 0;
        margin-left: -10px;
        margin-right: -10px;
    }
}

/* Profile Section */
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1px solid #ddd;
    -o-object-fit: cover;
    object-fit: cover;
}

/* Post List Styles */
.post-item {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.post-title a:hover {
    color: #06f;
}

.post-date {
    font-size: 13px;
    color: #797979;
}

.post-excerpt {
    font-size: 13px;
    color: #B9B9B9;
    line-height: 1.6;
}

.post-tags .badge {
    font-size: 11px;
    font-weight: normal;
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    text-decoration: none;
    margin-right: 5px;
    margin-bottom: 5px;
}

.post-tags .badge:hover {
    background-color: #e9ecef !important;
    color: #495057 !important;
}

/* Single Post Styles */
.post-content {
    font-size: 16px;
    line-height: 1.8;
}

.post-content h2 {
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 15px;
    padding: 10px 20px;
    background-color: #212122;
    color: #fff;
    border-bottom-right-radius: 50px;
    display: inline-block;
}

.post-content h3 {
    font-size: 18px;
    margin-top: 25px;
    margin-bottom: 10px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content blockquote {
    border-left: 3px solid #161616;
    padding-left: 15px;
    margin: 20px 0;
    color: #6b6b6b;
}

.post-content ul,
.post-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content a {
    color: #121212;
    border-bottom: 1px solid grey;
    text-decoration: none;
}

.post-content a:hover {
    color: #06f;
    border-bottom-color: #06f;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.post-content code {
    color: #e82f18;
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Archive Page */
.archive-year {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
}

.archive-item {
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
}

.archive-time {
    min-width: 80px;
    color: #979797;
    font-size: 14px;
}

.archive-title a {
    color: #575757;
    text-decoration: none;
    font-weight: 300;
}

.archive-title a:hover {
    color: #06f;
}

/* Tags Page */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.tag-item {
    display: inline-block;
    padding: 8px 16px;
    margin: 5px;
    font-size: 14px;
    color: #6d6d6d;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-item:hover {
    transform: scale(1.1);
    color: #333;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
}

.pagination-wrapper a {
    color: #B9B9B9;
    text-decoration: none;
    font-size: 12px;
}

.pagination-wrapper a:hover {
    color: #06f;
}

.pagination-wrapper .current {
    color: #000;
    font-weight: 500;
    font-size: 12px;
}

/* About Me Section */
.about-me-section {
    margin: 30px 0;
    padding: 20px;
    border: 1px dashed #ddd;
    background-color: #fafafa;
    border-radius: 4px;
}

.about-me-section h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.about-me-section p {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 0;
}

/* CC License */
.cc-license {
    margin: 30px 0;
    padding: 15px;
    text-align: center;
    font-size: 13px;
    color: #777;
}

.cc-license a {
    color: #06f;
    text-decoration: none;
    border-bottom: 1px solid #06f;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.social-links a {
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.2);
}

/* Over Marker */
.over-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
}

.over-marker .line {
    flex: 1;
    height: 1px;
    background-color: #ddd;
    max-width: 200px;
}

.over-marker span {
    margin: 0 15px;
    color: #919191;
    font-weight: 200;
}

/* Comments Section */
.comments-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

/* Footer */
.site-footer {
    margin-top: 40px;
    padding: 20px 0;
}

/* WordPress Alignments */
.aligncenter {
    display: block;
    margin: 0 auto;
}

.alignleft {
    float: left;
    margin-right: 20px;
    margin-bottom: 10px;
}

.alignright {
    float: right;
    margin-left: 20px;
    margin-bottom: 10px;
}

/* Screen Reader Text */
.screen-reader-text {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

/* Selection Color */
::-moz-selection {
    background-color: #06f;
    color: #fff;
}
::selection {
    background-color: #06f;
    color: #fff;
}

::-moz-selection {
    background-color: #06f;
    color: #fff;
}

/* QR Code Modal */
.qr-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.qr-modal.show {
    display: block;
}

.qr-modal-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(128, 128, 128, 0.3);
}

.qr-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    z-index: 1001;
}

.qr-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #999;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
    z-index: 1002;
}

.qr-close:hover,
.qr-close:focus {
    color: #333;
}

.qr-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.qr-image {
    max-width: 250px;
    max-height: 250px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* QR Trigger Link */
.qr-trigger {
    cursor: pointer;
}

/* Footnotes Styles */
.footnote-ref {
    font-size: 0.75em;
    vertical-align: super;
    line-height: 0;
    color: #06f;
    margin-left: 2px;
}

.footnote-ref a {
    color: #06f;
    text-decoration: none;
    border-bottom: none;
}

.footnote-ref a:hover {
    color: #004499;
}

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

.post-content ol {
    padding-left: 20px;
}

.post-content ol li {
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.reversefootnote {
    color: #06f;
    text-decoration: none;
    font-size: 0.85em;
    margin-left: 5px;
}

.reversefootnote:hover {
    color: #004499;
}

/* Toast Backdrop */
.toast-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(128, 128, 128, 0.3);
    z-index: 1040;
    display: none;
}

.toast-backdrop.show {
    display: block;
}

/* Toast Custom Styles */
.toast-container {
    z-index: 1050;
}

#qrToast {
    min-width: 300px;
}

#qrToast .toast-body {
    padding: 20px;
}

#qrToast .toast-body img {
    max-width: 250px;
    max-height: 250px;
    width: 100%;
    height: auto;
}