/* ========== 统一字体系统 ========== */
:root {
    /* 主字体 - 中英文混排 */
    --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", 
                         "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", "微软雅黑", sans-serif;
    
    /* 等宽字体 - 代码 */
    --font-family-mono: "SF Mono", "Monaco", "Cascadia Code", "Roboto Mono", "Consolas", 
                         "Courier New", monospace;
    
    /* 标题字体 */
    --font-family-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}

body {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 25%, #2c5364 50%, #1a1a2e 75%, #16213e 100%);
    background-attachment: fixed;
    color: #e0e0e0;
    font-size: 16px;
    font-family: var(--font-family-base);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

pre {
    padding: 15px;
    margin-bottom: 10px !important;
    margin-left: 10px;
    margin-right: 10px;
    overflow: auto;
    clear: right;
    white-space: pre-wrap;
    white-space: -moz-pre-wrap;
    white-space: -o-pre-wrap;
    word-wrap: break-word;
    background: rgba(30, 30, 46, 0.8);
    border-left: 3px solid #00d4ff;
    border-radius: 8px;
    color: #e0e0e0;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.1);
    font-family: var(--font-family-mono);
    font-size: 14px;
    line-height: 1.5;
}

code {
    font-family: var(--font-family-mono);
    font-size: 0.9em;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

/* General & 'Reset' Stuff */
div.site {
    padding: .4em .4em .4em .4em;
    width: 780px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    margin-left: auto;
    margin-right: auto;
    margin-top: 15px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.15), 0 0 60px rgba(138, 43, 226, 0.1);
}

.container {
    padding: 5px;
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    word-wrap: break-word;
    color: #2c3e50;
}

.container>h4 {
    margin-bottom: 0px;
    margin-top: 0px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
}


.container a {
    text-decoration: none;
    border-bottom: 1px #2efb00;
}

.container p {
    font-size: 1em;
    line-height: 1.8;
}

section {
    display: block;
    margin: 0 0 20px 0;
}

h1, h2, h3, h4, h5, h6 {
    margin: 20px 0 20px;
    margin-right: 5px;
}

.container > h1, h2 {
    margin: 10px 0 0;
    font-weight: bold;
}

li {
    line-height: 1.4 ;
}

/* Header, <header>
   header   - container
   h1       - project name
   h2       - project description
*/

header {
    border: none;
    padding: 0em 0em 0em 0em;
    margin: .2em .2em .2em .2em;
    height: 120px;
    background: linear-gradient(135deg, #00d4ff 0%, #667eea 50%, #8a2be2 100%);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

header h1 {
    color: #ffffff;
    text-align: center;
    margin-top: 45px;
    font-size: 2rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    font-weight: 700;
    letter-spacing: 3px;
    font-family: var(--font-family-heading);
}

header h2 {
    color: #ffffff;
    vertical-align: middle;
    text-align: center;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    font-family: var(--font-family-heading);
    font-weight: 400;
    letter-spacing: 1px;
}

div#navigation {
    clear: both;
    margin: .2em .2em .2em .2em;
    padding: 0px 0px 0px 0px;
    height: 25px;
    border-style: solid;
    border-width: 0px;
    border-color: red;
    display: block;
}

div#navigation ul {
    width: 780px;
    list-style: none;
    margin: 0;
    padding: 0;
}

div#navigation ul li {
    width: 384.5px;
    float: left;
    margin: 4px 4px 0px 0px;
    padding: 0px 0px 0px 0px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
    vertical-align: top;
    height: 25px;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

div#navigation ul li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Hide comment board navigation */
div#navigation ul li#comment {
    display: none !important;
}

/* Make Archive button full width when comment is hidden */
div#navigation ul li#archives {
    width: 100% !important;
}

div#navigation ul li a {
    margin: 2px 0 0 0;
    padding: 0;
    font-size: 14px;
    font-weight: bold;
    color: #FFFFFF;
    text-decoration: none;
    text-transform: uppercase;
    height: 20px;
    display: block;
}

#downloads .btn {
    display: inline-block;
    text-align: center;
    margin: 0;
}

/* Main Content
*/

#main_content {
    width: 100%;
    -webkit-font-smoothing: antialiased;
}
section img {
    max-width: 100%
}
img {
    max-width: 99%;
}

h1, h2, h3, h4, h5, h6 {
    /* font-weight: normal; */
    letter-spacing: -0.03em;
}

body h1 {
    font-size: 2.25em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-family: var(--font-family-heading);
}

body h2 {
    font-size: 1.875em;
    color: #667eea;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    padding-bottom: 8px;
    font-weight: 600;
    font-family: var(--font-family-heading);
}

body h3 {
    font-size: 1.5em;
    color: #764ba2;
    font-weight: 600;
    font-family: var(--font-family-heading);
}

body h4 {
    font-family: var(--font-family-heading);
}

body h5 {
    font-family: var(--font-family-heading);
}

body h6 {
    font-family: var(--font-family-heading);
}

body h4 {
    font-size: 20px;
}

body h5 {
    font-size: 18px;
}

body h6 {
    font-size: 14px;
}

dt {
    font-style: italic;
    font-weight: bold;
}

blockquote {
    color: #4a5568;
    padding: 15px 20px;
    border-left: 4px solid;
    border-image: linear-gradient(135deg, #00d4ff 0%, #667eea 100%) 1;
    margin-left: 25px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

table {
    width: 100%;
    margin: 0 0 20px 0;
}

th {
    text-align: left;
    border-bottom: 2px solid #667eea;
    padding: 5px 10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    font-weight: bold;
    color: #667eea;
}

td {
    font-size: 0.9em;
    font-family: var(--font-family-base);
}

td #homepage{
    font-size: 18px;
    padding: 5px 10px;
}

div#footer {
    margin: .2em .2em .2em .2em;
    padding: .4em .4em .4em .4em;
    border: 0px solid red;
    font-style: italic;
    font-size: 1rem;
    text-align: right;
    font-family: var(--font-family-base);
    color: #4a5568;
    font-weight: 500;
}

div#footer a {
    color: #667eea;
    font-weight: 600;
}

div#footer a:hover {
    color: #00d4ff;
}

/* Buttons
*/

.btn {
    display: inline-block;
    background: -webkit-linear-gradient(top, rgba(40, 40, 40, 0.3), rgba(35, 35, 35, 0.3) 50%, rgba(10, 10, 10, 0.3) 50%, rgba(0, 0, 0, 0.3));
    padding: 8px 18px;
    border-radius: 50px;
    border: 2px solid rgba(0, 0, 0, 0.7);
    border-bottom: 2px solid rgba(0, 0, 0, 0.7);
    border-top: 2px solid rgba(0, 0, 0, 1);
    color: rgba(255, 255, 255, 0.8);
    font-weight: bold;
    font-size: 13px;
    text-decoration: none;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.75);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn:hover {
    background: -webkit-linear-gradient(top, rgba(40, 40, 40, 0.6), rgba(35, 35, 35, 0.6) 50%, rgba(10, 10, 10, 0.8) 50%, rgba(0, 0, 0, 0.8));
}

.btn .icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin: 1px 8px 0 0;
    float: left;
}

.btn-github .icon {
    opacity: 0.6;
    background: url("../images/blacktocat.png") 0 0 no-repeat;
}

a:link {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

a:visited {
    color: #764ba2;
}

a:hover {
    color: #00d4ff;
    border-bottom-color: #00d4ff;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

/* Clearfix */

.cf:before, .cf:after {
    content:"";
    display:table;
}

.cf:after {
    clear:both;
}

.cf {
    zoom:1;
}

ul li a {
    font-size:16px;
}

ol li {
    font-size:15px;
}

ul li {
    font-size:15px;
}

ul.post-list-ul {
    font-size:16px;
}

pre span.inner-pre{
    font-size:16px;
}


li a:hover {
	color: #00d4ff;
	text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

#comments-header {
    position: relative;
    border-left: 5px solid #00d4ff;
    padding: 10px 15px;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    font-size: 13px;
    font-weight: bold;
    line-height: 1;
    text-transform: uppercase;
    margin: 10px 0px;
    white-space: pre-wrap;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Remove any wrapper backgrounds around comment section */
#comments-header::before,
#comments-header::after {
    display: none;
}

#blog-stripe {
    position: relative;
    border-left: 5px solid #00d4ff;
    padding: 10px 15px;
    color: #fff;
    background: linear-gradient(135deg, #00d4ff 0%, #667eea 50%, #8a2be2 100%);
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    text-transform: uppercase;
    margin: 10px;
    white-space: pre-wrap;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#comments-error-info {
    position: relative;
    padding: 10px 15px;
    color: #fff;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    font-size: 13px;
    font-weight: bold;
    line-height: 1;
    text-transform: uppercase;
    margin-right: 10px;
    white-space: pre-wrap;
    border-radius: 5px;
    border-left: 4px solid #ff4757;
    box-shadow: 0 4px 15px rgba(238, 90, 111, 0.3);
}

/* Blog Archive Date Styling */
table td u {
    color: #667eea;
    font-weight: bold;
    text-decoration: none;
    font-size: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Comment Board Enhancements */
form[name="comment"] {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%) !important;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

/* Remove form table background */
form[name="comment"] table {
    background: none !important;
    background-color: transparent !important;
}

/* Remove all backgrounds around form area */
form[name="comment"] ~ div,
#comments-header + form,
#comments-header ~ iframe {
    background: none !important;
    background-color: transparent !important;
}

form[name="comment"] table {
    width: 100%;
}

form[name="comment"] td {
    padding: 8px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 14px;
}

form[name="comment"] input[type="text"],
form[name="comment"] textarea {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

form[name="comment"] input[type="text"]:focus,
form[name="comment"] textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.05);
    background: #ffffff;
}

form[name="comment"] input[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

form[name="comment"] input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

form[name="comment"] input[type="submit"]:active {
    transform: translateY(0);
}

/* Comment container - completely transparent, no backgrounds */
/* Target the specific div that wraps the comment section */
#comments-header:parent,
div:has(#comments-header),
div:has(> #comments-header),
.container div[style*="margin: 10px"],
div.site > div[style*="margin: 10px"],
div[style*="margin: 10px"],
#main_content div[style*="margin: 10px"] {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 10px !important;
    margin: 10px !important;
}

/* Ultra specific targeting for the parent div of comments-header */
body div.site div.container div[style*="margin"],
.container > div[style],
.site > .container > div {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Override ANY div with inline style in container */
.container div[style],
form[name="comment"]:parent,
div:has(> form[name="comment"]) {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
}

/* Absolutely ensure no background on the wrapper div */
div:has(> #comments-header),
div:has(> form[name="comment"]),
div:has(#comments-header),
div:has(form[name="comment"]) {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}


/* Fallback for older browsers that don't support :has() */
#comments-header,
form[name="comment"] {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%) !important;
}

#comments-header ~ *:not(form):not(table):not(iframe) {
    background: none !important;
}

/* Remove any table default backgrounds in comment section */
div[style*="margin: 10px"] table {
    background: none;
    border: none;
}

/* Comment List - Individual comment card styling */
div[style*="margin: 10px"] > table[border="0"][style*="width: 100%"] {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(5px) !important;
    border-radius: 12px !important;
    padding: 15px !important;
    margin-bottom: 15px !important;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.1) !important;
    border: 1px solid rgba(102, 126, 234, 0.15) !important;
    transition: all 0.3s ease !important;
}

div[style*="margin: 10px"] > table[border="0"][style*="width: 100%"]:hover {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2) !important;
    transform: translateY(-2px);
}

div[style*="margin: 10px"] > table[border="0"][style*="width: 100%"] pre {
    background: rgba(102, 126, 234, 0.05) !important;
    border-left: 3px solid #667eea !important;
    padding: 12px 15px !important;
    border-radius: 8px !important;
    color: #2c3e50 !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

div[style*="margin: 10px"] > table[border="0"][style*="width: 100%"] td {
    color: #2c3e50 !important;
    font-weight: 500 !important;
}

div[style*="margin: 10px"] > table[border="0"][style*="width: 100%"] td[align="right"] {
    color: #667eea !important;
    font-weight: bold !important;
    font-size: 14px !important;
}

div[style*="margin: 10px"] > table[border="0"][style*="width: 100%"] td u {
    color: #764ba2 !important;
    text-decoration: none !important;
    font-weight: bold !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

div[style*="margin: 10px"] > table[border="0"][style*="width: 100%"] hr {
    border: none !important;
    height: 2px !important;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent) !important;
    margin: 10px 0 !important;
}

/* Archive Table Enhancements - only for archive list, not comment board */
.container table[border="0"][style*="table-layout:fixed"]:not([style*="width: 100%"]) {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.15);
    transition: all 0.3s ease;
}

.container table[border="0"][style*="table-layout:fixed"]:not([style*="width: 100%"]):hover {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.container table[border="0"][style*="table-layout:fixed"]:not([style*="width: 100%"]) a {
    color: #2c3e50;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
}

.container table[border="0"][style*="table-layout:fixed"]:not([style*="width: 100%"]) a:hover {
    color: #667eea;
}

/* General text color improvements */
td {
    color: #2c3e50;
}

/* Posted by text enhancement */
table td:first-child {
    color: #4a5568;
    font-weight: 500;
}

/* ========== HIDE NAVIGATION BAR ========== */
/* Hide the entire navigation bar */
div#navigation {
    display: none !important;
}

/* ========== 分页样式 ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
    padding: 20px 0;
    flex-wrap: wrap;
    clear: both;
    width: 100%;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 0.8);
    color: #667eea;
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-link:hover:not(.disabled):not(.active) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.page-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    cursor: default;
}

.page-link.disabled {
    background: rgba(200, 200, 200, 0.3);
    color: #999;
    border-color: rgba(200, 200, 200, 0.3);
    cursor: not-allowed;
    opacity: 0.5;
}

.page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    color: #667eea;
    font-weight: bold;
    font-size: 18px;
    letter-spacing: 2px;
}