/* ========================================
   Factory 001 — 网站样式
   ======================================== */

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

:root {
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1a1a1a;
    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --text-muted: #666;
    --accent-red: #c41e3a;
    --accent-red-glow: rgba(196, 30, 58, 0.3);
    --accent-white: #f0f0f0;
    --border-color: #222;
    --border-glow: #333;
    --font-mono: 'Courier New', 'Monaco', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul, ol {
    list-style: none;
}

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.nav-logo {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

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

.logo-number {
    color: var(--accent-red);
    font-size: 1.4rem;
    text-shadow: 0 0 10px var(--accent-red-glow);
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-menu a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.2s;
    position: relative;
}

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

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

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

.nav-lang select {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
}

.nav-lang select:focus {
    outline: none;
    border-color: var(--accent-red);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #050505;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 50% 50%, rgba(196, 30, 58, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(100, 100, 100, 0.05) 0%, transparent 40%);
    animation: heroPulse 8s ease-in-out infinite;
}

@keyframes heroPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0,0,0,0.1) 2px,
            rgba(0,0,0,0.1) 4px
        );
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 20px;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
    padding: 4px 16px;
    border-radius: 2px;
    margin-bottom: 24px;
    letter-spacing: 3px;
    animation: badgeFlicker 4s ease-in-out infinite;
}

@keyframes badgeFlicker {
    0%, 100% { opacity: 1; }
    45% { opacity: 1; }
    50% { opacity: 0.3; }
    55% { opacity: 1; }
    70% { opacity: 0.8; }
    75% { opacity: 1; }
}

.hero-title {
    font-family: var(--font-mono);
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 24px;
    letter-spacing: 4px;
}

.title-factory {
    display: block;
    color: var(--text-primary);
    text-shadow: 0 0 40px rgba(255,255,255,0.1);
}

.title-001 {
    display: block;
    color: var(--accent-red);
    text-shadow: 0 0 60px var(--accent-red-glow), 0 0 100px rgba(196, 30, 58, 0.2);
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { text-shadow: 0 0 60px var(--accent-red-glow), 0 0 100px rgba(196, 30, 58, 0.2); }
    50% { text-shadow: 0 0 80px var(--accent-red-glow), 0 0 140px rgba(196, 30, 58, 0.3); }
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.btn-primary, .btn-secondary, .btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--accent-red);
    color: white;
    box-shadow: 0 4px 20px var(--accent-red-glow);
}

.btn-primary:hover {
    background: #d42040;
    box-shadow: 0 6px 30px rgba(196, 30, 58, 0.5);
    transform: translateY(-2px);
}

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

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

.hero-meta {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
    margin: 8px auto 0;
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.5; }
}

/* ---------- Sections ---------- */
.section {
    padding: 100px 0;
    position: relative;
}

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

.section-title {
    font-family: var(--font-mono);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-desc {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 60px;
    font-size: 1rem;
}

/* ---------- About ---------- */
.about {
    background: linear-gradient(180deg, #0a0a0a 0%, #0f0f0f 100%);
}

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

.about-lead {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.8;
    padding-left: 16px;
    border-left: 3px solid var(--accent-red);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-warning {
    margin-top: 32px;
    padding: 20px;
    background: rgba(196, 30, 58, 0.05);
    border: 1px solid rgba(196, 30, 58, 0.3);
    border-radius: 4px;
}

.about-warning strong {
    color: var(--accent-red);
    font-family: var(--font-mono);
    display: block;
    margin-bottom: 12px;
}

.about-warning ul {
    list-style: none;
}

.about-warning li {
    color: var(--text-secondary);
    padding: 4px 0;
    font-size: 0.95rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 24px 16px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--accent-red);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.stat-number {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent-red);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ---------- Features ---------- */
.features {
    background: #0d0d0d;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 32px 24px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-red), transparent);
    transform: scaleX(0);
    transition: transform 0.3s;
}

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

.feature-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ---------- Screenshots ---------- */
.screenshots {
    background: linear-gradient(180deg, #0d0d0d 0%, #0a0a0a 100%);
}

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

.screenshot-card {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.screenshot-card:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 50px rgba(0,0,0,0.5);
}

.ss-placeholder {
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Different backgrounds for each screenshot */
.ss-placeholder[data-ss="gate"] {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 50%, #0a0a0a 100%);
}

.ss-placeholder[data-ss="lobby"] {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 30%, #1a1a1a 100%);
}

.ss-placeholder[data-ss="qc"] {
    background: linear-gradient(135deg, #2a2020 0%, #1a1515 50%, #0f0f0f 100%);
}

.ss-placeholder[data-ss="water"] {
    background: linear-gradient(180deg, #0a1a2a 0%, #0a1520 50%, #050a10 100%);
}

.ss-placeholder[data-ss="mirror"] {
    background: linear-gradient(135deg, #1a1a2a 0%, #151520 50%, #0a0a1a 100%);
}

.ss-placeholder[data-ss="dark"] {
    background: linear-gradient(135deg, #0a0a0a 0%, #151515 50%, #050505 100%);
}

.ss-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(196, 30, 58, 0.05) 0%, transparent 70%);
}

.ss-content {
    text-align: center;
    z-index: 1;
    padding: 20px;
}

.ss-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.8;
}

.ss-label {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.ss-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ---------- Download ---------- */
.download {
    background: #0f0f0f;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.download-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 36px 28px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}

.download-card:hover {
    border-color: var(--accent-red);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(196, 30, 58, 0.1);
}

.dl-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.download-card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.dl-version {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-red);
    margin-bottom: 8px;
}

.dl-size {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.dl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.dl-meta span {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.03);
    padding: 4px 10px;
    border-radius: 2px;
}

.btn-download {
    background: var(--accent-red);
    color: white;
    padding: 14px 36px;
    font-size: 1rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}

.btn-download:hover {
    background: #d42040;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-red-glow);
}

.dl-hash {
    margin-top: 16px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* QR Section */
.qr-section {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

.qr-section h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.qr-code {
    display: inline-block;
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.qr-pattern {
    width: 160px;
    height: 160px;
    background: 
        linear-gradient(45deg, #000 25%, transparent 25%, transparent 75%, #000 75%),
        linear-gradient(45deg, #000 25%, transparent 25%, transparent 75%, #000 75%);
    background-size: 10px 10px;
    background-position: 0 0, 5px 5px;
    position: relative;
}

.qr-pattern::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    border: 4px solid #000;
    background: white;
}

.qr-pattern::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 4px solid #000;
    background: white;
}

.qr-label {
    margin-top: 12px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #000;
    font-weight: 700;
}

/* ---------- Requirements ---------- */
.requirements {
    background: #0d0d0d;
}

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

.req-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 28px;
}

.req-card h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.req-card table {
    width: 100%;
    border-collapse: collapse;
}

.req-card td {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.req-card td:first-child {
    color: var(--text-muted);
    width: 30%;
}

.req-card td:last-child {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.req-card tr:last-child td {
    border-bottom: none;
}

/* ---------- Install Guide ---------- */
.install-guide {
    background: #0f0f0f;
}

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

.install-tab {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 28px;
}

.install-tab h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.install-tab ol {
    list-style: decimal;
    padding-left: 20px;
}

.install-tab li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.install-tab li:last-child {
    border-bottom: none;
    color: var(--accent-red);
    font-weight: 600;
}

/* ---------- Changelog ---------- */
.changelog {
    background: #0d0d0d;
}

.changelog-list {
    max-width: 800px;
    margin: 0 auto;
}

.cl-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 24px 28px;
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: auto auto auto 1fr;
    gap: 16px;
    align-items: start;
}

.cl-version {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.cl-date {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-top: 2px;
}

.cl-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 2px;
    font-weight: 700;
}

.cl-tag.stable {
    background: rgba(34, 139, 34, 0.2);
    color: #4caf50;
    border: 1px solid rgba(34, 139, 34, 0.3);
}

.cl-tag.beta {
    background: rgba(255, 165, 0, 0.2);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.3);
}

.cl-tag.alpha {
    background: rgba(196, 30, 58, 0.2);
    color: var(--accent-red);
    border: 1px solid rgba(196, 30, 58, 0.3);
}

.cl-item ul {
    grid-column: 1 / -1;
    padding-left: 20px;
    margin-top: 12px;
}

.cl-item li {
    padding: 4px 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ---------- FAQ ---------- */
.faq {
    background: #0f0f0f;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item:hover {
    border-color: var(--border-glow);
}

.faq-item summary {
    padding: 20px 24px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--accent-red);
    transition: transform 0.3s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

/* ---------- Footer ---------- */
.footer {
    background: #050505;
    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-logo {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.footer-001 {
    color: var(--accent-red);
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.7;
    max-width: 300px;
}

.footer-col h4 {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footer-col ul li {
    padding: 6px 0;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color 0.2s;
}

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

.footer-langs li {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 4px 0;
}

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

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

.footer-warning {
    color: var(--accent-red) !important;
    font-weight: 600;
}

/* ---------- Back to Top ---------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--accent-red);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #d42040;
    transform: translateY(-2px);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .nav-menu {
        display: none;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .cl-item {
        grid-template-columns: 1fr;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 600px) {
    .about-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
    }
}
