/* Layout Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    position: relative;
    overflow-x: hidden;
    background: var(--bg-primary);
    min-height: 100vh;
    transition: background-color 0.3s ease;
}

/* Background Decoration Shapes */
.bg-shape {
    position: fixed;
    z-index: -1;
    pointer-events: none;
}

.bg-shape-1 {
    top: -10%;
    left: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(184, 242, 230, 0.4) 0%, transparent 70%);
    filter: blur(80px);
}

.bg-shape-2 {
    bottom: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(208, 225, 230, 0.3) 0%, transparent 70%);
    filter: blur(80px);
}

/* Site Structure */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.site-branding-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-title-link {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: -0.02em;
}

.site-title-link:hover {
    color: var(--color-brand);
}

.site-description-inline {
    font-size: 0.8125rem;
    color: var(--color-secondary);
    font-weight: 500;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

/* Header Search */
.header-search {
    flex-shrink: 0;
}

.header-search form,
.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-search input[type="search"],
.search-field {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-secondary);
    font-size: 0.875rem;
    width: 200px;
    transition: all 0.2s;
    color: var(--color-primary);
}

.header-search input[type="search"]:focus,
.search-field:focus {
    outline: none;
    border-color: var(--color-brand);
    width: 250px;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.header-search button,
.search-submit {
    padding: 0.5rem 1rem;
    background: var(--color-brand);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.header-search button:hover,
.search-submit:hover {
    transform: scale(1.05);
    background: var(--color-brand-dark);
}

/* Main Content */
.site-main {
    flex: 1;
    padding: 2rem 0;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Footer */
.site-footer {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 0;
    margin-top: auto;
    text-align: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-stats {
    margin-bottom: 1rem;
}

.runtime-display {
    font-size: 0.9375rem;
    color: var(--color-secondary);
    font-weight: 500;
}

.site-info {
    color: var(--color-secondary);
    font-size: 0.875rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.site-info p {
    margin: 0;
}

.site-info a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.site-info a:hover {
    color: var(--color-brand);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        /* 防止iOS缩放 */
        overflow-x: hidden;
    }

    .header-container {
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }

    .site-branding-left {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
        width: 100%;
    }

    .site-title-link {
        font-size: 1.125rem;
    }

    .site-description-inline {
        padding-left: 0;
        border-left: none;
        font-size: 0.75rem;
    }

    .header-search {
        width: 100%;
        order: 3;
    }

    .header-search form,
    .search-form {
        width: 100%;
    }

    .header-search input[type="search"],
    .search-field {
        flex: 1;
        width: 100%;
        font-size: 16px;
    }

    .header-search input[type="search"]:focus,
    .search-field:focus {
        width: 100%;
    }

    .header-search button,
    .search-submit {
        min-width: 80px;
        min-height: 44px;
        padding: 0.6rem 1rem;
    }

    .site-main {
        padding: 1.5rem 0;
    }

    .container,
    .site-main {
        max-width: 100vw;
        overflow-x: hidden;
        padding: 0 1rem;
    }

    .bg-shape-1,
    .bg-shape-2 {
        width: 300px;
        height: 300px;
    }

    .footer-container {
        padding: 0 1rem;
    }

    .runtime-display {
        font-size: 0.875rem;
    }

    .site-info {
        font-size: 0.8125rem;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-container {
        padding: 0.625rem 1.5rem;
    }

    .site-main {
        padding: 1.75rem 0;
    }

    .container {
        padding: 0 1.25rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {

    a,
    button,
    input[type="submit"],
    .search-submit {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 3rem 2rem;
    margin: 0 auto 3rem;
    max-width: 900px;
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--color-secondary);
    min-height: 1.5em;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Typewriter Cursor Animation */
.typewriter-cursor {
    display: inline-block;
    margin-left: 4px;
    animation: blink 1s step-end infinite;
    color: var(--color-brand);
    font-weight: 700;
    vertical-align: middle;
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1.5rem;
        margin: 0 1rem 2rem;
        width: auto;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-description {
        font-size: 1rem;
    }
}