/* ============================================================
   ai.css - 集智 AI 页独立样式
   仅应用于 /ai.php，不依赖其他业务 CSS
   ============================================================ */

/* ============ Hero ============ */
.ai-hero {
    background: linear-gradient(135deg, #0f1012 0%, #1A1A1A 50%, #221b2e 100%);
    color: #fff;
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ai-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
}
.ai-hero::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -120px;
    top: 50%;
    transform: translateY(-50%);
    background: radial-gradient(circle, rgba(200, 16, 46, 0.18) 0%, transparent 65%);
    pointer-events: none;
}

.ai-hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.ai-hero-left .ai-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(200, 16, 46, 0.15);
    color: #ff6b7f;
    font-size: 12.5px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(200, 16, 46, 0.35);
    letter-spacing: 0.08em;
}
.ai-hero-left .ai-chip-dot {
    width: 6px;
    height: 6px;
    background: #C8102E;
    border-radius: 50%;
    box-shadow: 0 0 8px #C8102E;
}

.ai-hero-left h1 {
    font-size: clamp(34px, 4.5vw, 54px);
    margin: 20px 0 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.ai-hero-left p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 15px;
    line-height: 1.85;
    max-width: 560px;
    margin: 0 0 28px;
}

.ai-hero-btns {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    border: 1px solid transparent;
}
.ai-btn-primary {
    background: #C8102E;
    color: #fff;
}
.ai-btn-primary:hover {
    background: #a40d26;
}
.ai-btn-primary span {
    transition: transform 0.25s ease;
}
.ai-btn-primary:hover span {
    transform: translateX(3px);
}
.ai-btn-ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}
.ai-btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

/* Hero 右侧 AI 对话卡片 */
.ai-hero-right {
    display: flex;
    justify-content: center;
}
.ai-card {
    width: 100%;
    max-width: 480px;
    background: #1a1b1f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.ai-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: #111215;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ai-card-dots {
    display: flex;
    gap: 6px;
}
.ai-card-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
}
.ai-card-title {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.75);
    margin-left: 4px;
}

.ai-chat {
    padding: 20px 18px;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ai-msg {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.ai-msg-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    margin-top: 2px;
}
.ai-msg-body {
    flex: 1;
    background: #222328;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13.5px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
}
.ai-msg-ai .ai-msg-body {
    background: rgba(200, 16, 46, 0.08);
    border-color: rgba(200, 16, 46, 0.25);
}
.ai-msg-body strong {
    color: #fff;
    font-weight: 600;
}

.ai-next {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-left: 38px;
}
.ai-next-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C8102E;
    animation: aiPulse 1.6s ease-in-out infinite;
}
@keyframes aiPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.35); }
}

.ai-input {
    display: flex;
    gap: 8px;
    padding: 12px 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: #111215;
}
.ai-input input {
    flex: 1;
    background: #1a1b1f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 14px;
    border-radius: 4px;
    color: #fff;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.2s ease;
}
.ai-input input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}
.ai-input input:focus {
    border-color: #C8102E;
}
.ai-input button {
    background: #C8102E;
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}
.ai-input button:hover {
    background: #a40d26;
}

/* ============ 公共标题 ============ */
.ai-section-head {
    text-align: center;
    margin-bottom: 44px;
}
.ai-section-head h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #1A1A1A;
    letter-spacing: -0.01em;
}
.ai-section-head h2 span {
    color: #C8102E;
    margin: 0 4px;
}
.ai-section-head p {
    font-size: 14.5px;
    color: #555;
    margin: 0;
}
.ai-section-head.ai-section-head-dark h2 {
    color: #fff;
}
.ai-section-head.ai-section-head-dark p {
    color: rgba(255, 255, 255, 0.7);
}

/* ============ 六大 AI 智能功能 ============ */
.ai-features {
    padding: 80px 0 90px;
    background: #fff;
}
.ai-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.ai-feature {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 28px 26px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.ai-feature:hover {
    transform: translateY(-4px);
    border-color: rgba(200, 16, 46, 0.4);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}
.ai-feature-icon {
    width: 40px;
    height: 40px;
    background: #C8102E;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.ai-feature h3 {
    font-size: 16.5px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 10px;
}
.ai-feature p {
    font-size: 13.5px;
    line-height: 1.75;
    color: #555;
    margin: 0;
}

/* ============ AI 工具矩阵 ============ */
.ai-matrix {
    padding: 80px 0 90px;
    background: #1A1A1A;
}
.ai-matrix-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.ai-matrix-card {
    background: #25262a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 26px 24px 28px;
    transition: border-color 0.25s ease, transform 0.25s ease;
}
.ai-matrix-card:hover {
    border-color: rgba(200, 16, 46, 0.5);
    transform: translateY(-3px);
}
.ai-matrix-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.ai-matrix-title-row h3 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}
.ai-status {
    font-size: 11.5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.ai-status-green {
    background: rgba(74, 222, 128, 0.15);
    color: #86efac;
    border: 1px solid rgba(74, 222, 128, 0.35);
}
.ai-status-yellow {
    background: rgba(250, 204, 21, 0.12);
    color: #fde68a;
    border: 1px solid rgba(250, 204, 21, 0.3);
}
.ai-status-gray {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ai-matrix-card p {
    font-size: 13px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 18px;
}
.ai-matrix-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, gap 0.2s ease;
}
.ai-matrix-link span {
    display: inline-block;
    transition: transform 0.2s ease;
}
.ai-matrix-link:hover span {
    transform: translateX(3px);
}
.ai-link-red {
    color: #ff6b7f;
}
.ai-link-red:hover {
    color: #ff8b9b;
}
.ai-link-yellow {
    color: #fde68a;
}
.ai-link-yellow:hover {
    color: #fef3c7;
}
.ai-matrix-muted {
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    cursor: not-allowed;
}

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
    .ai-hero-inner { grid-template-columns: 1fr; gap: 50px; }
    .ai-features-grid { grid-template-columns: repeat(2, 1fr); }
    .ai-matrix-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .ai-hero { padding: 48px 0 60px; }
    .ai-hero-left p { font-size: 14px; }
    .ai-features { padding: 60px 0 70px; }
    .ai-features-grid { grid-template-columns: 1fr; }
    .ai-matrix { padding: 60px 0 70px; }
    .ai-matrix-grid { grid-template-columns: 1fr; }
    .ai-card { max-width: none; }
    .ai-chat { min-height: 220px; }
}
