/* 全局样式 - Apple Design Aesthetic */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4D7C6F;
    --secondary-color: #F0E6D2;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --background: #FFF9E6;
    --background-secondary: #FFF5D6;
    --border-radius: 12px;
    --border-radius-large: 20px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(to bottom, #f9f5ed 0%, #ffffff 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 导航栏 */
.navbar {
    background: #f9f5ec;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    min-height: 44px;
}

.nav-brand {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    letter-spacing: -0.02em;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.brand-link:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
}

.btn-recharge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #60867a;
    color: #fff;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    letter-spacing: -0.01em;
}

.btn-recharge:hover {
    background: #527265;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(96, 134, 122, 0.3);
}

/* 区块 */
.section {
    padding: 100px 24px;
}

#tools {
    padding-top: 120px;
}

.section-title {
    text-align: center;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.section-description {
    text-align: center;
    font-size: 21px;
    color: var(--text-secondary);
    margin-bottom: 60px;
    letter-spacing: -0.01em;
}

/* 工具卡片网格 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.tool-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--border-radius-large);
    padding: 32px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(77, 124, 111, 0.03) 0%, rgba(240, 230, 210, 0.03) 100%);
    opacity: 0;
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(77, 124, 111, 0.2);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-icon-wrapper {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #5a8f7f 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.tool-icon {
    color: #fff;
    font-size: 28px;
}

.tool-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.tool-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.tool-arrow {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.tool-arrow .material-icons {
    font-size: 20px;
    transition: var(--transition);
}

.tool-card:hover .tool-arrow .material-icons {
    transform: translateX(4px);
}

/* 页脚 */
.footer {
    background: #f9f5ec;
    color: var(--text-primary);
    padding: 80px 24px 24px;
    position: relative;
    overflow: hidden;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-about {
    max-width: 400px;
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.footer-description {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(77, 124, 111, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: var(--primary-color);
    position: relative;
}

.social-link:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

.qrcode-trigger {
    position: relative;
}

.qrcode-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: #fff;
    padding: 16px;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 100;
    min-width: 200px;
    text-align: center;
}

.qrcode-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: #fff;
}

.qrcode-trigger:hover .qrcode-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(12px);
}

.qrcode-tooltip img {
    width: 160px;
    height: 160px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.qrcode-tooltip p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.social-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.footer-copyright {
    font-size: 12px;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-link:hover {
    color: var(--primary-color);
    padding-left: 4px;
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.footer-avatar-column {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-avatar-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(77, 124, 111, 0.2);
    position: relative;
    z-index: 2;
}

.footer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-decoration {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.3;
}

.avatar-decoration-1 {
    width: 20px;
    height: 20px;
    top: 10px;
    left: 20px;
    animation: float 3s ease-in-out infinite;
}

.avatar-decoration-2 {
    width: 30px;
    height: 30px;
    bottom: 20px;
    right: 10px;
    animation: float 4s ease-in-out infinite 0.5s;
}

.avatar-decoration-3 {
    width: 15px;
    height: 15px;
    top: 30px;
    right: 15px;
    animation: float 3.5s ease-in-out infinite 1s;
}

.avatar-decoration-4 {
    width: 25px;
    height: 25px;
    bottom: 30px;
    left: 10px;
    animation: float 4.5s ease-in-out infinite 1.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.footer-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 40px 0 24px;
}

.footer-beian {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.footer-beian a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-beian a:hover {
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    #tools {
        padding-top: 100px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-about {
        max-width: 100%;
    }

    .footer-avatar-column {
        order: -1;
    }

    .section {
        padding: 60px 24px;
    }

    .section-title {
        font-size: 36px;
    }

    .section-description {
        font-size: 17px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 32px;
    }

    .section-title {
        font-size: 28px;
    }

    .tool-card {
        padding: 24px;
    }
}

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

/* 选中文本样式 */
::selection {
    background: var(--primary-color);
    color: #fff;
}

::-moz-selection {
    background: var(--primary-color);
    color: #fff;
}

/* 加载占位符 */
.loading-placeholder {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(77, 124, 111, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

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

.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 16px;
}
