/* css/style.css - Mobile Optimized Version */

/* ================== 1. 核心变量 ================== */
:root {
    --bg-color: #050505;
    --surface-color: #0a0a0a;
    --border-color: #262626;
    --text-main: #ededed;
    --text-muted: #737373;
    --accent: #D4FF00;
    /* Cyber Lime */
    --accent-dim: rgba(212, 255, 0, 0.1);

    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-display);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    /* 防止手机端左右晃动 */
    background-image: linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center top;
}

/* ================== 2. 头部 Header (含手机端适配) ================== */
header {
    border-bottom: 1px solid var(--border-color);
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.brand {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    text-decoration: none;
    letter-spacing: -0.05em;
    z-index: 101;
}

.brand span {
    color: var(--accent);
}

/* 桌面端菜单 */
.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-item {
    color: white;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-item:hover {
    color: var(--accent);
}

.contact-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.contact-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 10px var(--accent-dim);
}

/* 手机端汉堡按钮 (默认隐藏) */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 101;
}

.bar {
    width: 25px;
    height: 2px;
    background-color: white;
    transition: 0.3s;
}

/* ================== 3. 通用布局 ================== */
main {
    flex-grow: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 4rem auto;
    font-family: var(--font-mono);
}

/* Grid 系统 */
.interface-grid,
.pricing-grid,
.case-grid {
    display: grid;
    gap: 2rem;
}

/* 默认双列 */
.interface-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

/* 价格表自适应 */
.pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-bottom: 4rem;
}

/* 卡片通用 */
.tech-card,
.plan-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.5;
}

/* ================== 4. 交互组件 ================== */
label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

textarea {
    width: 100%;
    height: 200px;
    background: #000;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    border-radius: 8px;
    resize: none;
    outline: none;
    transition: border 0.3s;
}

textarea:focus {
    border-color: var(--accent);
}

.btn-cyber {
    display: block;
    width: 100%;
    background: var(--accent);
    color: black;
    font-family: var(--font-mono);
    font-weight: 700;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
}

.btn-cyber:hover {
    box-shadow: 0 0 20px var(--accent);
    transform: translateY(-1px);
}

.btn-cyber-outline {
    display: inline-block;
    background: transparent;
    color: var(--accent);
    font-family: var(--font-mono);
    font-weight: 700;
    padding: 1rem 2rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.btn-cyber-outline:hover {
    background: var(--accent);
    color: black;
    box-shadow: 0 0 20px var(--accent-dim);
}

.output-box {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: #d4d4d4;
    white-space: pre-wrap;
    min-height: 300px;
    line-height: 1.8;
}

.output-placeholder {
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.cursor::after {
    content: '▋';
    color: var(--accent);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ================== 5. 定价页样式 ================== */
.pricing-header {
    text-align: center;
    margin-bottom: 4rem;
}

.plan-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(212, 255, 0, 0.05);
    transform: scale(1.02);
    z-index: 10;
}

.plan-card.featured::before {
    content: 'RECOMMENDED';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: black;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 4px;
}

.plan-name {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.plan-price {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: white;
}

.plan-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

.plan-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.feature-list li {
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    color: #d4d4d4;
    display: flex;
    align-items: flex-start;
}

.feature-list li::before {
    content: '>';
    color: var(--accent);
    margin-right: 10px;
    font-family: var(--font-mono);
}

.feature-list li.missing {
    color: #444;
    text-decoration: line-through;
}

.feature-list li.missing::before {
    content: 'x';
    color: #444;
}

.addon-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px dashed var(--border-color);
}

.addon-row:last-child {
    border-bottom: none;
}

.addon-price {
    font-family: var(--font-mono);
    color: var(--accent);
    text-align: right;
}

/* ================== 6. 案例展示样式 ================== */
.case-section {
    margin-top: 6rem;
    border-top: 1px solid var(--border-color);
    padding-top: 4rem;
}

.section-title {
    font-size: 2rem;
    color: white;
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.case-card {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.case-card:hover {
    border-color: var(--accent);
    transform: translateX(5px);
}

.case-preview {
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border-color);
    min-height: 250px;
}

.mockup-window {
    width: 80%;
    height: 80%;
    background: #000;
    border: 1px solid #333;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
}

.mockup-header {
    height: 20px;
    background: #222;
    border-bottom: 1px solid #333;
    display: flex;
    gap: 5px;
    padding: 5px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #444;
}

.mockup-body {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.case-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.case-niche {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.case-title {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.case-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    border-top: 1px dashed #333;
    border-bottom: 1px dashed #333;
    padding: 10px 0;
}

.stat-item strong {
    display: block;
    color: white;
    font-size: 1.1rem;
}

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

.case-link {
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
    width: max-content;
    transition: 0.2s;
}

.case-link:hover {
    color: var(--accent);
}

/* 懒加载 */
.lazy-card {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.lazy-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================== 7. 404 & About 样式 ================== */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
    font-family: var(--font-mono);
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px var(--accent);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.error-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.error-msg {
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 3rem;
    font-size: 0.9rem;
    border: 1px dashed var(--border-color);
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
}

.about-container {
    max-width: 800px;
    margin: 0 auto;
}

.story-text p {
    font-size: 1.1rem;
    color: #d4d4d4;
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--accent);
    font-weight: 700;
}

.signature {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--accent);
    margin-top: 2rem;
    font-style: italic;
}

footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    background: #050505;
}

/* ================== 8. 📱 移动端深度优化 (Mobile Optimization) ================== */
@media (max-width: 768px) {

    /* 1. 字体调整 */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-sub {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* 2. 汉堡菜单逻辑 */
    .mobile-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        /* 默认隐藏 */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--border-color);
        gap: 1.5rem;
    }

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

    /* 汉堡按钮动画 */
    .mobile-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* 3. 网格单列化 */
    .interface-grid {
        grid-template-columns: 1fr;
    }

    .case-card {
        grid-template-columns: 1fr;
        margin-bottom: 2rem;
    }

    .case-preview {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        height: 200px;
    }

    /* 4. 间距优化 */
    main {
        padding: 2rem 1rem;
    }

    .tech-card,
    .plan-card,
    .case-info {
        padding: 1.5rem;
    }

    /* 5. 推荐套餐卡片去除放大效果 (手机放不下) */
    .plan-card.featured {
        transform: none;
        box-shadow: none;
        border: 2px solid var(--accent);
    }

    /* 6. 按钮全宽 */
    .contact-link {
        width: 100%;
        text-align: center;
        display: block;
    }
}

/* ================== 修复 Pricing 页面标签显示 ================== */

/* 1. 允许卡片内容溢出 (让标签显示出来) */
.plan-card {
    overflow: visible !important;
}

/* 2. 调整推荐卡片的间距，防止标签挡住上面的元素 */
.plan-card.featured {
    margin-top: 15px;
    /* 给头顶的标签留点位置 */
    z-index: 10;
    /* 保证它浮在最上面 */
}

/* 3. 针对手机端的特殊微调 */
@media (max-width: 768px) {
    .plan-card.featured {
        margin-top: 20px;
        margin-bottom: 10px;
    }
}