:root { --primary-color: #ff6b6b; --secondary-color: #4ecdc4; --accent-color: #ffd166; --background-color: #f9f9f9; --text-color: #333; --light-text: #666; --border-color: #e0e0e0; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background-color: var(--background-color); color: var(--text-color); line-height: 1.6; } .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; } main { padding: 40px 0; } section { margin-bottom: 50px; background-color: white; border-radius: 10px; padding: 30px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); } h1 { color: var(--primary-color); font-size: 2.2rem; margin-bottom: 20px; text-align: center; } h2 { color: var(--secondary-color); margin: 25px 0 15px; font-size: 1.8rem; } h3 { color: var(--accent-color); margin: 20px 0 12px; font-size: 1.4rem; } p { margin-bottom: 15px; color: var(--text-color); } a { text-decoration: none; } .highlight { background-color: var(--accent-color); padding: 2px 6px; border-radius: 3px; font-weight: 500; } .breadcrumb { margin: 20px 0; font-size: 1.0rem; color: var(--light-text); } .breadcrumb a { color: var(--primary-color); text-decoration: none; } .breadcrumb a:hover { text-decoration: underline; } .btn { display: inline-block; background-color: var(--primary-color); color: white; border: none; padding: 10px 20px; border-radius: 5px; font-size: 1rem; font-weight: 500; cursor: pointer; transition: background-color 0.3s ease; text-decoration: none; text-align: center; margin-right: 10px; margin-bottom: 10px; } .btn:hover { background-color: #ff4d4d; } .btn-secondary { background-color: var(--secondary-color); } .btn-secondary:hover { background-color: #37b0a8; } .btn-accent { background-color: var(--accent-color); color: var(--text-color); } .btn-accent:hover { background-color: #ffc14d; } .btn-outline { background-color: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); } .btn-outline:hover { background-color: var(--primary-color); color: white; } /* 导航栏基础样式 */ header { background-color: var(--background-color); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); position: sticky; height: 160px; top: 0; transition: all 0.3s ease; z-index: 1000; } /* Logo样式 */ .logo { width: 130px; height: 130px; border-radius: 50%; transition: all 0.3s ease; } /* 缩小后的header样式 */ .small-header { height: 80px !important; } .small-header #logo-img { width:70px !important; height:70px !important; } .header-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; height: 100%; min-height: 80px; } .nav-logo { display: flex; align-items: center; } .nav-logo img { /* width: 40px; height: 40px; */ margin-right: 10px; } .nav-logo span { font-size: 1.2rem; font-weight: 700; color: var(--primary-color); } /* 桌面端导航菜单样式 */ .nav-menu { display: flex; align-items: center; list-style: none; } .nav-menu li { margin-left: 30px; } .nav-menu a { text-decoration: none; color: var(--text-color); font-size: 1.15rem; font-weight: bold; transition: color 0.3s ease; position: relative; } .nav-menu a.active { color: var(--secondary-color); } .nav-menu a:hover { color: var(--primary-color); } .nav-menu a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0; background-color: var(--primary-color); transition: width 0.3s ease; } .nav-menu a:hover::after { width: 100%; } /* 下拉内容初始隐藏 */ .dropdown-menu-btn { display: none; position: absolute; background-color: var(--background-color); min-width: 200px; margin-top: 25px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); z-index: 1000; } /* 下拉菜单项样式 */ .dropdown-menu-btn a { color: var(--text-color); padding: 12px 16px; text-decoration: none; display: block; } .dropdown-menu-btn a.selected { color: var(--primary-color); } /* 鼠标悬停时显示下拉菜单 */ .dropdown-menu:hover .dropdown-menu-btn { display: block; } /* 搜索图标样式 */ .search-icon { margin-left: 20px; color: var(--text-color); font-size: 1.2rem; cursor: pointer; transition: color 0.3s ease; } .search-icon:hover { color: var(--primary-color); } /* 移动端菜单按钮样式 */ .menu-btn { display: none; background: none; border: none; font-size: 1.8rem; color: var(--text-color); cursor: pointer; } /* 移动端下拉菜单样式 */ .mobile-menu { position: absolute; top: 100%; left: 0; width: 100%; background-color: white; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); padding: 15px 20px; display: none; animation: fadeIn 0.3s ease; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .mobile-menu ul { list-style: none; } .mobile-menu li { margin: 15px 0; } .mobile-menu a { text-decoration: none; color: var(--text-color); font-weight: 600; display: block; padding: 8px 0; border-bottom: 1px solid #f0f0f0; } .mobile-menu a:hover { color: var(--primary-color); } .mobile-menu a.active { color: var(--secondary-color); } .coloring-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 25px; } .coloring-card { background-color: white; border-radius: 8px; overflow: hidden; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1); transition: all 0.3s ease; } .coloring-card:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15); } .coloring-image { aspect-ratio: 1/1; background-color: #fff; overflow: hidden; position: relative; } .coloring-image img { width: 100%; height: auto; object-fit: contain; aspect-ratio: 1; display: block; transition: transform 0.5s ease; } .coloring-card:hover .coloring-image img { transform: scale(1.05); } .coloring-content { padding: 15px; } .coloring-title { font-weight: 600; margin-bottom: 5px; color: var(--text-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .coloring-category { font-size: 0.9rem; color: var(--light-text); } .coloring-content { padding: 15px; } .coloring-title { font-weight: 600; margin-bottom: 5px; color: var(--text-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .coloring-author { font-size: 0.85rem; color: var(--light-text); margin-bottom: 3px; } .coloring-author a { color: var(--primary-color); } .coloring-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--light-text); margin-bottom: 8px; } .coloring-tags { display: flex; flex-wrap: wrap; gap: 5px; } .tag { background-color: var(--background-color); color: var(--secondary-color); padding: 3px 8px; border-radius: 15px; font-size: 0.75rem; cursor: pointer; transition: all 0.3s ease; } .tag:hover { background-color: var(--secondary-color); color: white; } /* 进度角标样式 */ .progress-badge { position: absolute; top: 0px; right: 0px; background: #FF5252; color: white; padding: 4px 8px; border-radius: 0px 8px 0px 8px; font-size: 12px; font-family: Arial, sans-serif; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); z-index: 1000; } @media (max-width: 768px) { h1 { font-size: 1.8rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.3rem; } .container { padding: 10px; } section { margin-bottom: 20px; padding: 20px; } .menu-btn { display: block; } .nav-menu { display: none; } .mobile-menu { display: none; position: static; box-shadow: none; border-top: 1px solid #f0f0f0; } .coloring-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; } } footer { background-color: var(--text-color); color: white; padding: 60px 0; margin-top: 60px; } .footer-grid { display: grid; grid-template-columns: 1fr; gap: 30px; } @media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } } .footer-logo { display: flex; align-items: center; margin-bottom: 15px; } .footer-logo img { width: 50px; height: 50px; border-radius: 50%; margin-right: 10px; } .footer-logo span { font-size: 1.2rem; font-weight: bold; } .footer-text { color: #999; font-size: 0.9rem; } .footer-title { font-size: 1.2rem; font-weight: 600; margin: 10px 0 20px 0; color: white; } .footer-links { list-style: none; margin: 0; padding: 0; } .footer-links li { margin-bottom: 10px; } .footer-links a { color: #999; } .footer-links a:hover { color: var(--primary); } .footer-bottom { border-top: 1px solid #444; margin-top: 40px; padding-top: 20px; display: flex; flex-direction: column; align-items: center; } @media (min-width: 768px) { .footer-bottom { flex-direction: row; justify-content: space-between; } } .copyright { color: #777; font-size: 0.8rem; margin-bottom: 15px; } @media (min-width: 768px) { .copyright { margin-bottom: 0; } } .footer-social { display: flex; gap: 15px; } .footer-social a { color: #999; } .footer-social a:hover { color: var(--primary-color); } .footer-social img { width: 20px; }