/* General styling and theming variables remain unchanged */
:root {
    --background-color: #121212;
    --header-footer-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --link-color: #007AFF;
    --link-hover-color: #66a3ff;
    --resource-bg: #292929;
    --resource-hover-bg: #333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 0px; /* Ensure there's space for the footer */
    justify-content: space-between; /* 让内容和页脚保持适当距离 */
}

#app {
    flex: 1;
    flex-grow: 1; /* 确保内容占据剩余空间 */
}

nav {
    display: flex;
    justify-content: center;
    background-color: var(--header-footer-bg);
    padding: 15px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 15px;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: var(--link-hover-color);
}

.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.resources-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.resource-item {
    background-color: var(--resource-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.resource-item:hover {
    background-color: var(--resource-hover-bg);
    transform: translateY(-3px);
}

.resource-item h4, .resource-item p, .resource-item a {
    margin: 0;
    font-size: 16px;
}

.resource-item a {
    color: var(--link-color);
    text-decoration: none;
    margin-top: 10px;
    display: inline-block;
}

.resource-item a:hover {
    color: var(--link-hover-color);
}

.theme-toggle {
    position: absolute; /* 绝对定位相对于父容器 */
    top: 15px;
    right: 15px;
    background: var(--header-footer-bg);
    border: none;
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.theme-toggle:hover {
    background-color: #333;
}

footer {
    position: relative; /* 改为relative或移除position */
    background-color: var(--header-footer-bg);
    text-align: center;
    padding: 20px 0px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    width: 100%;
    z-index: 10;
    clear: both;
}

.disclaimer {
    font-size: 12px;
    color: #bbb;
    line-height: 1.4;
    margin: 0;
    position: relative; /* 改为相对定位，随页面内容流动 */
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--header-footer-bg);
    text-align: center;
    padding: 10px 0;
    z-index: 10;
    opacity: 1; /* 默认显示 */
}

.show-disclaimer {
    opacity: 1;
}

footer p {
    font-size: 14px;
    color: var(--text-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--link-color);
    text-decoration: none;
    margin: 0 10px;
    padding: 5px;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--link-hover-color);
}

.footer-copyright p {
    margin: 5px 0;
    font-size: 12px;
}

.footer-copyright a {
    color: var(--link-color);
    text-decoration: none;
}

.footer-copyright a:hover {
    color: var(--link-hover-color);
}

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .resource-item {
        padding: 15px;
    }
    
    .footer-links {
        display: block;
    }

    .footer-links a {
        display: block;
        margin: 5px 0;
    }
}

header {
    text-align: center;
    padding: 20px;
    background-color: var(--header-footer-bg);
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 2.5rem;
    margin: 0;
}
