/* ============================================
   Risun 网站导航 - 样式文件
   ============================================ */

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

/* 页面主体 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* 背景装饰 */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* 容器 */
.container {
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* 头部区域 */
.header {
    text-align: center;
    margin-bottom: 80px;
    color: white;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    font-weight: 300;
    letter-spacing: 1px;
}

/* 导航网格 */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

/* 导航卡片 */
.nav-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 45px 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: white;
    display: block;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out backwards;
}

/* 卡片动画延迟 */
.nav-card:nth-child(1) { animation-delay: 0.1s; }
.nav-card:nth-child(2) { animation-delay: 0.2s; }
.nav-card:nth-child(3) { animation-delay: 0.3s; }
.nav-card:nth-child(4) { animation-delay: 0.4s; }
.nav-card:nth-child(5) { animation-delay: 0.5s; }

/* 卡片扫光效果 */
.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.nav-card:hover::before {
    left: 100%;
}

/* 卡片悬浮效果 */
.nav-card:hover {
    transform: translateY(-12px) scale(1.02);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(255, 255, 255, 0.05);
}

/* 键盘焦点指示器 */
.nav-card:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 4px;
    border-radius: 20px;
}

/* 导航图标 */
.nav-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: block;
    transition: transform 0.3s ease;
}

.nav-card:hover .nav-icon {
    transform: scale(1.15) rotate(5deg);
}

/* 导航标题 */
.nav-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

/* 导航URL */
.nav-url {
    font-size: 0.85rem;
    opacity: 0.7;
    font-weight: 300;
    word-break: break-all;
}

/* 页脚 */
.footer {
    text-align: center;
    margin-top: 80px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    animation: fadeIn 1s ease-out 0.6s backwards;
}

/* ============================================
   动画定义
   ============================================ */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ============================================
   可访问性与基础设置
   ============================================ */

html {
    scroll-behavior: smooth;
}

/* ============================================
   响应式设计
   ============================================ */

/* 平板设备 */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 移动设备 */
@media (max-width: 768px) {
    .logo {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .nav-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .nav-card {
        padding: 35px 25px;
    }

    .nav-icon {
        font-size: 3rem;
    }

    .nav-title {
        font-size: 1.4rem;
    }
}
