/*
 * 品牌AI顾问 - 全局样式
 * 扁平化设计风格
 */

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

:root {
    /* 用户指定颜色 */
    --bg-color: #F1EEE7;
    --card-bg: #E3DACB;
    --text-dark: #141412;

    /* 衍生颜色 */
    --text-light: #6B6862;
    --text-muted: #9A958D;
    --border-color: #D4CEC1;
    --accent-color: #141412;

    /* 状态颜色 */
    --success: #2E7D32;
    --error: #C62828;
    --info: #1565C0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', sans-serif;
    background: var(--bg-color);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 导航栏 */
.navbar {
    background: var(--bg-color);
    box-shadow: none;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1620px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-dark);
    background: rgba(0,0,0,0.04);
}

/* 主内容区 */
.main-content {
    max-width: 1620px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

/* 闪动消息 */
.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-weight: 500;
    font-size: 0.95rem;
}

.flash-success {
    background: #E8F5E9;
    border: 1px solid #C8E6C9;
    color: var(--success);
}

.flash-error {
    background: #FFEBEE;
    border: 1px solid #FFCDD2;
    color: var(--error);
}

.flash-info {
    background: #E3F2FD;
    border: 1px solid #BBDEFB;
    color: var(--info);
}

/* ==================== 登录页面 ==================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

/* 背景装饰 - 简化 */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(227, 218, 203, 0.5) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(227, 218, 203, 0.5) 0%, transparent 50%);
}

/* 认证容器 */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
}

.auth-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 40px 32px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

/* 标题 */
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 表单 */
.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.password-input {
    position: relative;
}

.auth-form input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #FAFAFA;
    color: var(--text-dark);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

.auth-form input:focus {
    border-color: var(--text-dark);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(20, 20, 18, 0.08);
}

.auth-form input::placeholder {
    color: #BDBDBD;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.4;
    transition: opacity 0.3s;
    color: var(--text-dark);
}

.toggle-password:hover {
    opacity: 0.7;
}

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-light);
    user-select: none;
}

.remember-me input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 5px;
    position: relative;
    transition: all 0.2s;
}

.remember-me input:checked + .checkmark {
    background: var(--text-dark);
    border-color: var(--text-dark);
}

.remember-me input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.forgot-password:hover {
    opacity: 0.7;
}

/* 按钮 - 苹果风格大圆角 */
.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--text-dark);
    color: #FFFFFF;
    width: auto;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

.btn-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(3px);
}

.btn-block {
    width: 100%;
    display: block;
}

/* 分割线 */
.divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    position: relative;
    background: #FFFFFF;
    padding: 0 14px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* 底部 */
.auth-footer {
    text-align: center;
}

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

.auth-footer a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.auth-footer a:hover {
    opacity: 0.7;
    text-decoration: none;
}

/* 提示 */
.auth-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 14px;
    background: #F5F5F5;
    border-radius: 8px;
}

.auth-tip svg {
    width: 16px;
    height: 16px;
    color: var(--text-light);
    flex-shrink: 0;
}

.auth-tip span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ==================== 首页 ==================== */
.hero {
    text-align: center;
    padding: 60px 20px;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn-secondary {
    background: #FFFFFF;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #F5F5F5;
}

/* 功能卡片 */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    padding: 40px 0;
}

.feature-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 28px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: #FFFFFF;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--text-dark);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

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

/* 流程步骤 */
.steps {
    padding: 40px 0;
}

.steps-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 32px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.step-item {
    text-align: center;
    padding: 24px 16px;
    background: var(--card-bg);
    border-radius: 14px;
}

.step-num {
    width: 36px;
    height: 36px;
    background: var(--text-dark);
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0 auto 14px;
}

.step-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.step-item p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ==================== 聊天页面 ==================== */
.chat-container {
    max-width: 800px;
    margin: 0 auto;
}

.chat-header {
    text-align: center;
    margin-bottom: 32px;
}

.chat-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.chat-header p {
    color: var(--text-muted);
}

.chat-box {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.message {
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 600;
}

.message-avatar.ai {
    background: var(--card-bg);
    color: var(--text-dark);
}

.message-avatar.user {
    background: var(--text-dark);
    color: #FFFFFF;
}

.message-content {
    flex: 1;
}

.message-content p {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    padding: 14px 18px;
    border-radius: 14px;
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.6;
}

.message.user .message-content p {
    background: var(--text-dark);
    color: #FFFFFF;
    border-color: var(--text-dark);
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.chat-input-area input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input-area input:focus {
    border-color: var(--text-dark);
}

.chat-input-area .btn {
    padding: 14px 24px;
}

/* 维度选择 */
.dimension-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.dimension-tag {
    padding: 6px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.dimension-tag:hover {
    background: var(--text-dark);
    color: #FFFFFF;
    border-color: var(--text-dark);
}

.dimension-tag.active {
    background: var(--text-dark);
    color: #FFFFFF;
    border-color: var(--text-dark);
}

/* ==================== 设置页面 ==================== */
.settings-container {
    max-width: 700px;
    margin: 0 auto;
}

.settings-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
}

.settings-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.settings-section {
    margin-bottom: 28px;
}

.settings-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 14px;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.form-input, .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #FAFAFA;
    color: var(--text-dark);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

.form-input:focus, .form-select:focus {
    border-color: var(--text-dark);
    background: #FFFFFF;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6862' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-select option {
    background: #FFFFFF;
    color: var(--text-dark);
}

.form-hint {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-save {
    padding: 14px 28px;
    background: var(--text-dark);
    border: none;
    border-radius: 10px;
    color: #FFFFFF;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn-save:hover {
    opacity: 0.9;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 28px;
}

.user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: #FFFFFF;
}

.user-details h3 {
    color: var(--text-dark);
    margin: 0 0 4px;
    font-weight: 600;
}

.user-details p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
}

/* ==================== 报告页面 ==================== */
.report-container {
    max-width: 900px;
    margin: 0 auto;
}

.report-header {
    text-align: center;
    margin-bottom: 32px;
}

.report-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.report-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.report-content {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
}

.report-section {
    margin-bottom: 32px;
}

.report-section:last-child {
    margin-bottom: 0;
}

.report-section h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.report-section h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 16px 0 10px;
}

.report-section p, .report-section li {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

.report-section ul {
    padding-left: 20px;
}

.report-section li {
    margin-bottom: 8px;
}

.report-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 32px;
}

.btn-download {
    background: var(--text-dark);
    color: #FFFFFF;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.btn-download:hover {
    opacity: 0.9;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-container {
        padding: 12px 20px;
    }

    .nav-links {
        gap: 4px;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-btns {
        flex-direction: column;
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #D4CEC1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #BDB9AD;
}

/* 选中文本 */
::selection {
    background: rgba(20, 20, 18, 0.15);
    color: var(--text-dark);
}
