/* ============================================
   HZ7142's World - Apple-Inspired Design System
   ============================================ */

/* 导入字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* Colors */
    --color-black: #000000;
    --color-white: #ffffff;
    --color-light-gray: #f5f5f7;
    --color-near-black: #1d1d1f;
    --color-apple-blue: #0071e3;
    --color-link-blue: #0066cc;
    --color-text-secondary: rgba(0, 0, 0, 0.8);
    --color-text-tertiary: rgba(0, 0, 0, 0.48);
    
    /* Dark section colors */
    --color-dark-surface: #272729;
    --color-dark-surface-2: #262628;
    --color-bright-blue: #2997ff;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 24px;
    --space-2xl: 32px;
    --space-3xl: 48px;
    --space-4xl: 64px;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-caption: 12px;
    --font-size-body: 17px;
    --font-size-title: 21px;
    --font-size-heading: 28px;
    --font-size-hero: 40px;
    
    /* Effects */
    --shadow-card: 0 3px 20px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 8px 40px rgba(0, 0, 0, 0.12);
    --nav-glass: rgba(0, 0, 0, 0.8);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body,
html {
    visibility: hidden;
    user-select: none;
    background: var(--color-light-gray);
    overscroll-behavior: none;
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--color-near-black);
    line-height: 1.47;
    letter-spacing: -0.022em;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 { font-size: 32px; }
h2 { font-size: var(--font-size-heading); }
h3 { font-size: var(--font-size-title); }

p {
    font-size: var(--font-size-body);
    line-height: 1.6;
    color: var(--color-text-secondary);
}

a {
    color: var(--color-link-blue);
    text-decoration: none;
    transition: all 0.2s ease;
}

/* ============================================
   Container
   ============================================ */
.container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 var(--space-2xl);
}

/* ============================================
   Launch Animation
   ============================================ */
.intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

.intro-overlay .top,
.intro-overlay .bottom {
    position: absolute;
    width: 100%;
    height: 50vh;
}

.intro-overlay .top { top: 0; }
.intro-overlay .bottom { bottom: 0; }

.intro-overlay .top .overlay-top,
.intro-overlay .bottom .overlay-bottom {
    position: absolute;
    height: 100%;
    width: 33.333%;
    background: var(--color-black);
}

.intro-overlay .top .overlay-top { bottom: 0; }
.intro-overlay .bottom .overlay-bottom { top: 0; }

.intro-overlay .top .overlay-top:nth-child(1) { left: 0; }
.intro-overlay .top .overlay-top:nth-child(2) { left: 33.333%; }
.intro-overlay .top .overlay-top:nth-child(3) { left: 66.666%; }

.intro-overlay .bottom .overlay-bottom:nth-child(1) { left: 0; }
.intro-overlay .bottom .overlay-bottom:nth-child(2) { left: 33.333%; }
.intro-overlay .bottom .overlay-bottom:nth-child(3) { left: 66.666%; }

@media (max-width: 768px) {
    .intro-overlay .top .overlay-top,
    .intro-overlay .bottom .overlay-bottom {
        width: 100%;
    }
    .intro-overlay .top .overlay-top:nth-child(2),
    .intro-overlay .top .overlay-top:nth-child(3),
    .intro-overlay .bottom .overlay-bottom:nth-child(2),
    .intro-overlay .bottom .overlay-bottom:nth-child(3) {
        display: none;
    }
}

/* ============================================
   Main App
   ============================================ */
.App {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main {
    flex: 1;
    padding: var(--space-4xl) 0;
}

/* =============================================
   Navigation Header
   ============================================ */
.header {
    background: var(--nav-glass);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 52px;
}

.header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-white);
    letter-spacing: -0.02em;
}

.header h1 a {
    color: var(--color-white);
    text-decoration: none;
    cursor: default;
}

.header h1 a:hover {
    cursor: default;
}

/* Header click hint */
.header-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}



/* ============================================
   Section Styles
   ============================================ */
.section {
    margin-bottom: var(--space-4xl);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section header */
.section-header {
    margin-bottom: var(--space-xl);
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--font-size-heading);
    font-weight: 600;
    color: var(--color-near-black);
}

.section-header h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 28px;
    background: linear-gradient(180deg, var(--color-apple-blue), var(--color-bright-blue));
    border-radius: 2px;
}

/* Dark section variant */
.section.dark {
    background: var(--color-black);
    padding: var(--space-4xl) 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
}

.section.dark .section-header h2 {
    color: var(--color-white);
}

.section.dark p,
.section.dark pre {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   Card Styles
   ============================================ */
.card {
    background: var(--color-white);
    border-radius: var(--border-radius-md);
    padding: var(--space-xl);
    box-shadow: var(--shadow-card);
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

.card-grid {
    display: grid;
    gap: var(--space-lg);
}

/* ============================================
   Intro Section
   ============================================ */
.intro .card {
    position: relative;
    overflow: hidden;
}

.intro .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-apple-blue), var(--color-bright-blue));
}

.intro p {
    font-size: 18px;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

/* ============================================
   Contact Section
   ============================================ */
.contact pre {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-secondary);
    white-space: pre-wrap;
    background: var(--color-white);
    padding: var(--space-xl);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-card);
}

/* ============================================
   Link Lists
   ============================================ */
.link-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.link-list li {
    margin: 0;
}

.link-list a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-white);
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    color: var(--color-link-blue);
    box-shadow: var(--shadow-card);
    transition: all 0.25s ease;
}

.link-list a:hover {
    background: var(--color-apple-blue);
    color: var(--color-white);
    transform: translateX(4px);
    box-shadow: var(--shadow-card-hover);
}

.link-list a::before {
    content: '→';
    font-size: 14px;
    transition: transform 0.2s ease;
}

.link-list a:hover::before {
    transform: translateX(2px);
}

/* ============================================
   Articles Section
   ============================================ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.article-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-card {
    background: var(--color-white);
    border-radius: var(--border-radius-md);
    padding: var(--space-xl);
    box-shadow: var(--shadow-card);
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card-link:hover .article-card {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
}

.article-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-near-black);
    margin-bottom: var(--space-md);
    line-height: 1.3;
}

.article-card h3:hover {
    color: var(--color-apple-blue);
}

.article-card p {
    font-size: 14px;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-lg);
    flex-grow: 1;
}

.article-card .meta {
    font-size: 12px;
    color: var(--color-text-tertiary);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* ============================================
   Article Detail Page
   ============================================ */
.article-card-full {
    max-width: 720px;
}

.article-card-full h2 {
    font-size: 28px;
    margin-bottom: var(--space-md);
    color: var(--color-near-black);
}

.article-meta {
    font-size: 14px;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.article-content {
    font-size: 17px;
    line-height: 1.75;
    color: var(--color-text-secondary);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-white);
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    color: var(--color-link-blue);
    box-shadow: var(--shadow-card);
    transition: all 0.25s ease;
}

.back-link:hover {
    background: var(--color-apple-blue);
    color: var(--color-white);
    transform: translateX(-4px);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--color-white);
    padding: var(--space-2xl) 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer .container {
    text-align: center;
}

.footer p {
    margin: 0;
    font-size: 13px;
    color: var(--color-text-tertiary);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-lg);
    }
    
    .main {
        padding: var(--space-2xl) 0;
    }
    
    .section {
        margin-bottom: var(--space-2xl);
    }
    
    .section.dark {
        padding: var(--space-2xl) 0;
    }
    
    h1 { font-size: 26px; }
    h2 { font-size: 22px; }
    
    .section-header h2::before {
        height: 22px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: var(--space-lg);
    }
    
    .intro p {
        font-size: 16px;
    }
    
    .contact pre {
        font-size: 14px;
        padding: var(--space-lg);
    }
    
    .article-card-full h2 {
        font-size: 22px;
    }
}

/* ============================================
   Accessibility
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-apple-blue);
    outline-offset: 2px;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}