/* ============================================
   AI幂律尖峰Builder平台 - 问卷样式
   ============================================ */

:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #111127;
    --bg-card: #161632;
    --bg-input: #1a1a3a;
    --border-color: #2a2a5a;
    --text-primary: #e8e8f0;
    --text-secondary: #8888aa;
    --text-muted: #5555777;
    --accent-cyan: #00d4ff;
    --accent-purple: #7c3aed;
    --accent-pink: #f472b6;
    --accent-green: #34d399;
    --gradient-primary: linear-gradient(135deg, #00d4ff, #7c3aed);
    --gradient-button: linear-gradient(90deg, #34d399, #00d4ff, #7c3aed, #f472b6);
    --shadow-glow: 0 0 40px rgba(0, 212, 255, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   粒子背景
   ============================================ */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   头部导航
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(42, 42, 90, 0.5);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.logo-text span {
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.countdown {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    color: var(--accent-cyan);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* ============================================
   主内容区
   ============================================ */
.container {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
    padding: 100px 20px 40px;
}

.hidden {
    display: none !important;
}

/* ============================================
   卡片
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-button);
    opacity: 0.6;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.card-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(244, 114, 182, 0.12);
    border-radius: 14px;
    border: 1px solid rgba(244, 114, 182, 0.2);
    flex-shrink: 0;
}

.card-icon-purple {
    background: rgba(167, 139, 250, 0.12);
    border-color: rgba(167, 139, 250, 0.2);
}

.card-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ============================================
   表单
   ============================================ */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 8px;
}

.label-icon {
    margin-right: 4px;
}

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

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
    resize: vertical;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1), 0 0 20px rgba(0, 212, 255, 0.05);
}

input[type="text"]:hover,
input[type="email"]:hover,
textarea:hover {
    border-color: rgba(0, 212, 255, 0.4);
}

textarea {
    min-height: 80px;
}

/* ============================================
   联系方式区域
   ============================================ */
.contact-section {
    background: rgba(0, 212, 255, 0.04);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.contact-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.contact-section .form-group {
    margin-bottom: 0;
}

/* ============================================
   按钮
   ============================================ */
.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 32px;
    background: var(--gradient-button);
    background-size: 300% 100%;
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    position: relative;
    overflow: hidden;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.back-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.05);
}

.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.form-actions .submit-btn {
    flex: 1;
}

.submit-btn-final {
    background: linear-gradient(90deg, #7c3aed, #f472b6, #ff6b6b);
    background-size: 300% 100%;
}

/* ============================================
   尖峰问答 Q&A - 独立卡片式
   ============================================ */
.qa-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.qa-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.5;
}

.qa-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 212, 255, 0.05);
}

.qa-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.qa-card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.qa-icon-blue {
    background: rgba(0, 212, 255, 0.12);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.qa-icon-green {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.qa-icon-orange {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.qa-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.qa-question-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 6px;
    line-height: 1.6;
}

.qa-hint-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.6;
    opacity: 0.85;
}

.qa-card textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
    resize: vertical;
    min-height: 100px;
}

.qa-card textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.qa-card textarea:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1), 0 0 20px rgba(0, 212, 255, 0.05);
}

.qa-card textarea:hover {
    border-color: rgba(0, 212, 255, 0.4);
}

/* ============================================
   成功页面
   ============================================ */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(20px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-card {
    text-align: center;
    padding: 60px;
    animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon {
    margin-bottom: 24px;
    animation: iconSpin 0.8s ease-out;
}

@keyframes iconSpin {
    0% { transform: rotate(-180deg) scale(0); }
    100% { transform: rotate(0deg) scale(1); }
}

.success-card h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.success-card p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.success-countdown {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 24px;
    font-size: 15px;
    color: var(--accent-cyan);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.success-card .submit-btn {
    width: auto;
    padding: 12px 40px;
    display: inline-flex;
    margin-top: 32px;
}

/* ============================================
   Toast 提示
   ============================================ */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(244, 114, 182, 0.95);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(244, 114, 182, 0.3);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   页脚
   ============================================ */
.footer {
    text-align: center;
    padding: 32px 0;
    margin-top: 20px;
}

.footer-brand {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.footer-slogan {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   动画
   ============================================ */
.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

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

/* 输入框聚焦时的标签高亮 */
.form-group:focus-within label {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* ============================================
   加载状态
   ============================================ */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 768px) {
    .header {
        padding: 12px 20px;
        flex-direction: column;
        gap: 10px;
    }

    .logo-text h1 {
        font-size: 15px;
    }

    .countdown {
        font-size: 12px;
        padding: 6px 14px;
    }

    .container {
        padding: 130px 16px 32px;
    }

    .card {
        padding: 24px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .card-header h2 {
        font-size: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .qa-card {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 20px 16px;
    }

    .contact-section {
        padding: 16px;
    }
}

/* ============================================
   表单验证视觉反馈
   ============================================ */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: rgba(244, 114, 182, 0.5);
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: rgba(52, 211, 153, 0.4);
}

/* ============================================
   滚动条样式
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}
