/* 苹果官网风格增强样式 */

/* 全局优化 */
:root {
    --apple-spacing-unit: 8px;
    --apple-max-width: 1024px;
    --apple-section-padding: 80px 22px;
}

/* 更优雅的间距系统 */
.section {
    padding: var(--apple-section-padding);
    max-width: var(--apple-max-width);
    margin: 0 auto;
}

/* 苹果风格的Hero区域 */
.hero-section {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 22px 80px;
}

.hero-title {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.015em;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: clamp(21px, 3vw, 28px);
    font-weight: 400;
    line-height: 1.14286;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* 更精致的卡片设计 */
.card,
.feature-item,
.support-item,
.project-item {
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card:hover,
.feature-item:hover,
.support-item:hover,
.project-item:hover {
    transform: translateY(-8px) scale(1.02);
}

/* 苹果风格的按钮 */
.btn,
.button {
    border-radius: 22px;
    font-weight: 400;
    letter-spacing: -0.01em;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.btn::before,
.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before,
.button:hover::before {
    width: 300px;
    height: 300px;
}

/* 更优雅的导航栏 */
.nav-container {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-container.scrolled {
    background: rgba(251, 251, 253, 0.95);
    backdrop-filter: saturate(180%) blur(30px);
    -webkit-backdrop-filter: saturate(180%) blur(30px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

/* 防止PC导航文字被挤成两行（中文断字） */
.main-nav {
    gap: 14px;
}

/* main-nav 的三个子块：品牌、菜单、右侧图标 */
.nav-menu {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
}

.nav-link {
    white-space: nowrap;
    word-break: keep-all; /* 中文不要逐字断行 */
    flex-shrink: 0;
}

/* 导航右侧图标按钮（管理员 / 稀土小游戏） */
.nav-login {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-login .admin-login-btn,
.nav-login .nav-icon-btn {
    color: #666;
    text-decoration: none;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-login .admin-login-btn:hover,
.nav-login .nav-icon-btn:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.05);
}

.nav-login .admin-login-btn:focus-visible,
.nav-login .nav-icon-btn:focus-visible {
    outline: 2px solid rgba(0, 113, 227, 0.55);
    outline-offset: 2px;
}

.nav-login .fas {
    font-size: 18px;
}

[data-theme="dark"] .nav-login .admin-login-btn,
[data-theme="dark"] .nav-login .nav-icon-btn {
    color: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .nav-login .admin-login-btn:hover,
[data-theme="dark"] .nav-login .nav-icon-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

/* 更精致的图片展示 */
img {
    border-radius: 12px;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card img:hover,
.feature-item img:hover,
.support-item img:hover,
.project-item img:hover {
    transform: scale(1.05);
}

/* 苹果风格的分割线 */
.section-divider {
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(0, 0, 0, 0.1) 20%,
        rgba(0, 0, 0, 0.1) 80%,
        transparent
    );
    margin: 80px 0;
    border: none;
}

[data-theme="dark"] .section-divider {
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.1) 20%,
        rgba(255, 255, 255, 0.1) 80%,
        transparent
    );
}

/* 更优雅的文本排版 */
.text-content {
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* 苹果风格的网格布局 */
.grid {
    display: grid;
    gap: 20px;
}

.grid-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* 响应式优化 */
@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
        padding: 80px 16px 60px;
    }
    
    .section {
        padding: 60px 16px;
    }
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
