/* ============================================
   DigitalFPV - 官网样式表
   Dark Tech Theme
   ============================================ */

/* ----- CSS Variables ----- */
:root {
    --bg-primary: #0b0e17;
    --bg-secondary: #111827;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-cyan: #00d4ff;
    --accent-purple: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #00d4ff, #7c3aed);
    --accent-glow: rgba(0, 212, 255, 0.3);
    --nav-height: 70px;
    --max-width: 1200px;
    --radius: 16px;
    --radius-sm: 8px;
}

/* ----- Reset & Base ----- */
*, *::before, *::after {
    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(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #fff;
}

img {
    max-width: 100%;
    height: auto;
}

/* ----- Scrollbar ----- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ----- Utility ----- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

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

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-header h2 .highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.glow-line {
    width: 60px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
    margin: 16px auto 0;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
    color: #fff;
}

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

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
}

.btn-outline:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

/* ----- Navigation ----- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(11, 14, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
}

.navbar .logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 900;
    color: #fff;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

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

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

.nav-links .nav-forum-link {
    padding: 8px 20px;
    border-radius: 50px;
    background: var(--accent-gradient);
    color: #fff !important;
    font-weight: 600;
}

.nav-links .nav-forum-link::after {
    display: none;
}

.nav-links .nav-forum-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

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

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ----- Hero Section ----- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--nav-height);
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
}

.hero-bg-glow-1 {
    top: -200px;
    right: -200px;
    background: var(--accent-cyan);
}

.hero-bg-glow-2 {
    bottom: -200px;
    left: -200px;
    background: var(--accent-purple);
}

.hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 8px;
    letter-spacing: -2px;
}

.hero h1 .gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 300;
}

.hero .description {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 40px;
}

.hero .hero-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 60px;
    flex-wrap: wrap;
}

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

.hero-stat .number {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ----- Components / Features Section ----- */
.components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.component-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.component-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.component-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(0, 212, 255, 0.2);
    transform: translateY(-4px);
}

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

.component-card .card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(0, 212, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.component-card .card-icon.purple {
    background: rgba(124, 58, 237, 0.1);
}

.component-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.component-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.component-card .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.component-card .card-tags span {
    padding: 3px 10px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.78rem;
    border: 1px solid var(--border-color);
}

/* ----- Downloads Section ----- */
#downloads {
    background: var(--bg-secondary);
}

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.download-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s ease;
}

.download-card:hover {
    border-color: rgba(0, 212, 255, 0.2);
}

.download-card .dl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.download-card .dl-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.download-card .dl-version {
    padding: 4px 12px;
    border-radius: 50px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-cyan);
    font-size: 0.8rem;
    font-weight: 600;
}

.download-card .dl-info {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 8px;
}

.download-card .dl-info span {
    color: var(--text-muted);
}

.download-card .dl-changelog {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.download-card .dl-actions {
    display: flex;
    gap: 10px;
}

.download-card .dl-actions .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
}

/* ----- Web Tools Section ----- */
.tools-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.tool-card:hover {
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-4px);
}

.tool-card .tool-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.tool-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ----- Forum Section ----- */
.forum-section {
    position: relative;
    overflow: hidden;
}

.forum-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0.03;
}

.forum-cta {
    text-align: center;
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 64px 32px;
    max-width: 700px;
    margin: 0 auto;
}

.forum-cta h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.forum-cta p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1.05rem;
}

.forum-cta .btn {
    font-size: 1.05rem;
    padding: 14px 36px;
}

/* ----- News Section ----- */
.news-list {
    display: grid;
    gap: 20px;
}

.news-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 24px;
    transition: all 0.3s ease;
}

.news-item:hover {
    background: var(--bg-card-hover);
}

.news-item .news-date {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.news-item h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
}

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

.news-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

/* ----- Footer ----- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-brand h3 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 300px;
}

.footer-col h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.footer-col ul li a:hover {
    color: var(--accent-cyan);
}

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

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.footer-socials a:hover {
    color: var(--accent-cyan);
}

/* ----- Showcase Section ----- */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.showcase-grid li {
    display: block;
    margin: 0;
    padding: 0;
}

.showcase-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
    color: var(--text-primary);
    text-decoration: none;
    height: 100%;
}

.showcase-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 255, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    color: var(--text-primary);
}

.sc-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg-secondary);
}

.sc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.showcase-card:hover .sc-thumb img {
    transform: scale(1.05);
}

.sc-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    background: var(--bg-secondary);
}

.sc-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: #fff;
}

.sc-badge.video {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.sc-badge.article {
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.sc-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.showcase-card:hover .sc-play {
    background: var(--accent-gradient);
    border-color: transparent;
    transform: translate(-50%, -50%) scale(1.1);
}

.sc-play svg {
    width: 16px;
    height: 16px;
    fill: #fff;
    margin-left: 2px;
}

.sc-body {
    padding: 10px 12px 12px;
}

.sc-body h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.sc-body p {
    color: var(--text-muted);
    font-size: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.sc-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.showcase-more-wrap {
    text-align: center;
    margin-top: 36px;
}

/* ----- Showcase Page (full list) ----- */
.showcase-page {
    padding-top: calc(var(--nav-height) + 40px);
    min-height: 100vh;
}

.showcase-page .page-header {
    text-align: center;
    margin-bottom: 48px;
}

.showcase-page .page-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.showcase-page .page-header p {
    color: var(--text-secondary);
}

.showcase-page-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.showcase-page-grid li {
    display: block;
    margin: 0;
    padding: 0;
}

.showcase-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.showcase-pagination a,
.showcase-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.showcase-pagination a:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.showcase-pagination .active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
}

/* ----- Showcase Responsive ----- */
@media (max-width: 1024px) {
    .showcase-grid,
    .showcase-page-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .showcase-grid,
    .showcase-page-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ----- Responsive ----- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(11, 14, 23, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.4s ease;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-toggle {
        display: flex;
    }

    .section {
        padding: 60px 0;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .hero h1 {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
    }

    .hero-stats {
        gap: 24px;
    }

    .hero-stat .number {
        font-size: 1.4rem;
    }

    .components-grid,
    .downloads-grid,
    .tools-showcase {
        grid-template-columns: 1fr;
    }

    .forum-cta {
        padding: 40px 24px;
    }

    .forum-cta h2 {
        font-size: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero .hero-buttons {
        flex-direction: column;
    }

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