/* 沃尔特工作室导航系统 - 样式文件 */
:root {
    /* 亮色主题变量 */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f7fa;
    --bg-card: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --accent-color: #4a90e2;
    --accent-hover: #357abd;
    --border-color: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --success-color: #52c41a;
    --warning-color: #faad14;
    --danger-color: #f5222d;
}

/* 暗黑主题变量 */
.dark {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-card: #252525;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-light: #808080;
    --accent-color: #5b9bfc;
    --accent-hover: #7ab0ff;
    --border-color: #333333;
    --shadow-light: rgba(0, 0, 0, 0.2);
    --shadow-medium: rgba(0, 0, 0, 0.3);
    --success-color: #73d13d;
    --warning-color: #ffc53d;
    --danger-color: #ff4d4f;
}

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.logo-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 32px;
}

/* 暗黑模式开关 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* 时间区域 */
.time-area {
    margin-bottom: 20px;
}

.current-time {
    font-size: 48px;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.current-date, .weather {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.quote {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow-light);
}

.quote p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 搜索区域 */
.search-area {
    max-width: 600px;
    margin: 0 auto 40px;
}

.search-container {
    position: relative;
    margin-bottom: 20px;
}

#searchInput {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    background-color: var(--bg-card);
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

#searchInput:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

#searchBtn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

#searchBtn:hover {
    background-color: var(--accent-hover);
}

.search-engines {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.engine-btn {
    padding: 8px 16px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.engine-btn:hover, .engine-btn.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* 导航分类区域 */
.nav-categories {
    flex: 1;
}

.category {
    margin-bottom: 40px;
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 12px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

.category-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.category-title i {
    color: var(--accent-color);
    font-size: 22px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 20px 10px;
    border-radius: 12px;
    background-color: var(--bg-secondary);
    transition: all 0.3s ease;
    color: var(--text-primary);
    border: 2px solid transparent;
}

.nav-link:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.link-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background-color: var(--bg-primary);
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-link:hover .link-icon {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.link-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.link-icon i {
    font-size: 24px;
    color: var(--accent-color);
}

.nav-link:hover .link-icon i {
    color: white;
}

.link-name {
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 36px;
}

/* 底部样式 */
.footer {
    margin-top: auto;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* 底部链接圆角矩形容器样式 */
.bottom-links-container {
    display: inline-flex;
    background-color: var(--bg-secondary);
    border-radius: 25px;
    padding: 8px 15px;
    box-shadow: 0 2px 8px var(--shadow-light);
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 在移动端自适应 */
@media (max-width: 768px) {
    .bottom-links-container {
        border-radius: 20px;
        padding: 6px 12px;
        gap: 12px;
    }
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.admin-link {
    background-color: var(--accent-color);
    color: white !important;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    transition: background-color 0.3s ease;
}

.admin-link:hover {
    background-color: var(--accent-hover);
}

.copyright {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 10px;
}

.visit-stats {
    color: var(--text-light);
    font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .logo-area {
        flex-direction: column;
        gap: 20px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .current-time {
        font-size: 36px;
    }
    
    .quote {
        padding: 15px;
    }
    
    .quote p {
        font-size: 14px;
    }
    
    .category {
        padding: 20px;
    }
    
    .links-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 15px;
    }
    
    .nav-link {
        padding: 15px 10px;
    }
    
    .link-icon {
        width: 40px;
        height: 40px;
    }
    
    .link-icon img, .link-icon i {
        font-size: 20px;
    }
    
    .footer-links {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .current-time {
        font-size: 28px;
    }
    
    .links-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .nav-link {
        padding: 12px 8px;
    }
    
    .link-icon {
        width: 36px;
        height: 36px;
    }
    
    .link-icon img, .link-icon i {
        font-size: 18px;
    }
    
    .link-name {
        font-size: 12px;
    }
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category {
    animation: fadeIn 0.5s ease;
}

.category:nth-child(1) { animation-delay: 0.1s; }
.category:nth-child(2) { animation-delay: 0.2s; }
.category:nth-child(3) { animation-delay: 0.3s; }
.category:nth-child(4) { animation-delay: 0.4s; }

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* 黑白模式样式 - 增强全局效果 */
html.grayscale,
html.grayscale body,
html.grayscale * {
    filter: grayscale(100%) !important;
    -webkit-filter: grayscale(100%) !important;
    -moz-filter: grayscale(100%) !important;
    -ms-filter: grayscale(100%) !important;
    -o-filter: grayscale(100%) !important;
    transition: filter 0.3s ease !important;
    -webkit-transition: filter 0.3s ease !important;
}

/* 确保图片也应用灰度效果 */
html.grayscale img,
html.grayscale video {
    filter: grayscale(100%) !important;
    -webkit-filter: grayscale(100%) !important;
}