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

:root {
    --primary: #1a56db;
    --primary-dark: #1340a8;
    --primary-light: #e8eefb;
    --accent: #0ea5e9;
    --dark: #0f172a;
    --gray-900: #1e293b;
    --gray-700: #334155;
    --gray-500: #64748b;
    --gray-300: #cbd5e1;
    --gray-100: #f1f5f9;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--gray-700);
    line-height: 1.7;
    background: var(--white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

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

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: box-shadow var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    overflow: hidden;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    padding: 8px 18px;
    font-size: 0.95rem;
    color: var(--gray-700);
    border-radius: 8px;
    transition: all var(--transition);
}

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

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

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a6e 50%, #1a56db 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: rgba(255,255,255,0.85);
    margin-bottom: 20px;
    font-weight: 400;
}

.hero-desc {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.65);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-btn {
    display: inline-block;
    padding: 14px 36px;
    background: var(--white);
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.hero-decoration {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    background: var(--white);
}

.shape-1 {
    width: 500px;
    height: 500px;
    top: -150px;
    right: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    bottom: -80px;
    left: -60px;
}

.shape-3 {
    width: 200px;
    height: 200px;
    top: 40%;
    left: 15%;
    opacity: 0.04;
}

/* ===== Section Common ===== */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
}

.section-line {
    width: 48px;
    height: 3px;
    background: var(--primary);
    margin: 0 auto;
    border-radius: 3px;
}

/* ===== About Section ===== */
.about-section {
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: var(--gray-700);
}

.about-text strong {
    color: var(--primary);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    text-align: center;
    padding: 32px 16px;
    background: var(--gray-100);
    border-radius: var(--radius);
    transition: all var(--transition);
}

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

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* ===== Projects Section ===== */
.projects-section {
    background: var(--gray-100);
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.project-card {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 48px;
    align-items: center;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

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

.project-card:nth-child(even) {
    grid-template-columns: 1fr 340px;
}

.project-card:nth-child(even) .project-phones {
    order: 2;
}

.project-phones {
    position: relative;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-frame {
    position: absolute;
    width: 180px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--gray-300);
    background: var(--white);
    transition: transform 0.4s ease;
}

.phone-frame:first-child {
    z-index: 2;
    transform: rotate(-6deg) translateX(-20px);
}

.phone-frame:last-child {
    z-index: 1;
    transform: rotate(6deg) translateX(20px);
}

.project-card:hover .phone-frame:first-child {
    transform: rotate(-10deg) translateX(-30px);
}

.project-card:hover .phone-frame:last-child {
    transform: rotate(10deg) translateX(30px);
}

/* Single phone frame (活动中心) */
.project-phones:has(.phone-frame:only-child) {
    height: auto;
}

.project-phones:has(.phone-frame:only-child) .phone-frame {
    position: relative;
    transform: none;
    width: 200px;
}

.project-phones:has(.phone-frame:only-child) .phone-frame:first-child {
    transform: none;
}

.project-card:hover .project-phones:has(.phone-frame:only-child) .phone-frame {
    transform: none;
}

.phone-frame img {
    width: 100%;
    height: auto;
    display: block;
}

.project-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
}

.project-desc {
    font-size: 1rem;
    color: var(--gray-500);
    line-height: 1.8;
    margin-bottom: 20px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 14px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 20px;
}

/* ===== Contact Section ===== */
.contact-section {
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.contact-detail {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 2px;
}

.contact-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    transition: color var(--transition);
}

.contact-value:hover {
    color: var(--primary);
}

.contact-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.qr-frame {
    width: 240px;
    height: 240px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--gray-100);
    background: var(--white);
    padding: 16px;
}

.qr-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-hint {
    font-size: 0.95rem;
    color: var(--gray-500);
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    padding: 32px 0;
    text-align: center;
}

.footer-text {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

.footer-icp {
    margin-top: 8px;
}

.footer-icp a {
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
    transition: color var(--transition);
}

.footer-icp a:hover {
    color: rgba(255,255,255,0.7);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .project-card,
    .project-card:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .project-card:nth-child(even) .project-phones {
        order: 0;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-qr {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }

    .nav-logo {
        font-size: 1.05rem;
        gap: 8px;
    }

    .nav-logo-img {
        width: 28px;
        height: 28px;
    }

    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px 24px;
        box-shadow: var(--shadow-md);
        transform: translateY(-150%);
        transition: transform var(--transition);
        z-index: 999;
        visibility: hidden;
    }

    .nav-menu.active {
        transform: translateY(0);
        visibility: visible;
    }

    .nav-link {
        padding: 12px 16px;
        font-size: 1rem;
    }

    .nav-toggle {
        display: flex;
        flex-shrink: 0;
    }

    .section {
        padding: 70px 0;
    }

    .project-card {
        padding: 24px;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 20px 12px;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .nav-logo {
        font-size: 0.95rem;
        gap: 6px;
    }

    .nav-logo-img {
        width: 24px;
        height: 24px;
    }

    .hero {
        padding: 100px 16px 60px;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .project-phones {
        height: 360px;
    }

    .phone-frame {
        width: 150px;
    }

    .project-phones:has(.phone-frame:only-child) .phone-frame {
        width: 170px;
    }

    .qr-frame {
        width: 200px;
        height: 200px;
    }
}

/* ===== Lightbox ===== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.15);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    z-index: 10;
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.25);
}

.lightbox-prev.hidden,
.lightbox-next.hidden {
    opacity: 0.3;
    pointer-events: none;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.lightbox-dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.lightbox-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}

.lightbox-dots .dot.active {
    background: #fff;
    transform: scale(1.25);
}

.lightbox-dots:empty {
    display: none;
}

/* Phone frame click cursor */
.phone-frame {
    cursor: zoom-in;
}

/* ===== Scroll Animations ===== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}
