@charset "utf-8";

* {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body>main {
    min-height: 80vh;
    width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

.blogTitle {
    position: fixed;
    z-index: 20;
    height: 100vh;
    width: 250px;
    display: flex;
    flex-direction: column;
    user-select: none;
    top: 0;
    left: 0;
    background: var(--sidebar-bg);
    border-radius: 0 18px 18px 0;
    border-right: var(--sidebar-border);
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform: translateX(-100%);
    overflow-y: auto;
    overflow-x: hidden;
}

.blogTitle.show {
    transform: translateX(0);
}

.blogTitle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 19;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    padding: 28px 20px 18px 20px;
    background: transparent;
    border-bottom: 1px solid var(--sidebar-divider);
    margin-bottom: 20px;
}

.brand-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sidebar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--sidebar-divider);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: zoom-in;
    user-select: none;
}

.sidebar-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.sidebar-avatar:active {
    transform: scale(0.98);
}

.brand-info h4 {
    margin: 0;
    color: var(--sidebar-text);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.sidebar-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

.sidebar-tags .tag {
    padding: 5px 12px;
    background: var(--primary-color, #667eea);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sidebar-tags .tag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 經驗標籤 - 藍色漸變 */
.sidebar-tags .tag-experience {
    background: linear-gradient(135deg, #0078d4, #005fb8);
}

/* LeetCode標籤 - 金橘漸變 */
.sidebar-tags .tag-leetcode {
    background: linear-gradient(135deg, #ff9a00, #ff6a00);
}

.nav-section {
    margin-bottom: 18px;
    padding: 0 16px;
}

.nav-label {
    color: var(--sidebar-text-tertiary);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-left: 8px;
}

.nav-item {
    width: 80%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 8px 10px 12px;
    margin: 5px 0;
    border-radius: 10px;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: background-color 0.15s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 40px;
    gap: 8px;
}

.nav-item.active .nav-indicator {
    background: transparent;
    box-shadow: none;
    pointer-events: none;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: transparent;
    border-radius: 0 2px 2px 0;
}

.nav-item.active::before {
    background: var(--sidebar-accent);
}

.nav-item:hover .nav-text p {
    color: var(--primary-color);
}

.nav-item:hover {
    background: rgba(102, 126, 234, 0.12) !important;
    color: var(--primary-color) !important;
}

.nav-item.theme {
    background: none !important;
    color: inherit !important;
}

.nav-item.theme:hover,
.nav-item.theme:active,
.nav-item.theme:focus {
    background: none !important;
    color: inherit !important;
}

.nav-item.theme .nav-text p,
.nav-item.theme:hover .nav-text p,
.nav-item.theme:active .nav-text p,
.nav-item.theme:focus .nav-text p {
    color: inherit !important;
}

.nav-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    filter: var(--icon-filter);
}

.nav-item>img.nav-icon-img {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
    filter: var(--icon-filter);
}

.nav-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-text p {
    margin: 0;
    font-size: 14px;
    color: var(--sidebar-text);
    font-weight: 500;
    line-height: 1.3;
}

.nav-description {
    font-size: 11px;
    color: var(--sidebar-text-tertiary);
    font-weight: 400;
    line-height: 1.2;
}

.theme-select {
    margin-top: 4px;
    padding: 6px 10px;
    font-size: 12px;
    color: var(--sidebar-text);
    background: var(--sidebar-select-bg, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--sidebar-divider, rgba(255, 255, 255, 0.15));
    border-radius: 6px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    width: 100%;
}

.theme-select:hover {
    background: var(--sidebar-select-hover-bg, rgba(255, 255, 255, 0.08));
    border-color: var(--sidebar-select-hover-border, rgba(255, 255, 255, 0.25));
}

.theme-select:focus {
    border-color: var(--primary-color, #007aff);
    box-shadow: 0 0 0 3px var(--select-focus-shadow, rgba(0, 122, 255, 0.1));
}

.theme-select option {
    background: var(--dropdown-bg, #1e1e1e);
    color: var(--dropdown-text, #ffffff);
    padding: 8px;
}

.menu {
    top: 16px;
    position: fixed;
    left: 16px;
    padding: 6px;
    border-radius: 10px;
    cursor: pointer;
    z-index: 21;
    background: transparent;
    transition: all 0.2s ease;
}

.menu:active {
    transform: scale(0.95) translateY(0);
}

.menu img,
.menu img.icon {
    display: block;
    width: 20px;
    height: 20px;
    filter: none;
}

.light-theme .menu img,
.light-theme .menu img.icon {
    filter: invert(1) brightness(0) contrast(1);
}

.sidebar-divider {
    margin-top: auto;
    border-top: 1px solid var(--sidebar-divider);
    padding-top: 0;
}

.modal-close,
.modal-control-btn {
    display: inline-flex;
}

footer {
    padding: 0;
    margin: 0;
    text-align: left;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

h1 {
    text-align: center;
    font-size: 30px;
    letter-spacing: 1px;
    color: var(--text-color);
}

h2 {
    margin-top: 20px;
    font-size: 20px;
    letter-spacing: 1px;
    position: relative;
    color: var(--text-color);
}

h3 {
    color: var(--text-color);
    letter-spacing: 1px;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

h4 {
    color: var(--text-color);
    text-decoration: underline;
    text-align: center;
}

p {
    display: flex;
    font-size: 16px;
    gap: 8px;
    margin: 5px 0;
    line-height: 1.6;
    color: var(--text-color);
}

span>a {
    color: var(--accent-color);
}

#background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--background-color);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

.cp {
    position: fixed;
    bottom: 0;
    left: 0;
    cursor: pointer;
    padding: 10px;
    display: none;
    z-index: 999;
    user-select: none;
}

:root {
    /* Light Theme Colors */
    --background-color-light: #FFFFFF;
    --text-color-light: #1F2328;
    --primary-color-light: #0969DA;
    --secondary-color-light: #218BFF;
    --tertiary-color-light: #c2d3e6;
    --card-border-light: #D0D7DE;
    --border-light: #D0D7DE;
    --accent-color-light: #218BFF;
    
    --img-color-light: #1990b8;
    --a-color-light: #0969DA;
    --sidebar-bg-light: rgba(246, 248, 250, 0.98);
    --sidebar-border-light: #D0D7DE;
    --sidebar-text-light: #1F2328;
    --sidebar-text-secondary-light: #57606A;
    --sidebar-text-tertiary-light: #57606A;
    --sidebar-divider-light: #D0D7DE;
    --sidebar-accent-light: #0969DA;
    --sidebar-shadow-light: rgba(0, 0, 0, 0.1);
    --sidebar-accent-rgb-light: 9, 105, 218;
    --code-bg-light: #F6F8FA;
    --code-border-light: #D0D7DE;
    --code-text-light: #1F2328;
    --prompt-color-light: #0969DA;
    --status-bg-light: rgba(246, 248, 250, 0.8);
    --status-border-light: #D0D7DE;
    --status-text-light: #57606A;
    --sidebar-select-bg-light: rgba(0, 0, 0, 0.03);
    --sidebar-select-hover-bg-light: rgba(0, 0, 0, 0.06);
    --sidebar-select-hover-border-light: #8B949E;
    --dropdown-bg-light: #FFFFFF;
    --dropdown-text-light: #1F2328;
    --select-focus-shadow-light: rgba(9, 105, 218, 0.1);
    --hover-bg-light: rgba(0, 0, 0, 0.05);

    /* Dark Theme Colors */
    --background-color-dark: #0D1117;
    --text-color-dark: #C9D1D9;
    --primary-color-dark: #58A6FF;
    --secondary-color-dark: #1F6FEB;
    --tertiary-color-dark: #8B949E;
    --card-border-dark: #30363D;
    --border-dark: #30363D;
    --accent-color-dark: #1F6FEB;
    
    --img-color-dark: #333333;
    --a-color-dark: #58A6FF;
    --sidebar-bg-dark: rgba(22, 27, 34, 0.98);
    --sidebar-border-dark: #30363D;
    --sidebar-text-dark: #C9D1D9;
    --sidebar-text-secondary-dark: #8B949E;
    --sidebar-text-tertiary-dark: #8B949E;
    --sidebar-divider-dark: #30363D;
    --sidebar-accent-dark: #58A6FF;
    --sidebar-shadow-dark: rgba(0, 0, 0, 0.3);
    --sidebar-accent-rgb-dark: 88, 166, 255;
    --code-bg-dark: #161B22;
    --code-border-dark: #30363D;
    --code-text-dark: #C9D1D9;
    --prompt-color-dark: #58A6FF;
    --sidebar-select-bg-dark: rgba(255, 255, 255, 0.05);
    --sidebar-select-hover-bg-dark: rgba(255, 255, 255, 0.08);
    --sidebar-select-hover-border-dark: rgba(255, 255, 255, 0.25);
    --dropdown-bg-dark: #1e1e1e;
    --dropdown-text-dark: #C9D1D9;
    --select-focus-shadow-dark: rgba(88, 166, 255, 0.1);
    --hover-bg-dark: rgba(255, 255, 255, 0.05);
    /* default theme colors */
    --background-color: var(--background-color-dark);
    --text-color: var(--text-color-dark);
    --primary-color: var(--primary-color-dark);
    --secondary-color: var(--secondary-color-dark);
    --tertiary-color: var(--tertiary-color-dark);
    --card-bg: rgba(102, 126, 234, 0.12);
    --card-border: var(--card-border-dark);
    --icon-filter: invert(0) brightness(1) contrast(1);
    --accent-color: var(--accent-color-dark);
    --img-color: var(--img-color-dark);
    --a-color: var(--a-color-dark);
    --sidebar-text: var(--sidebar-text-dark);
    --sidebar-text-secondary: var(--sidebar-text-secondary-dark);
    --sidebar-text-tertiary: var(--sidebar-text-tertiary-dark);
    --sidebar-divider: var(--sidebar-divider-dark);
    --sidebar-accent: var(--sidebar-accent-dark);
    --sidebar-shadow: var(--sidebar-shadow-dark);
    --sidebar-accent-rgb: var(--sidebar-accent-rgb-dark);
    --code-bg: var(--code-bg-dark);
    --code-border: var(--code-border-dark);
    --code-text: var(--code-text-dark);
    --prompt-color: var(--prompt-color-dark);
    --status-bg: var(--status-bg-dark);
    --status-border: var(--status-border-dark);
    --status-text: var(--status-text-dark);
    --sidebar-select-bg: var(--sidebar-select-bg-dark);
    --sidebar-select-hover-bg: var(--sidebar-select-hover-bg-dark);
    --sidebar-select-hover-border: var(--sidebar-select-hover-border-dark);
    --dropdown-bg: var(--dropdown-bg-dark);
    --dropdown-text: var(--dropdown-text-dark);
    --select-focus-shadow: var(--select-focus-shadow-dark);
    --hover-bg: var(--hover-bg-dark);
    --sidebar-bg: var(--sidebar-bg-dark);
}

.dark-theme {
    --background-color: var(--background-color-dark);
    --text-color: var(--text-color-dark);
    --primary-color: var(--primary-color-dark);
    --secondary-color: var(--secondary-color-dark);
    --tertiary-color: var(--tertiary-color-dark);
    --card-border: var(--card-border-dark);
    --accent-color: var(--accent-color-dark);
    --img-color: var(--img-color-dark);
    --a-color: var(--a-color-dark);
    --icon-filter: invert(0) brightness(1) contrast(1);
    --sidebar-text: var(--sidebar-text-dark);
    --sidebar-text-secondary: var(--sidebar-text-secondary-dark);
    --sidebar-text-tertiary: var(--sidebar-text-tertiary-dark);
    --sidebar-divider: var(--sidebar-divider-dark);
    --sidebar-accent: var(--sidebar-accent-dark);
    --sidebar-shadow: var(--sidebar-shadow-dark);
    --sidebar-accent-rgb: var(--sidebar-accent-rgb-dark);
    --code-bg: var(--code-bg-dark);
    --code-border: var(--code-border-dark);
    --code-text: var(--code-text-dark);
    --prompt-color: var(--prompt-color-dark);
    --status-bg: var(--status-bg-dark);
    --status-border: var(--status-border-dark);
    --status-text: var(--status-text-dark);
    --hover-bg: var(--hover-bg-dark);
    --sidebar-bg: var(--sidebar-bg-dark);
}

.light-theme {
    --background-color: var(--background-color-light);
    --text-color: var(--text-color-light);
    --primary-color: var(--primary-color-light);
    --secondary-color: var(--secondary-color-light);
    --tertiary-color: var(--tertiary-color-light);
    --card-border: var(--card-border-light);
    --accent-color: var(--accent-color-light);
    --img-color: var(--img-color-light);
    --a-color: var(--a-color-light);
    --icon-filter: invert(0) brightness(0) contrast(1);
    --sidebar-bg: var(--sidebar-bg-light);
    --sidebar-border: var(--sidebar-border-light);
    --sidebar-text: var(--sidebar-text-light);
    --sidebar-text-secondary: var(--sidebar-text-secondary-light);
    --sidebar-text-tertiary: var(--sidebar-text-tertiary-light);
    --sidebar-divider: var(--sidebar-divider-light);
    --sidebar-accent: var(--sidebar-accent-light);
    --sidebar-shadow: var(--sidebar-shadow-light);
    --sidebar-accent-rgb: var(--sidebar-accent-rgb-light);
    --code-bg: var(--code-bg-light);
    --code-border: var(--code-border-light);
    --code-text: var(--code-text-light);
    --prompt-color: var(--prompt-color-light);
    --status-bg: var(--status-bg-light);
    --status-border: var(--status-border-light);
    --status-text: var(--status-text-light);
    --sidebar-select-bg: var(--sidebar-select-bg-light);
    --sidebar-select-hover-bg: var(--sidebar-select-hover-bg-light);
    --sidebar-select-hover-border: var(--sidebar-select-hover-border-light);
    --dropdown-bg: var(--dropdown-bg-light);
    --dropdown-text: var(--dropdown-text-light);
    --select-focus-shadow: var(--select-focus-shadow-light);
    --hover-bg: var(--hover-bg-light);
}

/* 頁尾基礎樣式 */
.footer-container {
    max-width: 800px;
    margin: 0 auto;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}

.footer-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.0em;
    color: var(--primary-color);
}

.footer-info p {
    margin: 0;
    font-size: 0.9em;
    color: var(--text-color);
    opacity: 0.7;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9em;
    opacity: 0.8;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary-color);
    background: rgba(128, 128, 128, 0.05);
}

.footer-bottom {
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.footer-tech p {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
    line-height: 1.6;
}

#loadingScreen {
    position: relative;
    width: 100%;
    height: 100%;
    background: black;
    justify-content: center;
    align-items: center;
    display: flex;
}

.loader {
    border: 16px solid #f3f3f3;
    border-top: 16px solid #3498db;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-brand-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-brand-header img {
    filter: var(--icon-filter);
    transition: filter 0.3s ease;
}

.footer-brand-header p {
    margin: 0;
}

.footer-name-subtitle {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

.footer-specialties {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.specialty-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.specialty-text {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.75;
    line-height: 1.5;
}

.author-desc {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.65;
    line-height: 1.4;
    display: block;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-nav h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.footer-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.75;
    transition: all 0.2s ease;
    line-height: 1.6;
}

.footer-nav a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 0.8rem;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.6;
    line-height: 1.4;
}

.farea {
    flex: 1;
    min-width: 200px;
    margin: 10px;
}

.farea-top {
    flex: 1;
    min-width: 200px;
    margin: 20px;
    padding: 24px 28px;
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.10), 0 1px 6px rgba(0, 0, 0, 0.06);
    background: linear-gradient(to bottom, var(--primary-color), #fad0c4);
    border-radius: 10px;
    background-size: 10%;
    position: relative;
    overflow: hidden;
}

.farea-top:hover {
    box-shadow: 0 8px 24px rgba(25, 118, 210, 0.16), 0 2px 8px rgba(0, 0, 0, 0.10);
    border-color: #b0bec5;
}

.farea p,
.farea ul {
    margin: 5px 0;
    font-size: 15px;
}

.farea ul {
    list-style: none;
    user-select: none;
    padding-left: 0;
}

.farea ul li {
    margin: 10px 0;
}

.farea ul li a {
    position: relative;
    color: var(--text-color);
    padding-left: 20px;
}

.farea ul li a::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 50%;
    width: 12px;
    height: 12px;
    transform: translateY(-50%);
    background: currentColor;
    -webkit-mask: url('../images/chevron_right.svg') no-repeat center;
    mask: url('../images/chevron_right.svg') no-repeat center / contain;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease, left 0.2s ease;
    pointer-events: none;
}

.farea ul li a:hover {
    transform: translateX(3px);
    padding-left: 15px;
}

.farea ul li a:hover::before {
    opacity: 1;
    left: 0;
    transform: translateY(-50%) translateX(0);
}

.farea-top h2 {
    font-size: 20px;
    display: flex;
    align-items: center;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9em;
    min-width: 400px;
    border-radius: 5px 5px 0 0;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    table-layout: auto;
}

.table-container {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
}

th,
td {
    padding: 12px 15px;
    color: var(--text-color);
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

th {
    background-color: #009879;
    color: #ffffff;
    text-transform: uppercase;
}

td a {
    color: var(--text-color);
}

td a:hover {
    color: var(--primary-color);
}

.highlight {
    background-color: #009879;
    font-weight: bold;
}

#closeBar {
    background-color: #555;
    color: #fff;
    border: none;
    padding: 5px 40px;
    margin-right: 40px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#closeBar:hover {
    background-color: var(--primary-color);
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--sidebar-divider);
    border-radius: 2px;
}

footer {
    background: var(--sidebar-bg);
    border-top: none;
    color: var(--text-color);
    padding-left: 2rem;
    position: relative;
}

footer .footer-nav h3{
    color: var(--primary-color) !important;
    transition: all 0.3s ease;
}
footer .footer-nav a:hover,footer .footer-nav h3:hover,.more-info-trigger:hover {
    color: var(--primary-color) !important;
    transform: translateX(2px);
}

footer .specialty-text {
    opacity: 0.75 !important;
}

.footer-content {
    position: relative;
    padding: 40px 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-main {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
    justify-content: space-between;
}

.farea {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

.farea-brand {
    flex: 2;
    min-width: 300px;
}

.brand-subtitle {
    margin: 0;
    font-size: 0.9em;
    color: var(--text-color);
    opacity: 0.8;
}

.author-description {
    margin: 8px 0;
    font-size: 0.9em;
    color: var(--text-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9em;
    border: 1px solid var(--sidebar-divider);
    transition: all 0.3s ease;
}

.social-links a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.farea h3 {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--sidebar-divider);
    padding-bottom: 8px;
    color: var(--text-color);
}

.farea ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.farea ul li {
    margin-bottom: 8px;
}

.farea ul li a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 4px 0;
    font-size: 0.9em;
    display: block;
    position: relative;
}

/* 側邊欄動畫 */
@keyframes slideInFromTop {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromBottom {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 手機版頁尾版面配置 */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-content {
        padding: 1.5rem 1rem 1rem;
    }

    .menu {
        display: block !important;
    }

    .sidebar-header {
        padding-top: 16px !important;
        padding-bottom: 10px !important;
        margin-bottom: 10px !important;
    }

    .sidebar-footer {
        margin-top: 10px !important;
        padding-bottom: 10px !important;
    }

    .nav-item {
        width: 96%;
        padding: 7px 6px 7px 10px !important;
        margin: 2px 0 !important;
        font-size: 15px !important;
        border-radius: 8px !important;
        min-height: 36px !important;
    }
}

@media (max-width: 480px) {
    .footer-content {
        padding: 1.2rem 0.8rem 0.8rem;
    }

    .footer-grid {
        gap: 1.2rem;
        padding-bottom: 0.8rem;
    }

    .footer-bottom {
        padding-top: 0.6rem;
    }
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    backdrop-filter: blur(10px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    color: var(--text-color);
    stroke: var(--text-color);
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

/* 響应式调整 */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 44px;
        height: 44px;
    }

    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
}

/* 更多資訊按鈕 */
.more-info-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--primary-color, #667eea);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.more-info-trigger:hover {
    opacity: 0.8;
    transform: translateX(2px);
}

.more-info-trigger .chevron {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.more-info-trigger:hover .chevron {
    transform: translateX(3px);
}

/* 更多資訊卡片 */
.more-info-card {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.more-info-card.active {
    opacity: 1;
    visibility: visible;
}

.more-info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.more-info-content {
    position: relative;
    background: var(--background-color);
    border-radius: 10px;
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.more-info-card.active .more-info-content {
    transform: scale(1);
}

/* 明信片橫向佈局 */
.postcard-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.postcard-left,
.postcard-right {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    /* 原本 1rem，減少間距 */
}

.postcard-left {
    padding-right: 1rem;
    /* 原本 2rem，減少空間 */
}

.postcard-left {
    padding-right: 1rem;
    /* 原本 2rem，減少空間 */
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-section p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-section img {
    filter: var(--icon-filter);
    transition: filter 0.3s ease;
}

/* 響應式設計 - 小螢幕改回縱向 */
@media (max-width: 768px) {
    .postcard-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .postcard-left {
        border-right: none;
        padding-right: 0;
        padding-bottom: 1.5rem;
    }

    .more-info-content {
        max-height: 90vh;
        padding: 1.5rem;
    }
}

.close-card {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    width: 40px;
    height: 40px;
}

.close-card img {
    filter: var(--icon-filter);
    transition: filter 0.3s ease;
}

.close-card:hover {
    background: var(--hover-bg, rgba(0, 0, 0, 0.05));
    transform: rotate(90deg);
}

.more-info-content h2 {
    margin: 0 0 0.75rem 0;
    color: var(--text-color);
    font-size: 1.75rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.name{
    font-weight: 400;
    color: var(--primary-color) !important;
}
.name-en {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: var(--hover-bg, rgba(102, 126, 234, 0.08));
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    width: fit-content;
    transition: all 0.3s ease;
}

.github-link svg {
    flex-shrink: 0;
}

.more-info-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color, #667eea);
    padding-bottom: 0.4rem;
}

.about-section {
    margin-bottom: 0;
}

.about-section p {
    color: var(--text-color);
    line-height: 1.7;
    font-size: 0.9rem;
    opacity: 0.85;
    margin: 0;
}

.crying-blue-gif {
    max-width: 150px;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.crying-blue-gif:hover {
    transform: scale(1.05);
    transition: all 0.3s ease;
}

.education-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.education-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: var(--hover-bg);
    transition: all 0.3s ease;
    cursor: pointer;
}

.education-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.education-school {
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.education-department {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.85rem;
}

.achievement-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.achievement-item,
.education-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.875rem;
    border-radius: 10px;
    background: var(--hover-bg);
    transition: all 0.3s ease;
    cursor: pointer;
}

.achievement-item::after,
.education-item::after {
    content: attr(data-title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    color: var(--text-color);
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.achievement-item:hover::after,
.education-item:hover::after {
    opacity: 1;
}

.achievement-item:hover,
.education-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.item-text {
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 500;
}

.achievement-badge {
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    background: var(--secondary-color);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .more-info-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 90vh;
    }

    .close-card {
        top: 0.75rem;
        right: 0.75rem;
        width: 36px;
        height: 36px;
        padding: 0.4rem;
    }

    .more-info-content h2 {
        font-size: 1.2rem;
        padding-right: 0.3rem;
    }

    .more-info-content h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .more-info-content {
        padding: 1.25rem;
    }

    .close-card {
        width: 32px;
        height: 32px;
    }
}

/* Avatar Zoom Styles */
.avatar-zoom-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.avatar-zoom-container.active {
    opacity: 1;
    visibility: visible;
}

.avatar-zoom-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.avatar-zoom-content {
    position: relative;
    z-index: 10000;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.avatar-zoom-container.active .avatar-zoom-content {
    transform: scale(1);
}

.avatar-zoom-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.avatar-zoom-close {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.avatar-zoom-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1) rotate(90deg);
}

.avatar-zoom-close img {
    filter: brightness(0) invert(1);
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .avatar-zoom-content {
        max-width: 95%;
    }

    .avatar-zoom-close {
        top: -45px;
        right: 0;
        width: 40px;
        height: 40px;
    }

    .avatar-zoom-image {
        max-height: 80vh;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .avatar-zoom-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }

    .avatar-zoom-close img {
        width: 18px;
        height: 18px;
    }
}

/* ========== 載入動畫 ========== */
/* 載入動畫容器 - 初始可見 */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--background-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

/* 載入完成後隱藏 */
body.loaded .loading-screen {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 主要內容初始隱藏，載入完成後顯示 */
body:not(.loaded) main,
body:not(.loaded) header.blogTitle,
body:not(.loaded) footer,
body:not(.loaded) .menu {
    opacity: 0;
}

body.loaded main,
body.loaded header.blogTitle,
body.loaded footer,
body.loaded .menu {
    opacity: 1;
    transition: opacity 0.5s ease-in 0.2s;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--border-light);
    border-top-color: var(--primary-color-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 24px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: var(--text-color);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 1.5px;
    animation: pulse 1.5s ease-in-out infinite;
    user-select: none;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

:root .loading-spinner {
    border-color: var(--border-dark);
    border-top-color: var(--primary-color-dark);
}

[data-theme="dark"] .loading-spinner {
    border-color: var(--border-dark);
    border-top-color: var(--primary-color-dark);
}

[data-theme="light"] .loading-spinner {
    border-color: var(--border-light);
    border-top-color: var(--primary-color-light);
}