/* common.css */
@font-face {
    font-family: 'MainCustomFont';
    src: url('/public/src/font/font.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'MaintitleFont';
    src: url('/public/src/font/title.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.large-text {
    font-family: 'MainCustomFont', 'KaiTi', 'SimSun', sans-serif;
    color: #333;
}

:root {
    --theme-green: #28a745;
    --theme-green-darker: #218838;
    --theme-green-lighter: #a7d7a9;
    --font-color-ten-year: 0deg 0% 25%;
    --ten-year-progress-bg: rgba(230, 230, 230, 0.5);
    --ten-year-box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: 0px 5px 15px 3px rgba(0, 0, 0, .1);
    position: sticky;
    top: 10px;
    z-index: 1000;
    margin-left: 300px;
    margin-right: 300px;
    width: calc(100% - 600px);
    border-radius: 12px;
    box-sizing: border-box;
}

header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.8em; font-weight: bold; color: var(--theme-green); text-decoration: none; }
nav ul { list-style: none; padding: 0; margin: 0; display: flex; }
nav ul li { margin-left: 25px; }
nav ul li a { text-decoration: none; color: #555; font-weight: 500; transition: color 0.3s ease; }
nav ul li a:hover, nav ul li a.active { color: var(--theme-green); }


.article-card:hover {
    transform: translateY(-5px) !important;
}

.article-content { padding: 20px; }
.article-content h3 { font-size: 1.5em; margin-top: 0; margin-bottom: 10px; }
.article-content h3 a:hover { text-decoration: underline; }
.article-excerpt { color: #555; margin-bottom: 15px; }
.read-more-link:hover { text-decoration: underline; }

.pagination {
    text-align: center;
    margin-top: 50px;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid #ddd;
    color: var(--theme-green);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}
.pagination a:hover {
    background-color: var(--theme-green-lighter);
    border-color: var(--theme-green);
}
.pagination .current-page {
    background-color: var(--theme-green);
    color: white;
    border-color: var(--theme-green);
}
.pagination .disabled {
    color: #aaa;
    pointer-events: none;
    border-color: #eee;
}

footer {
    background-color: #f8f9fa;
    color: #555;
    padding: 40px 0; margin-top: 60px; font-size: 0.9em;
    border-top: 1px solid #e9ecef;
}
footer .container {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
}
.footer-left, .footer-right { padding: 5px 0; }
.footer-right a { color: var(--theme-green); text-decoration: none; }
.footer-right a:hover { text-decoration: underline; }
.footer-left a { color: #555; text-decoration: none; }
.footer-left a:hover { text-decoration: underline; }

#scrollTopProgress {
    position: fixed; right: 25px; bottom: 25px; width: 50px; height: 50px;
    background-color: rgba(255, 255, 255, 0.95); border-radius: 50%;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    display: flex; justify-content: center; align-items: center; cursor: pointer;
    z-index: 1050; opacity: 0; visibility: hidden;
    transform: scale(0.8) translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}
#scrollTopProgress.visible { opacity: 1; visibility: visible; transform: scale(1) translateY(0); }
.progress-ring-svg, #progressValue, #backToTopIconSvg {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.progress-ring-svg { width: 100%; height: 100%; }
.progress-ring__circle {
    transition: stroke-dashoffset 0.15s linear; transform: rotate(-90deg);
    transform-origin: 50% 50%; stroke-linecap: round;
}
#progressValue { font-size: 13px; font-weight: 600; color: var(--theme-green); }
#backToTopIconSvg {
    width: 20px; height: 20px; fill: var(--theme-green);
    opacity: 0; visibility: hidden;
}
#scrollTopProgress.show-arrow .progress-ring-svg,
#scrollTopProgress.show-arrow #progressValue { opacity: 0; visibility: hidden; }
#scrollTopProgress.show-arrow #backToTopIconSvg { opacity: 1; visibility: visible; }

/* Responsive Styles */
@media (max-width: 768px) {
    .container { padding: 0 15px; }
    header {
        margin-left: 10px; margin-right: 10px;
        width: calc(100% - 20px); padding: 15px 0; top: 5px;
    }
    header .container { flex-direction: column; align-items: center; }
    .logo { font-size: 1.6em; margin-bottom: 10px; }
    nav ul { margin-top: 0; flex-wrap: wrap; justify-content: center; }
    nav ul li { margin: 5px 10px; }
    .articles-grid { gap: 20px; }
    .article-content h3 { font-size: 1.3em; }
    .pagination a, .pagination span { padding: 8px 12px; margin: 0 3px; font-size: 0.9em; }
    footer .container { flex-direction: column; text-align: center; }
    .footer-right { margin-top: 10px; }
    #scrollTopProgress {
        right: 15px; bottom: 15px; width: 40px; height: 40px;
    }
    #progressValue { font-size: 11px; }
    #backToTopIconSvg { width: 16px; height: 16px; }
}