/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 颜色变量 - Apple风格 */
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --accent-color: #FF3B30;
    --text-primary: #FFFFFF;
    --text-secondary: #A1A1A6;
    --text-dark: #1D1D1F;
    --background-primary: #000000;
    --background-secondary: #1C1C1E;
    --background-tertiary: #2C2C2E;
    --background-card: #1C1C1E;
    --background-dark: #000000;
    --border-color: #38383A;
    --border-light: #48484A;
    --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-heavy: 0 16px 40px rgba(0, 0, 0, 0.5);
    
    /* 字体 */
    --font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* 间距 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-primary);
    overflow-x: hidden;
}

.container {
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* 主横幅区域 */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #000000 0%, #1C1C1E 50%, #2C2C2E 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    position: relative;
    z-index: 2;
}

.hero-content {
    text-align: center;
    color: white;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    background: linear-gradient(45deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 应用展示区域 */
.apps-section {
    padding: var(--spacing-xxl) 0;
    background: var(--background-primary);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xxl);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* 应用展示区域 */
.app-showcase {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xxl);
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 一洞一记应用展示 - 磨砂玻璃效果 */
.app-showcase-holebyhole {
    background: rgba(28, 28, 30, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-showcase-holebyhole::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/static/images/holebyhole/bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    opacity: 0.3;
}

/* 健身计数器应用展示 - 磨砂玻璃效果 */
.app-showcase-gymcount {
    background: rgba(28, 28, 30, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-showcase-gymcount::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/static/images/gymcount/bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    opacity: 0.3;
}

.app-showcase:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.app-showcase-header {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    position: relative;
    z-index: 1;
}

.app-icon-container {
    position: relative;
    flex-shrink: 0;
}

.app-icon {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: var(--shadow-medium);
}

.app-info {
    flex: 1;
}

.app-info .app-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.app-info .app-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
    font-size: 1rem;
}

.app-screenshots {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.screenshot-container {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease;
}

.screenshot-container:hover {
    transform: scale(1.05);
}

.screenshot-container.vertical {
    width: 200px;
    height: 400px;
}

.screenshot-container.square {
    width: 200px;
    height: 200px;
}

.screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.app-card {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.app-card:hover::before {
    transform: scaleX(1);
}

.app-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.app-card.featured {
    border: 2px solid var(--primary-color);
    background: var(--background-tertiary);
}

.app-image-container {
    position: relative;
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.app-image {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease;
}

.app-card:hover .app-image {
    transform: scale(1.05);
}

.app-badge {
    position: absolute;
    top: -8px;
    right: calc(50% - 60px);
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.app-badge.watch {
    background: var(--secondary-color);
}

.app-content {
    text-align: center;
}

.app-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.app-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.app-features {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.feature-tag {
    background: var(--background-tertiary);
    color: var(--text-secondary);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.app-actions {
    display: flex;
    justify-content: center;
}

.app-store-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.app-store-btn.primary {
    background: var(--primary-color);
    color: white;
}

.app-store-btn.secondary {
    background: var(--secondary-color);
    color: white;
}

.app-store-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.app-store-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.app-store-btn:hover::before {
    left: 100%;
}

.app-store-icon {
    width: 20px;
    height: 20px;
}

/* 关于区域 */
.about-section {
    padding: var(--spacing-xxl) 0;
    background: var(--background-secondary);
}

.about-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.7;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.skill-item {
    text-align: center;
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    background: var(--background-card);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-4px);
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.skill-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.skill-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 联系区域 */
.contact-section {
    padding: var(--spacing-xxl) 0;
    background: var(--background-dark);
    color: white;
}

.contact-content {
    text-align: center;
}

.contact-text {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: var(--spacing-xl);
}

.contact-buttons {
    display: flex;
    justify-content: center;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: #0056CC;
    transform: translateY(-2px);
}

.contact-icon {
    width: 20px;
    height: 20px;
}

/* 页脚 */
.footer {
    background: var(--background-dark);
    color: white;
    padding: var(--spacing-lg) 0;
    border-top: 1px solid #333;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-links a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .app-showcase {
        padding: var(--spacing-lg);
    }
    
    .app-showcase-header {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .app-icon {
        width: 80px;
        height: 80px;
    }
    
    .app-screenshots {
        gap: var(--spacing-md);
    }
    
    .screenshot-container.vertical {
        width: 150px;
        height: 300px;
    }
    
    .screenshot-container.square {
        width: 150px;
        height: 150px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .app-showcase {
        padding: var(--spacing-md);
    }
    
    .app-icon {
        width: 60px;
        height: 60px;
    }
    
    .app-info .app-title {
        font-size: 1.5rem;
    }
    
    .screenshot-container.vertical {
        width: 120px;
        height: 240px;
    }
    
    .screenshot-container.square {
        width: 120px;
        height: 120px;
    }
    
    .app-screenshots {
        gap: var(--spacing-sm);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-card {
    animation: fadeInUp 0.6s ease forwards;
}

.app-card:nth-child(2) {
    animation-delay: 0.2s;
}

/* 滚动行为 */
html {
    scroll-behavior: smooth;
}

/* 选择文本样式 */
::selection {
    background: var(--primary-color);
    color: white;
}

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