/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #0891b2;
    --accent-color: #f59e0b;
    --bg-color: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0fdf4 100%);
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-bg-hover: rgba(255, 255, 255, 1);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: rgba(148, 163, 184, 0.2);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: white;
    box-shadow: var(--shadow-md);
    letter-spacing: -0.5px;
    overflow: hidden;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text-wrap {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 顶部栏容器 */
.header-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* 搜索框样�?*/
.search-box {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 5px 5px 5px 16px;
    width: 100%;
    max-width: 400px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 15px;
    padding: 10px 0;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    width: 38px;
    height: 38px;
    background: var(--primary-color);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

/* 万年历小部件 */
.calendar-widget {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 10px;
    border: 1px solid #93c5fd;
    min-width: 160px;
}

.calendar-date {
    font-size: 15px;
    font-weight: 700;
    color: #1e40af;
}

.calendar-lunar {
    font-size: 13px;
    color: #3b82f6;
    font-weight: 500;
}

/* 日期时间（旧版兼容） */
.datetime {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 12px;
}

.datetime .solar-date {
    color: var(--text-primary);
    font-weight: 600;
}

.datetime .lunar-date {
    color: #dc2626;
    font-weight: 600;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid #fecaca;
}

.datetime .time {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 16px;
    font-family: 'Courier New', monospace;
}

/* 主要内容区域 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 导航区块 */
.nav-section {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.nav-section:nth-child(1) { animation-delay: 0.05s; }
.nav-section:nth-child(2) { animation-delay: 0.1s; }
.nav-section:nth-child(3) { animation-delay: 0.15s; }
.nav-section:nth-child(4) { animation-delay: 0.2s; }
.nav-section:nth-child(5) { animation-delay: 0.25s; }
.nav-section:nth-child(6) { animation-delay: 0.3s; }
.nav-section:nth-child(7) { animation-delay: 0.35s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    padding-left: 2px;
}

.title-icon {
    font-size: 18px;
}

/* 导航网格 */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.nav-grid.large {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* 导航卡片 */
.nav-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.nav-card:hover {
    background: var(--card-bg-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.2);
}

.nav-card.large-card {
    flex-direction: row;
    justify-content: flex-start;
    padding: 20px 24px;
    gap: 16px;
}

/* 管家婆软件网格 - 紧凑布局 */
.gjp-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.gjp-card {
    flex-direction: row;
    justify-content: flex-start;
    padding: 12px 14px;
    gap: 10px;
}

.gjp-card .card-icon {
    width: 40px;
    height: 40px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 10px;
    flex-shrink: 0;
}

.gjp-card .card-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.gjp-card .card-content h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gjp-card .card-content p {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 其他软件网格 */
.other-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.other-card {
    flex-direction: row;
    justify-content: flex-start;
    padding: 14px 16px;
    gap: 12px;
}

.other-card .card-icon {
    width: 44px;
    height: 44px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    flex-shrink: 0;
}

.other-card .card-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.other-card .card-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.other-card .card-content p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nav-card.large-card .card-icon {
    width: 56px;
    height: 56px;
    font-size: 22px;
}

.nav-card:hover .card-icon {
    transform: scale(1.08);
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
    text-align: center;
}

.nav-card.large-card .card-name {
    text-align: left;
    font-size: 16px;
}

.card-desc {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: left;
}

/* 各网站图标颜�?*/
.x5 { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); }
.guanjia { background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%); }
.qianniu { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
.ishop { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); }
.ishop-doc { background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%); }
.ishop-promo { background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%); }
.ishop-service { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.d9 { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); }

.sixun { background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%); }
.sixun-pay { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
.zhifubao { background: linear-gradient(135deg, #1677ff 0%, #0066cc 100%); }
.weixin-pay { background: linear-gradient(135deg, #07c160 0%, #05a350 100%); }
.yunshanfu { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.etc { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); }

.knowledge { background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%); }
.qianniu-kb { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
.duihua { background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%); }
.caigou { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); }
.video { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.cert { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }

.value { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); }
.recharge { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
.card { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); }
.member { background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%); }
.team { background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%); }
.invoice { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }

.baidu { background: linear-gradient(135deg, #2932e1 0%, #1a1a8c 100%); }
.translate { background: linear-gradient(135deg, #4285f4 0%, #34a853 100%); }
.deepseek { background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%); }
.train { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.map { background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%); }
.pdf { background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%); }

.taiping { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.tengxun { background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%); }
.wechat { background: linear-gradient(135deg, #07c160 0%, #05a350 100%); }
.wechat-merchant { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.hr { background: linear-gradient(135deg, #00b578 0%, #009160 100%); }
.tongniu { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }

/* 页脚 */
.footer {
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-links .divider {
    color: var(--border-color);
    font-size: 13px;
}

.copyright {
    color: var(--text-secondary);
    font-size: 13px;
}

/* 响应式设�?*/
@media (max-width: 1024px) {
    .nav-grid.large {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .header-right {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .datetime {
        font-size: 13px;
    }
    
    .nav-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
    
    .nav-grid.large {
        grid-template-columns: 1fr;
    }
    
    .nav-card {
        padding: 16px 10px;
    }
    
    .nav-card.large-card {
        padding: 16px 18px;
    }
    
    .card-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .nav-card.large-card .card-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .card-name {
        font-size: 13px;
    }
    
    .nav-card.large-card .card-name {
        font-size: 15px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 6px;
    }
    
    .footer-links .divider {
        display: none;
    }
}

@media (max-width: 480px) {
    .nav-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .logo-text {
        font-size: 22px;
    }
    
    .logo-subtitle {
        font-size: 12px;
    }
    
    .logo-icon {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}

/* 搜索高亮效果 */
.nav-card.hidden {
    display: none;
}

.nav-card.highlight {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* 核心平台区块特殊样式 */
.nav-section.featured {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(8, 145, 178, 0.05) 100%);
    border-radius: 14px;
    padding: 16px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.nav-section.featured .section-title {
    font-size: 20px;
    color: var(--primary-color);
}

/* 滚动条美�?*/
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* ���� */
.nav {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.nav-link {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.nav-link.active {
    color: white;
    background: var(--primary-color);
}

/* ������ */
.search-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.search-bar .search-box {
    flex: 1;
    max-width: 400px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px 15px;
    }
    
    .header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }
    
    .nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .nav-link {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-bar .search-box {
        max-width: 100%;
    }
    
    /* 顶部栏移动端优化 */
    .header-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .header-bar .search-box {
        max-width: 100%;
    }
    
    .calendar-widget {
        width: 100%;
        min-width: auto;
    }
    
    /* 品牌展示区移动端 */
    .brand-showcase {
        padding: 25px 15px;
        margin-bottom: 20px;
    }
    
    .brand-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .brand-logo {
        width: 90px;
        height: 90px;
        font-size: 24px;
        overflow: hidden;
        border-radius: 20px;
        border: 2px solid rgba(255,255,255,0.3);
        box-shadow: 
            0 10px 30px rgba(0,0,0,0.2),
            inset 0 1px 0 rgba(255,255,255,0.5);
    }
    
    .brand-logo img {
        width: 80%;
        height: 80%;
        object-fit: contain;
        filter: drop-shadow(0 2px 6px rgba(0,0,0,0.1));
    }
    
    .brand-info h1 {
        font-size: 24px;
    }
    
    .brand-info .slogan {
        font-size: 13px;
    }
    
    .brand-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 11px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .logo-text {
        font-size: 20px;
    }
    
    .logo-subtitle {
        font-size: 11px;
    }
    
    .logo-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .nav-link {
        padding: 4px 8px;
        font-size: 11px;
    }
}
