:root {
    --primary: #3d3531;
    --accent: #e8863a;
    --accent-hover: #d47530;
    --cream: #faf6f1;
    --warm-gray: #6b5e57;
    --light-border: #e8e0d8;
    --text: #3d3531;
    --text-muted: #8c7f77;
    --header-bg: #2c2623;
    --footer-bg: #2c2623;
    --card-shadow: 0 2px 12px rgba(61,53,49,0.08);
    --card-hover-shadow: 0 8px 24px rgba(61,53,49,0.15);
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Noto Sans TC', system-ui, sans-serif;
    color: var(--text);
    background: var(--cream);
    line-height: 1.8;
}

img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

.btn-accent {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s;
}
.btn-accent:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
}

.header-top {
    background: var(--accent);
    color: #fff;
    text-align: center;
    padding: 0.35rem 0;
    font-size: 0.8rem;
}

.site-header .navbar {
    background: var(--header-bg);
    padding: 0.75rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.brand-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.navbar-nav-wrap {
    flex-wrap: wrap;
    justify-content: flex-end;
}
.navbar-nav .nav-link {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    font-size: 0.88rem;
    padding: 0.45rem 0.7rem;
    transition: color 0.2s;
    white-space: nowrap;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--accent);
}

.navbar-nav .dropdown-menu {
    background: var(--header-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 180px;
}
.navbar-nav .dropdown-item {
    color: rgba(255,255,255,0.8);
    padding: 0.5rem 1.25rem;
    font-size: 0.88rem;
}
.navbar-nav .dropdown-item:hover {
    background: rgba(232,134,58,0.15);
    color: var(--accent);
}

.nav-search .form-control {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 0.85rem;
    border-radius: 50px 0 0 50px;
}
.nav-search .form-control::placeholder { color: rgba(255,255,255,0.5); }
.nav-search .form-control:focus {
    background: rgba(255,255,255,0.15);
    border-color: var(--accent);
    box-shadow: none;
}
.nav-search .btn {
    border-radius: 0 50px 50px 0;
    font-size: 0.85rem;
}

.hero-section {
    background: linear-gradient(135deg, var(--header-bg) 0%, #4a3f3a 100%);
    color: #fff;
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '🐾';
    position: absolute;
    font-size: 15rem;
    opacity: 0.04;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.hero-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.3rem 1.2rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
}
.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}
.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    max-width: 500px;
    margin: 0 auto;
}

.bg-cream { background: var(--cream); }

.content-section {
    padding: 3.5rem 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.75rem;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
}

.article-card {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s;
    background: #fff;
}
.article-card:hover {
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-4px);
}
.card-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #f0ebe5;
}
.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.article-card:hover .card-img-wrap img {
    transform: scale(1.05);
}
.card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #ccc;
}
.card-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: #fff;
    padding: 0.2rem 0.7rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}
.card-body {
    padding: 1.25rem;
}
.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
.card-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.list-card {
    display: flex;
    gap: 1.25rem;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s;
    margin-bottom: 1rem;
}
.list-card:hover {
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-2px);
}
.list-card-img {
    flex-shrink: 0;
    width: 220px;
    min-height: 160px;
    overflow: hidden;
    background: #f0ebe5;
}
.list-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.list-card:hover .list-card-img img {
    transform: scale(1.05);
}
.list-card-img .card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #ccc;
}
.list-card-body {
    flex: 1;
    padding: 1.25rem 1.25rem 1.25rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.list-card-cat {
    display: inline-block;
    background: rgba(232,134,58,0.12);
    color: var(--accent);
    padding: 0.15rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    width: fit-content;
}
.list-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
.list-card-excerpt {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.list-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
}

.sidebar-post-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--light-border);
    color: var(--text);
    transition: color 0.2s;
}
.sidebar-post-item:last-child { border: none; }
.sidebar-post-item:hover { color: var(--accent); }
.sidebar-post-img {
    flex-shrink: 0;
    width: 72px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    background: #f0ebe5;
}
.sidebar-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sidebar-post-img .card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #ccc;
}
.sidebar-post-info {
    flex: 1;
    min-width: 0;
}
.sidebar-post-title {
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.2rem;
}

@media (max-width: 767.98px) {
    .list-card {
        flex-direction: column;
    }
    .list-card-img {
        width: 100%;
        height: 180px;
        min-height: auto;
    }
    .list-card-body {
        padding: 1rem;
    }
}

.breadcrumb-bar {
    background: #fff;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--light-border);
    font-size: 0.85rem;
}
.breadcrumb-item a { color: var(--warm-gray); }
.breadcrumb-item.active { color: var(--text-muted); }

.archive-header {
    background: linear-gradient(135deg, var(--header-bg) 0%, #4a3f3a 100%);
    color: #fff;
    padding: 2.5rem 0;
}
.archive-title {
    font-size: 2rem;
    font-weight: 700;
}
.archive-desc { opacity: 0.8; }

.article-header { margin-bottom: 2rem; }
.category-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.25rem 0.85rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}
.article-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
}
.article-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.article-cover {
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
}
.article-content {
    font-size: 1.05rem;
    line-height: 2;
}
.article-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    padding-left: 0.75rem;
    border-left: 4px solid var(--accent);
}
.article-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
}
.article-content img {
    border-radius: 8px;
    margin: 1.5rem 0;
}
.article-content blockquote {
    border-left: 4px solid var(--accent);
    background: rgba(232,134,58,0.06);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}
.article-content table th,
.article-content table td {
    border: 1px solid var(--light-border);
    padding: 0.65rem 1rem;
    text-align: left;
}
.article-content table th {
    background: var(--accent);
    color: #fff;
    font-weight: 500;
}
.article-content table tr:nth-child(even) {
    background: rgba(250,246,241,0.6);
}

.article-tags .tag-link,
.article-tags a {
    display: inline-block;
    background: var(--cream);
    color: var(--warm-gray);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    margin: 0.2rem;
    border: 1px solid var(--light-border);
    transition: all 0.2s;
}
.article-tags a:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.blog-sidebar {
    position: sticky;
    top: 100px;
}
.sidebar-widget {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
}
.widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
}
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.category-list li { border-bottom: 1px solid var(--light-border); }
.category-list li:last-child { border: none; }
.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    color: var(--text);
    font-size: 0.9rem;
    transition: color 0.2s;
}
.category-list a:hover { color: var(--accent); }
.badge.bg-muted {
    background: var(--cream);
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.75rem;
}

.popular-post-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--light-border);
    color: var(--text);
    transition: color 0.2s;
}
.popular-post-item:last-child { border: none; }
.popular-post-item:hover { color: var(--accent); }
.popular-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}
.popular-title {
    font-size: 0.88rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pagination-wrap { text-align: center; }
.pagination-wrap .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.pagination-wrap .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 0.9rem;
    color: var(--text);
    background: #fff;
    box-shadow: var(--card-shadow);
    transition: all 0.2s;
}
.pagination-wrap .page-numbers.current,
.pagination-wrap .page-numbers:hover {
    background: var(--accent);
    color: #fff;
}

.site-footer {
    background: var(--footer-bg);
    color: rgba(255,255,255,0.7);
    padding: 3rem 0 1.5rem;
}
.footer-brand {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.footer-heading {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.footer-desc {
    color: rgba(255,255,255,0.6);
}
.site-footer .text-muted {
    color: rgba(255,255,255,0.6) !important;
}
.footer-links {
    list-style: none;
    padding: 0;
}
.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    margin-right: 0.5rem;
    transition: all 0.2s;
}
.social-links a:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(232,134,58,0.4);
    z-index: 999;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(232,134,58,0.5);
}

.article-toc {
    background: #fff;
    border: 1px solid var(--light-border);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}
.toc-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.toc-list li { padding: 0.3rem 0; }
.toc-list li a {
    color: var(--text);
    font-size: 0.9rem;
    transition: color 0.2s;
}
.toc-list li a:hover { color: var(--accent); }
.toc-list li.toc-sub { padding-left: 1.25rem; }
.toc-list li.toc-sub a { font-size: 0.85rem; color: var(--text-muted); }

.article-faq {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--light-border);
}
.faq-item {
    background: #fff;
    border: 1px solid var(--light-border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.faq-question {
    font-weight: 700;
    font-size: 1rem;
    padding: 1rem 1.25rem;
    color: var(--primary);
    background: rgba(232,134,58,0.05);
    border-bottom: 1px solid var(--light-border);
}
.faq-answer {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--warm-gray);
}

.share-box {
    background: #fff;
    border: 1px solid var(--light-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}
.share-label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--primary);
}
.share-buttons { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.btn-facebook { background: #1877f2; color: #fff; border: none; }
.btn-facebook:hover { background: #166fe5; color: #fff; }
.btn-line { background: #06c755; color: #fff; border: none; }
.btn-line:hover { background: #05b34c; color: #fff; }
.btn-twitter { background: #000; color: #fff; border: none; }
.btn-twitter:hover { background: #333; color: #fff; }

.related-posts { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--light-border); }

.empty-state i { font-size: 4rem; }

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--header-bg);
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 8px;
    }
    .nav-search { display: block !important; margin: 1rem 0 0; }
    .hero-section { padding: 4rem 0; }
    .hero-title { font-size: 2rem; }
    .article-title { font-size: 1.5rem; }
    .blog-sidebar { position: static; margin-top: 2rem; }
}

/* Popular Posts with Thumbnail */
.popular-post-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--light-border);
    text-decoration: none;
    transition: background 0.2s;
    border-radius: 6px;
}
.popular-post-item:hover {
    background: rgba(232, 134, 58, 0.06);
}
.popular-post-item:last-child {
    border-bottom: none;
}
.popular-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}
.popular-num {
    width: 24px;
    height: 24px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.popular-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Comments */
.comments-area {
    background: #fff;
    border: 1px solid var(--light-border);
    border-radius: var(--radius);
    padding: 2rem;
}
.comment-reply-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent);
}
.comment-form label {
    display: block;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--light-border);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
}
.comment-form textarea:focus,
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 134, 58, 0.15);
}
.comment-form textarea {
    resize: vertical;
    min-height: 120px;
}
.comment-form p {
    margin-bottom: 1rem;
}
.comment-form .form-submit {
    margin-top: 0.5rem;
    margin-bottom: 0;
}
.comment-form .submit {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.6rem 1.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.comment-form .submit:hover {
    background: #d47530;
}
.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--warm-gray);
}
.comment-form-cookies-consent input[type="checkbox"] {
    margin-top: 0.25rem;
    accent-color: var(--accent);
}
.comment-list {
    margin-bottom: 2rem;
}
.comment-list .comment {
    padding: 1rem 0;
    border-bottom: 1px solid var(--light-border);
}
.comment-author img {
    border-radius: 50%;
    margin-right: 0.5rem;
}
.comments-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

@media (max-width: 575.98px) {
    .content-section { padding: 2rem 0; }
    .article-meta { gap: 0.75rem; }
    .section-title { font-size: 1.25rem; }
    .comments-area { padding: 1.25rem; }
}
