/* ================================================
   Modern CSS - oh-template 项目介绍模板
   现代化风格，参考淘宝商品页设计
   ================================================ */

/* CSS Variables */
:root {
    --primary-dark: #0a0a0f;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --accent: #667eea;
    --accent-hover: #764ba2;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 60px rgba(102, 126, 234, 0.3);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--primary-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* ================================================
   Navigation - 玻璃态导航栏
   ================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.navbar-menu a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.navbar-menu a:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.navbar-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* Mobile Menu */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        padding: 1rem;
        gap: 0.5rem;
        border-bottom: 1px solid var(--glass-border);
        display: none;
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-menu a {
        padding: 1rem;
    }
}

/* ================================================
   Hero Section - 首屏展示区
   ================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 2rem 80px;
    background: var(--primary-dark);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-title span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    color: white;
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--glass-border);
    color: var(--text-primary);
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.hero-image {
    position: relative;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-image img {
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
}

.hero-image::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: var(--primary-gradient);
    opacity: 0.2;
    border-radius: var(--radius);
    filter: blur(60px);
    z-index: -1;
}

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

@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 1;
    }

    .hero-image {
        order: 0;
    }

    .hero-description {
        margin: 0 auto 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }
}

/* ================================================
   Section Styles - 通用区块
   ================================================ */
.section {
    padding: 100px 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.section-title span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ================================================
   Features Section - 特性说明
   ================================================ */
.features {
    background: linear-gradient(180deg, var(--primary-dark) 0%, rgba(102, 126, 234, 0.05) 100%);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* 单栏模式：只有1-2条说明时居中显示更宽的卡片 */
.features-grid.cols-1 {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

.features-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
    margin: 0 auto;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-text {
    color: var(--text-secondary);
    line-height: 1.7;
}

.feature-text ul {
    margin: 0.5rem 0 0 1.2rem;
    padding: 0;
}

.feature-text ul li {
    margin: 0.3rem 0;
}

/* ================================================
   Technical Specs Section - 技术指标
   ================================================ */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.spec-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 1.25rem 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.spec-item:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.spec-item span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ================================================
   Projects Section - 项目展示（淘宝风格）
   ================================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.project-media {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.project-media img,
.project-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-media img,
.project-card:hover .project-media video {
    transform: scale(1.05);
}

.project-media .play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .play-btn {
    opacity: 1;
}

.project-media .play-btn svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
    margin-left: 4px;
}

.project-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.375rem 0.875rem;
    background: var(--primary-gradient);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--accent);
    font-weight: 500;
}

.project-link svg {
    width: 16px;
    height: 16px;
    transition: var(--transition);
}

.project-card:hover .project-link svg {
    transform: translateX(4px);
}

@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================
   FAQ Section - 常见问题
   ================================================ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--glass-bg);
}

.faq-question svg {
    width: 20px;
    height: 20px;
    transition: var(--transition);
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 1.5rem 1.25rem;
    max-height: 500px;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ================================================
   Footer - 页脚
   ================================================ */
.footer {
    background: rgba(5, 5, 10, 0.95);
    border-top: 1px solid var(--glass-border);
    padding: 40px 2rem 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand {
    max-width: 150px;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}

.footer-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.875rem;
}

.footer-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-links img,
.footer-links .QR-img {
    max-width: 80px;
    max-height: 80px;
    border-radius: 6px;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.footer-social a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.footer-social svg {
    width: 14px;
    height: 14px;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-copyright a {
    color: var(--text-secondary);
}

.footer-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-badges img {
    height: 20px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================
   Utilities
   ================================================ */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ================================================
   Caption Styles
   ================================================ */
.caption {
    margin-top: 1rem;
}

.caption h5 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.caption h5 span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.caption p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* ================================================
   Project Lightbox - 项目大图预览
   ================================================ */
.project-media {
    cursor: zoom-in;
}

.project-zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.project-zoom-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.project-card:hover .project-zoom-icon {
    opacity: 1;
}

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 5, 10, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.lightbox-close:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: rotate(90deg);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.lightbox-nav:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav svg {
    width: 28px;
    height: 28px;
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    width: 100%;
    max-height: 85vh;
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-media {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 400px;
}

.lightbox-media img,
.lightbox-media video {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 0;
}

.lightbox-counter {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 500;
}

.lightbox-title {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lightbox-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.lightbox-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.lightbox-btn {
    align-self: flex-start;
}

@media (max-width: 968px) {
    .lightbox-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    .lightbox-media {
        min-height: 250px;
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .lightbox-prev {
        left: 0.75rem;
    }

    .lightbox-next {
        right: 0.75rem;
    }

    .lightbox-nav svg {
        width: 20px;
        height: 20px;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }

    .lightbox-close svg {
        width: 20px;
        height: 20px;
    }

    .lightbox-title {
        font-size: 1.5rem;
    }

    .lightbox-overlay {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .lightbox-content {
        gap: 1rem;
    }

    .lightbox-title {
        font-size: 1.25rem;
    }

    .lightbox-subtitle {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }

    .lightbox-description {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }

    .lightbox-btn {
        width: 100%;
        justify-content: center;
    }
}
