/* OPC Studio 全局样式 - 深色科技风 */

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(30, 41, 59, 0.6);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    --border: rgba(99, 102, 241, 0.15);
    --border-hover: rgba(99, 102, 241, 0.4);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 12px;
    --radius-sm: 8px;
    --glass-blur: blur(12px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.08), transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(16, 185, 129, 0.05), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* === 登录/注册页（左右两栏：动画小人舞台 + 表单） === */
.auth-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* 左侧：动画小人舞台 */
.auth-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 40px 48px;
    overflow: hidden;
    background: linear-gradient(135deg, #d4d0dc 0%, #c8c4d0 50%, #bbb7c5 100%);
}

.auth-stage::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 15%;
    width: 260px;
    height: 260px;
    background: rgba(180, 170, 200, 0.25);
    border-radius: 50%;
    filter: blur(80px);
}

.auth-stage::before {
    content: '';
    position: absolute;
    bottom: 15%;
    left: 10%;
    width: 350px;
    height: 350px;
    background: rgba(200, 195, 210, 0.2);
    border-radius: 50%;
    filter: blur(100px);
}

.auth-stage-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #4a4058;
    z-index: 10;
    position: relative;
}

.auth-stage-logo-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 6px;
}

.auth-stage-slogan {
    font-size: 13px;
    color: rgba(80, 70, 90, 0.7);
    z-index: 10;
    position: relative;
    margin-bottom: 24px;
}

.characters-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 420px;
    width: 100%;
}

/* 右侧：表单面板 */
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: 400px;
    max-width: 90vw;
}

/* 密码框 + 显示/隐藏按钮 */
.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--text-primary);
}

/* 小屏：隐藏舞台只留表单 */
@media (max-width: 900px) {
    .auth-page {
        grid-template-columns: 1fr;
    }
    .auth-stage {
        display: none;
    }
}

.auth-card h1 {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

/* === 表单 === */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group .form-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
    line-height: 1.5;
}

/* === 按钮 === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-hover);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--border-hover);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === 主布局 === */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* === 侧边栏 === */
.sidebar {
    width: 240px;
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.3s;
}

.sidebar-brand {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.sidebar-brand .logo {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: white;
}

.sidebar-brand .brand-text b {
    font-size: 14px;
    display: block;
}

.sidebar-brand .brand-text small {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.nav-section {
    margin-bottom: 16px;
}

.nav-section-title {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 8px 12px 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-hover);
}

.nav-item .icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}

/* === 主内容区 === */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 24px 32px;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* === 卡片 === */
.card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.card:hover {
    border-color: var(--border-hover);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* === 网格 === */
.grid {
    display: grid;
    gap: 16px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 16px; }
}

/* === 统计卡片 === */
.stat-card {
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* === 员工卡片 === */
.employee-card {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
}

.employee-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.employee-info {
    flex: 1;
}

.employee-info .name {
    font-size: 15px;
    font-weight: 600;
}

.employee-info .role {
    font-size: 13px;
    color: var(--text-secondary);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.status-idle { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }
.status-working { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.status-offline { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* 对外展示开关 */
.emp-public-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.emp-public-toggle:hover { border-color: var(--border-hover); }
.emp-public-toggle.on {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--success);
}
.emp-public-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #94a3b8;
}
.emp-public-toggle.on .emp-public-dot { background: var(--success); box-shadow: 0 0 6px var(--success); }
.emp-public-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-primary);
}
.emp-public-check input { width: 15px; height: 15px; accent-color: var(--accent); }

/* === 聊天界面 === */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    display: flex;
    gap: 10px;
    max-width: 80%;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message .avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.chat-message.assistant .avatar {
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
}

.chat-message.user .avatar {
    background: rgba(99, 102, 241, 0.2);
}

.chat-message .bubble {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-message.assistant .bubble {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--border);
}

.chat-message.user .bubble {
    background: var(--accent);
    color: white;
}

.chat-input {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border);
}

.chat-input input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
}

.chat-input input:focus {
    outline: none;
    border-color: var(--accent);
}

/* === 步骤指示器 === */
.steps {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
}

.step {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    position: relative;
    color: var(--text-muted);
    font-size: 13px;
    border-bottom: 2px solid var(--border);
}

.step.active {
    color: var(--accent-hover);
    border-bottom-color: var(--accent);
}

.step.done {
    color: var(--success);
    border-bottom-color: var(--success);
}

/* === 空状态 === */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 16px;
}

/* === 加载动画 === */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: bounce 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* === Toast 提示 === */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

.toast.success { background: var(--success); color: white; }
.toast.error { background: var(--danger); color: white; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* === 标签 === */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-hover);
    margin: 2px;
}

/* === 模态框 === */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    width: 500px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* === 访问明细表格 === */
.stats-log-wrap { overflow: auto; max-height: 55vh; }
.stats-log-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stats-log-table th,
.stats-log-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.stats-log-table th { position: sticky; top: 0; background: var(--bg-secondary); color: var(--text-muted); font-weight: 600; }
.stats-log-table tbody tr:hover td { background: rgba(99, 102, 241, 0.06); }

/* === 工具类 === */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.cursor-pointer { cursor: pointer; }

/* === 移动端汉堡菜单 === */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 12px; left: 12px;
    z-index: 200;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 40px; height: 40px;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
}

/* === 公司详情页 === */
.company-card {
    position: relative;
}
.company-card::after {
    content: '→';
    position: absolute;
    right: 16px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    transition: all 0.2s;
}
.company-card:hover::after {
    color: var(--accent-hover);
    transform: translateY(-50%) translateX(4px);
}

.status-banner {
    display: flex;
    align-items: center;
}
.status-banner.draft {
    border-left: 3px solid var(--warning);
}
.status-banner.active {
    border-left: 3px solid var(--success);
}

.canvas-item {
    padding: 12px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.canvas-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.canvas-value {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
}

/* === Skill 装配中心 === */
.skill-card {
    position: relative;
}
.skill-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}
.skill-name {
    font-size: 15px;
    font-weight: 600;
    margin-top: 12px;
}
.assign-row {
    cursor: pointer;
    transition: all 0.2s;
}
.assign-row.selected {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

/* === 财务模拟实验室 === */
.finance-tip {
    font-size: 14px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.4);
    margin-bottom: 8px;
}
.finance-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.finance-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.finance-type {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.finance-type.income {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}
.finance-type.cost {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}
.finance-info {
    flex: 1;
}
.finance-cat {
    font-size: 14px;
    font-weight: 500;
}
.finance-amount {
    font-size: 15px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}
.finance-amount.income { color: var(--success); }
.finance-amount.cost { color: var(--danger); }
.ai-analysis {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    padding: 12px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-sm);
}

/* === 经营事件 === */
.event-card {
    border-left: 3px solid var(--border);
}
.event-customer_request { border-left-color: var(--accent); }
.event-problem { border-left-color: var(--danger); }
.event-opportunity { border-left-color: var(--success); }
.event-routine { border-left-color: var(--text-muted); }
.event-processing { border-left-color: var(--warning); opacity: 0.85; }
.event-resolved { border-left-color: var(--success); opacity: 0.7; }
.event-failed { border-left-color: var(--danger); opacity: 0.7; }
.event-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 8px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-hover);
}
.event-title {
    font-size: 15px;
    font-weight: 600;
}
.event-reward {
    font-size: 13px;
    white-space: nowrap;
}
.event-employee-select {
    padding: 4px 10px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    min-width: 140px;
}
.event-employee-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* ============ 登录页动画小人（lc- = login characters） ============ */
.characters-scene {
    position: relative;
    width: 480px;
    height: 360px;
}

/* 小人基础样式 */
.lc-character {
    position: absolute;
    bottom: 0;
    transition: all 0.7s ease-in-out;
    transform-origin: bottom center;
}

/* 紫色矩形小人 */
.lc-char-purple {
    left: 60px;
    width: 170px;
    height: 370px;
    background: #6c3ff5;
    border-radius: 10px 10px 0 0;
    z-index: 1;
}

/* 黑色矩形小人 */
.lc-char-black {
    left: 220px;
    width: 115px;
    height: 290px;
    background: #2d2d2d;
    border-radius: 8px 8px 0 0;
    z-index: 2;
}

/* 橙色半圆小人 */
.lc-char-orange {
    left: 0;
    width: 230px;
    height: 190px;
    background: #ff9b6b;
    border-radius: 115px 115px 0 0;
    z-index: 3;
}

/* 黄色圆角小人 */
.lc-char-yellow {
    left: 290px;
    width: 135px;
    height: 215px;
    background: #e8d754;
    border-radius: 68px 68px 0 0;
    z-index: 4;
}

/* 眼睛容器 */
.lc-eyes {
    position: absolute;
    display: flex;
    transition: all 0.7s ease-in-out;
}

/* 眼白（白色带瞳孔） */
.lc-eyeball {
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: height 0.15s ease;
    overflow: hidden;
}

/* 瞳孔 */
.lc-pupil {
    border-radius: 50%;
    background: #2d2d2d;
    transition: transform 0.1s ease-out;
}

/* 无眼白瞳孔 */
.lc-bare-pupil {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2d2d2d;
    transition: transform 0.7s ease-in-out;
}

/* 黄色小人的嘴 */
.lc-yellow-mouth {
    position: absolute;
    width: 50px;
    height: 4px;
    background: #2d2d2d;
    border-radius: 2px;
    transition: all 0.7s ease-in-out;
}

/* 摇头动画 */
@keyframes lcShakeHead {
    0%, 100% { translate: 0 0; }
    10% { translate: -9px 0; }
    20% { translate: 7px 0; }
    30% { translate: -6px 0; }
    40% { translate: 5px 0; }
    50% { translate: -4px 0; }
    60% { translate: 3px 0; }
    70% { translate: -2px 0; }
    80% { translate: 1px 0; }
    90% { translate: -0.5px 0; }
}

.lc-eyes.lc-shake-head,
.lc-yellow-mouth.lc-shake-head,
.lc-orange-mouth.lc-shake-head {
    animation: lcShakeHead 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* 橙色小人的嘴（沮丧时向下弯） */
.lc-orange-mouth {
    position: absolute;
    width: 28px;
    height: 14px;
    border: 3px solid #2d2d2d;
    border-top: none;
    border-radius: 0 0 14px 14px;
    opacity: 0;
    transition: all 0.7s ease-in-out;
}

.lc-orange-mouth.visible {
    opacity: 1;
}

/* ===================== 登录页 4 色系换肤（底部切换，localStorage 记忆） ===================== */
/* 经典浅紫（浅色系，对应参考站原味） */
.auth-page[data-skin="violet"] {
    --accent: #7c3aed;
    --accent-hover: #8b5cf6;
    --accent-glow: rgba(124, 58, 237, 0.25);
    --bg-card: rgba(255, 255, 255, 0.62);
    --border: rgba(124, 58, 237, 0.16);
    --border-hover: rgba(124, 58, 237, 0.45);
    --text-primary: #312e81;
    --text-secondary: #6b7280;
    --text-muted: #8b8fa8;
}
.auth-page[data-skin="violet"] .auth-stage {
    background: linear-gradient(135deg, #d4d0dc 0%, #c8c4d0 50%, #bbb7c5 100%);
}
.auth-page[data-skin="violet"] .auth-stage::after { background: rgba(180, 170, 200, 0.25); }
.auth-page[data-skin="violet"] .auth-stage::before { background: rgba(160, 150, 190, 0.2); }
.auth-page[data-skin="violet"] .auth-stage-logo { color: #312e81; }
.auth-page[data-skin="violet"] .auth-stage-logo-icon { background: rgba(124, 58, 237, 0.12); }
.auth-page[data-skin="violet"] .auth-stage-slogan { color: rgba(49, 46, 129, 0.65); }
.auth-page[data-skin="violet"] .lc-char-black {
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.35), 0 0 16px rgba(124, 58, 237, 0.3);
}
.auth-page[data-skin="violet"] .form-group input,
.auth-page[data-skin="violet"] .form-group textarea,
.auth-page[data-skin="violet"] .form-group select {
    background: rgba(255, 255, 255, 0.7);
}

/* 暗夜霓虹（深蓝紫，⭐ 推荐） */
.auth-page[data-skin="neon"] {
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(139, 92, 246, 0.3);
    --bg-card: rgba(15, 18, 40, 0.55);
    --border: rgba(129, 140, 248, 0.22);
    --border-hover: rgba(129, 140, 248, 0.5);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
}
.auth-page[data-skin="neon"] .auth-stage {
    background: linear-gradient(135deg, #12142e 0%, #1a1f45 50%, #232a5c 100%);
}
.auth-page[data-skin="neon"] .auth-stage::after { background: rgba(139, 92, 246, 0.28); }
.auth-page[data-skin="neon"] .auth-stage::before { background: rgba(99, 102, 241, 0.22); }
.auth-page[data-skin="neon"] .auth-stage-logo { color: #e2e8f0; }
.auth-page[data-skin="neon"] .auth-stage-logo-icon { background: rgba(99, 102, 241, 0.25); }
.auth-page[data-skin="neon"] .auth-stage-slogan { color: rgba(226, 232, 240, 0.65); }
.auth-page[data-skin="neon"] .lc-char-black {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 0 20px rgba(139, 92, 246, 0.55);
}

/* 默认状态没 data-skin（如首次加载前闪烁）也走暗夜霓虹，与 localStorage 记忆匹配 */
.auth-page:not([data-skin]) {
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(139, 92, 246, 0.3);
    --bg-card: rgba(15, 18, 40, 0.55);
    --border: rgba(129, 140, 248, 0.22);
    --border-hover: rgba(129, 140, 248, 0.5);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
}
.auth-page:not([data-skin]) .auth-stage {
    background: linear-gradient(135deg, #12142e 0%, #1a1f45 50%, #232a5c 100%);
}
.auth-page:not([data-skin]) .auth-stage::after { background: rgba(139, 92, 246, 0.28); }
.auth-page:not([data-skin]) .auth-stage::before { background: rgba(99, 102, 241, 0.22); }
.auth-page:not([data-skin]) .auth-stage-logo { color: #e2e8f0; }
.auth-page:not([data-skin]) .auth-stage-logo-icon { background: rgba(99, 102, 241, 0.25); }
.auth-page:not([data-skin]) .auth-stage-slogan { color: rgba(226, 232, 240, 0.65); }
.auth-page:not([data-skin]) .lc-char-black {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 0 20px rgba(139, 92, 246, 0.55);
}

/* 极光青蓝（深青蓝） */
.auth-page[data-skin="aurora"] {
    --accent: #22d3ee;
    --accent-hover: #38bdf8;
    --accent-glow: rgba(34, 211, 238, 0.3);
    --bg-card: rgba(8, 28, 42, 0.55);
    --border: rgba(56, 189, 248, 0.22);
    --border-hover: rgba(56, 189, 248, 0.5);
    --text-primary: #e0f2fe;
    --text-secondary: #7fb6cc;
    --text-muted: #5e8ba3;
}
.auth-page[data-skin="aurora"] .auth-stage {
    background: linear-gradient(135deg, #0b1626 0%, #0d2b3f 50%, #11415a 100%);
}
.auth-page[data-skin="aurora"] .auth-stage::after { background: rgba(34, 211, 238, 0.2); }
.auth-page[data-skin="aurora"] .auth-stage::before { background: rgba(56, 189, 248, 0.16); }
.auth-page[data-skin="aurora"] .auth-stage-logo { color: #e0f2fe; }
.auth-page[data-skin="aurora"] .auth-stage-logo-icon { background: rgba(56, 189, 248, 0.22); }
.auth-page[data-skin="aurora"] .auth-stage-slogan { color: rgba(224, 242, 254, 0.6); }
.auth-page[data-skin="aurora"] .lc-char-black {
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.4), 0 0 18px rgba(34, 211, 238, 0.5);
}

/* 紫晶玻璃（深紫红） */
.auth-page[data-skin="amethyst"] {
    --accent: #c084fc;
    --accent-hover: #d8b4fe;
    --accent-glow: rgba(192, 132, 252, 0.3);
    --bg-card: rgba(40, 24, 66, 0.55);
    --border: rgba(192, 132, 252, 0.25);
    --border-hover: rgba(192, 132, 252, 0.5);
    --text-primary: #f5e9ff;
    --text-secondary: #bfa8e6;
    --text-muted: #9373c9;
}
.auth-page[data-skin="amethyst"] .auth-stage {
    background: linear-gradient(135deg, #1e1033 0%, #2b1850 50%, #3a1f6b 100%);
}
.auth-page[data-skin="amethyst"] .auth-stage::after { background: rgba(192, 132, 252, 0.22); }
.auth-page[data-skin="amethyst"] .auth-stage::before { background: rgba(168, 85, 247, 0.16); }
.auth-page[data-skin="amethyst"] .auth-stage-logo { color: #f5e9ff; }
.auth-page[data-skin="amethyst"] .auth-stage-logo-icon { background: rgba(192, 132, 252, 0.22); }
.auth-page[data-skin="amethyst"] .auth-stage-slogan { color: rgba(245, 233, 255, 0.6); }
.auth-page[data-skin="amethyst"] .lc-char-black {
    box-shadow: 0 0 0 2px rgba(192, 132, 252, 0.4), 0 0 18px rgba(192, 132, 252, 0.5);
}

/* 登录页换肤控件 */
.auth-skin-picker {
    position: fixed;
    bottom: 20px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
}
.auth-skin-dot {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.auth-skin-dot:hover { transform: scale(1.18); }
.auth-skin-dot.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent), 0 2px 8px rgba(0, 0, 0, 0.3);
}


/* ===================== 网站装修 ===================== */
.emoji-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.emoji-opt {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px; cursor: pointer;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: all 0.15s;
    user-select: none;
}
.emoji-opt:hover { transform: scale(1.1); border-color: var(--accent); }
.emoji-opt.active { border-color: var(--accent); background: rgba(99, 102, 241, 0.15); box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3); }

.theme-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.theme-opt {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px; cursor: pointer;
    border-radius: 999px; font-size: 13px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: all 0.15s;
    user-select: none;
}
.theme-opt:hover { border-color: var(--accent); }
.theme-opt.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25); }
.theme-swatch { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }

.switch-row {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 0; font-size: 14px; cursor: pointer;
    color: var(--text-primary);
}
.switch-row input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.msg-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(129, 140, 248, 0.12);
}
.msg-item:last-child { border-bottom: none; }

/* === 产品上架 + 模拟经营 === */
.btn-sm { padding: 4px 10px; font-size: 12px; }
.product-table { display: flex; flex-direction: column; gap: 10px; }
.product-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: rgba(129, 140, 248, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.product-thumb {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.product-info { flex: 1; min-width: 0; }
.product-info .name { font-weight: 600; font-size: 14px; }
.product-info .meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.product-actions { display: flex; gap: 6px; flex-shrink: 0; }
.product-actions .btn-sm { white-space: nowrap; }
.tag {
    display: inline-block;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 999px;
    margin-left: 6px;
    vertical-align: middle;
}
.tag-digital { color: #34d399; background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.3); }
.tag-service { color: #fbbf24; background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.3); }
.tag-on { color: #a7f3d0; background: rgba(52, 211, 153, 0.08); border: 1px solid rgba(52, 211, 153, 0.25); }
.tag-off { color: var(--text-muted); background: rgba(148, 163, 184, 0.1); border: 1px solid rgba(148, 163, 184, 0.25); }
.order-list { display: flex; flex-direction: column; }
.order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(129, 140, 248, 0.1);
    font-size: 13.5px;
}
.order-item:last-child { border-bottom: none; }
.order-product { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-customer { color: var(--text-muted); flex-shrink: 0; }
.order-amount { color: var(--success); font-weight: 700; flex-shrink: 0; }
.order-time { flex-shrink: 0; }
.order-source { font-size: 11px; padding: 1px 8px; border-radius: 999px; flex-shrink: 0; }
.src-ai { color: #818cf8; background: rgba(99, 102, 241, 0.12); border: 1px solid rgba(99, 102, 241, 0.3); }
.src-manual { color: var(--text-muted); background: rgba(148, 163, 184, 0.1); border: 1px solid rgba(148, 163, 184, 0.25); }
.order-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 10px; }
.order-company { flex-shrink: 0; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c7d2fe; font-weight: 600; }

/* === 经营模拟比赛（Arena） === */
.arena-status {
    padding: 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 16px;
}
.arena-status.race-idle { background: rgba(148, 163, 184, 0.06); }
.arena-status.race-running {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(236, 72, 153, 0.08));
    border-color: rgba(99, 102, 241, 0.35);
}
.arena-status.race-ended { background: rgba(52, 211, 153, 0.07); border-color: rgba(52, 211, 153, 0.3); }
.arena-countdown { text-align: center; padding: 6px 4px; }
.countdown-num {
    font-size: 34px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, #818cf8, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
}
.btn-race-start { font-size: 14px; padding: 9px 20px; }
.leaderboard { display: flex; flex-direction: column; }
.lb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(129, 140, 248, 0.12);
    margin-bottom: 8px;
    background: rgba(129, 140, 248, 0.04);
}
.lb-row.lb-rank-1 { border-color: rgba(251, 191, 36, 0.45); background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.04)); }
.lb-row.lb-rank-2 { border-color: rgba(148, 163, 184, 0.35); background: linear-gradient(135deg, rgba(148, 163, 184, 0.1), rgba(148, 163, 184, 0.03)); }
.lb-row.lb-rank-3 { border-color: rgba(217, 119, 83, 0.4); background: linear-gradient(135deg, rgba(217, 119, 83, 0.1), rgba(217, 119, 83, 0.03)); }
.lb-rank {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12.5px; font-weight: 700;
    background: rgba(129, 140, 248, 0.15);
    color: #c7d2fe;
    flex-shrink: 0;
}
.lb-rank-1 .lb-rank { background: #fbbf24; color: #1f2937; }
.lb-rank-2 .lb-rank { background: #cbd5e1; color: #1f2937; }
.lb-rank-3 .lb-rank { background: #d97743; color: #fff; }
.lb-emoji { font-size: 20px; flex-shrink: 0; }
.lb-info { flex: 1; min-width: 0; }
.lb-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-owner { margin-top: 2px; }
.lb-nums { text-align: right; flex-shrink: 0; }
.lb-sales { font-size: 12.5px; color: var(--text-muted); }
.lb-profit { font-weight: 800; font-size: 15px; margin-top: 2px; }
.lb-profit.pos { color: var(--success); }
.lb-profit.neg { color: #f87171; }
.live-label { font-size: 12px; color: var(--text-muted); }
.live-label.live-on { color: #34d399; animation: lb-pulse 1.6s ease-in-out infinite; }
@keyframes lb-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* === 经营榜单 Tab === */
.lb-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.lb-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--text) 5%, transparent);
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.lb-tab:hover { color: var(--text); border-color: var(--border-hover); }
.lb-tab.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.lb-live {
    font-size: 11px;
    font-weight: 700;
    color: #34d399;
    animation: lb-pulse 1.6s ease-in-out infinite;
}

/* 榜单分页 */
.lb-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}
.lb-page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--text) 5%, transparent);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.lb-page-btn:hover:not(:disabled) { color: var(--text); border-color: var(--border-hover); }
.lb-page-btn.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.lb-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* === 客观市场引擎 === */
.tag-cat { color: #fbbf24; background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.28); margin-left: 6px; }

.market-strip {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 14px;
    margin-bottom: 4px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
}
.market-strip-left { flex: 1; min-width: 200px; }
.market-label { font-size: 12px; font-weight: 600; color: #a5b4fc; margin-bottom: 4px; }
.market-hot { font-size: 13.5px; color: var(--text); line-height: 1.5; }
.market-strip-right { flex-shrink: 0; text-align: right; font-size: 12px; }

/* 项目作品选择器（产品弹窗，直通上架） */
.project-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.project-opt {
    display: flex; flex-direction: column; gap: 3px;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
    cursor: pointer; background: var(--card-bg); transition: border-color .15s, background .15s;
}
.project-opt:hover { border-color: var(--accent); }
.project-opt.active { border-color: var(--accent); background: rgba(99, 102, 241, 0.12); box-shadow: 0 0 0 1px var(--accent) inset; }
.project-opt-title { font-size: 14px; font-weight: 600; }
.project-opt-meta { font-size: 12px; color: var(--text-muted, #8b93a7); }
.project-linked {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    margin-top: 8px; padding: 10px 12px; border: 1px dashed var(--accent); border-radius: 10px;
    background: rgba(99, 102, 241, 0.08); font-size: 13px;
}

/* 品类选择器（产品弹窗） */
.cat-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.cat-opt {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 10px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all .15s;
    text-align: center;
}
.cat-opt:hover { border-color: var(--accent); }
.cat-opt.active { border-color: var(--accent); background: rgba(99, 102, 241, 0.12); box-shadow: 0 0 0 1px var(--accent) inset; }
.cat-emoji { font-size: 22px; }
.cat-name { font-size: 13px; font-weight: 600; }
.cat-cost { font-size: 11px; color: var(--text-muted); }

.cat-locked {
    padding: 10px 12px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
}

/* 档位选择器（产品弹窗） */
.tier-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tier-opt {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 10px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all .15s;
    text-align: center;
}
.tier-opt:hover { border-color: var(--accent); }
.tier-opt.active { border-color: var(--accent); background: rgba(99, 102, 241, 0.12); box-shadow: 0 0 0 1px var(--accent) inset; }
.tier-name { font-size: 13px; font-weight: 600; }
.tier-cost { font-size: 11px; color: var(--text-muted); }

/* 系统成本展示 */
.cost-box {
    display: flex; align-items: baseline; gap: 12px;
    padding: 10px 14px;
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.25);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
}
.cost-value { font-size: 18px; font-weight: 700; color: var(--success); }

/* 定价提示 */
.tip-good { color: #34d399; margin-top: 4px; }
.tip-info { color: #a5b4fc; margin-top: 4px; }
.tip-warn { color: #fbbf24; margin-top: 4px; }
.tip-bad { color: #f87171; margin-top: 4px; }

/* 产品行评分 */
.product-score { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.score-badge {
    display: inline-block;
    font-size: 11px; font-weight: 700;
    padding: 1px 9px;
    border-radius: 999px;
    flex-shrink: 0;
}
.score-high { color: #34d399; background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.3); }
.score-mid { color: #fbbf24; background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.3); }
.score-low { color: #f87171; background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.3); }
.score-detail { font-size: 11px; color: var(--text-muted); }
.product-feedback {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.08);
    border-left: 2px solid var(--accent);
    padding: 4px 9px;
    border-radius: 0 6px 6px 0;
    line-height: 1.5;
}
.product-feedback .fb-label { color: var(--accent); font-weight: 600; margin-right: 5px; }
.feedback-box {
    background: rgba(148, 163, 184, 0.08);
    border-left: 2px solid var(--accent);
    padding: 9px 11px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
}

/* 结算报告弹窗 */
.modal-wide { width: min(760px, 94vw); }
.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 6px 0 4px;
}
.report-sum {
    padding: 10px;
    text-align: center;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.report-num { font-size: 17px; font-weight: 700; color: var(--text); }
.report-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.report-item {
    padding: 12px 14px;
    margin-top: 10px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.report-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.report-item-name { font-weight: 600; font-size: 14px; }
.report-text {
    font-family: inherit;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    background: rgba(0, 0, 0, 0.18);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
}

@media (max-width: 640px) {
    .tier-picker { grid-template-columns: 1fr; }
    .market-strip-right { text-align: left; }
}

/* ==================== AI 海报工坊 ==================== */
.poster-grid {
    display: grid;
    grid-template-columns: minmax(300px, 400px) 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
}
.poster-panel { padding: 20px; }
.poster-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: rgba(15, 23, 42, 0.5);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border);
}
.poster-tabs button {
    flex: 1;
    padding: 8px 10px;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all .18s;
}
.poster-tabs button.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.85), rgba(139, 92, 246, 0.85));
    color: #fff;
    font-weight: 600;
}
.poster-ref { margin-bottom: 16px; }
.ref-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    background: rgba(15, 23, 42, 0.5);
    border: 1.5px dashed var(--border);
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    text-align: center;
    font-size: 13.5px;
    color: var(--text-secondary);
    transition: border-color .2s;
}
.ref-thumb:hover { border-color: var(--accent); }
.ref-thumb img { width: 100%; max-height: 220px; object-fit: contain; }
.ref-thumb small { font-size: 12px; color: var(--text-muted); }
.ref-actions { display: flex; gap: 8px; margin-top: 8px; }
.scale-row { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.scale-row input[type=range] { width: 100%; accent-color: var(--accent, #6366f1); }
.prompt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chip {
    padding: 5px 12px;
    font-size: 12.5px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(99, 102, 241, 0.08);
    color: #a5b4fc;
    cursor: pointer;
    transition: all .15s;
}
.chip:hover { border-color: var(--accent); background: rgba(99, 102, 241, 0.18); color: #c7d2fe; }
.poster-error { margin-top: 10px; font-size: 13px; color: #f87171; }
.poster-result { min-height: 420px; }
.poster-result img {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    margin-bottom: 12px;
}
.poster-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 海报排版编辑器 */
.poster-editor-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.poster-editor-actions { display: flex; gap: 10px; }
.poster-editor-body {
    display: grid;
    grid-template-columns: minmax(260px, 420px) 1fr;
    gap: 20px;
    align-items: start;
}
.poster-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}
.poster-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.poster-line {
    position: absolute;
    left: 50%;
    top: 10%;
    transform: translate(-50%, -50%);
    width: 90%;
    text-align: center;
    white-space: pre-wrap;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
    line-height: 1.35;
    word-break: break-word;
}
.poster-controls { display: flex; flex-direction: column; gap: 14px; }
.poster-line-ctl {
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.ctl-head { font-size: 12.5px; font-weight: 600; color: #a5b4fc; margin-bottom: 8px; }
.ctl-text {
    width: 100%;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13.5px;
    margin-bottom: 8px;
}
.ctl-text:focus { outline: none; border-color: var(--accent); }
.ctl-row { display: flex; gap: 8px; align-items: center; }
.ctl-row input[type=color] {
    width: 42px; height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    padding: 2px;
    cursor: pointer;
}
.ctl-select {
    flex: 1;
    padding: 7px 10px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
}

/* 历史作品 */
.poster-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.5);
}
.gallery-item img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    cursor: pointer;
    transition: transform .2s;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-actions { display: flex; gap: 4px; padding: 6px; }
.gallery-actions button, .gallery-actions a {
    flex: 1;
    padding: 4px 2px;
    font-size: 11.5px;
    text-align: center;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: rgba(99, 102, 241, 0.08);
    color: #a5b4fc;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
}
.gallery-actions button:hover, .gallery-actions a:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.2);
    color: #fff;
}

@media (max-width: 900px) {
    .poster-grid { grid-template-columns: 1fr; }
    .poster-editor-body { grid-template-columns: 1fr; }
}

/* ===================== AI 项目开发 ===================== */
.project-layout { display: grid; grid-template-columns: 380px 1fr; gap: 16px; align-items: start; }
.project-list { display: flex; flex-direction: column; gap: 10px; }
.project-item {
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all .15s;
}
.project-item:hover { border-color: var(--accent); background: rgba(99, 102, 241, 0.08); }
.project-item.active { border-color: var(--accent); background: rgba(99, 102, 241, 0.12); box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25); }
.project-item-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.project-item-head b { font-size: 14.5px; color: var(--text-primary); }
.project-item-idea {
    font-size: 12.5px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}
.project-item-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--text-muted); }

/* 状态徽章 */
.status-badge {
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}
.status-badge.st-planning { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; }
.status-badge.st-developing { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-badge.st-done { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.status-badge.st-other { background: rgba(139, 92, 246, 0.15); color: #c4b5fd; }

/* 项目详情 */
.project-detail { margin-top: 16px; }
.project-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.project-detail-head h3 { margin: 0 0 4px; }
.project-detail-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.project-edit {
    padding: 14px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 16px;
}
.project-edit-actions { display: flex; gap: 8px; }

/* 方案文档 */
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.plan-block { margin-bottom: 14px; }
.plan-label { font-size: 12.5px; font-weight: 600; color: #a5b4fc; margin-bottom: 8px; letter-spacing: .5px; }
.plan-text {
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-primary);
}
.feature-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.feature-tag {
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 999px;
    font-size: 13px;
    color: #c7d2fe;
}

/* 开发步骤时间线 */
.step-timeline { display: flex; flex-direction: column; }
.step-item { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.step-item:last-child { padding-bottom: 0; }
.step-item::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 38px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.5), rgba(99, 102, 241, 0.08));
}
.step-item:last-child::before { display: none; }
.step-marker {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 2px 10px var(--accent-glow);
}
.step-body { padding-top: 3px; }
.step-body b { font-size: 14px; color: var(--text-primary); }
.step-body .text-muted { margin-top: 2px; line-height: 1.55; }

/* 状态流转 */
.status-flow {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    margin-top: 6px;
    border-top: 1px dashed var(--border);
}

/* 作品墙 */
.works-card { margin-bottom: 16px; }
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.work-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .2s, transform .2s;
}
.work-item:hover { border-color: #6366f1; transform: translateY(-2px); }
.work-icon { font-size: 26px; }
.work-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.work-meta { line-height: 1.4; }

/* 作品集 */
.nav-sub { padding-left: 30px; font-size: 13px; }
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.portfolio-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .2s, transform .2s;
}
.portfolio-card:hover { border-color: #6366f1; transform: translateY(-2px); }
.portfolio-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.portfolio-icon { font-size: 26px; }
.portfolio-name { font-size: 15px; font-weight: 600; color: var(--text-primary); line-height: 1.35; }
.portfolio-owner { font-size: 12.5px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; }
.portfolio-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 39px;
}
.portfolio-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; margin-top: auto; }

.portfolio-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.portfolio-preview { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.portfolio-preview-frame { width: 100%; height: 640px; border: 0; display: block; }
.portfolio-preview-url { padding: 24px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }

@media (max-width: 900px) {
    .portfolio-detail-grid { grid-template-columns: 1fr; }
    .portfolio-preview-frame { height: 480px; }
}

/* 成品挂载 */
.artifact-flag { margin-left: 4px; font-size: 13px; cursor: default; }
.artifact-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 10px;
    margin-bottom: 10px;
}
.artifact-box-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.artifact-dot { font-size: 13.5px; font-weight: 600; color: var(--success); }
.artifact-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.artifact-upload {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.artifact-upload input[type="text"], .artifact-upload input:not([type]) {
    flex: 1;
    min-width: 220px;
}
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}

/* 成品预览弹层 */
.artifact-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(2, 6, 23, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.artifact-overlay-box {
    width: min(980px, 100%);
    height: min(82vh, 100%);
    display: flex;
    flex-direction: column;
    background: #0f172a;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.artifact-overlay-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}
.artifact-overlay-head b { font-size: 14px; }
.artifact-overlay-frame {
    flex: 1;
    width: 100%;
    border: 0;
    background: #fff;
}

@media (max-width: 900px) {
    .project-layout { grid-template-columns: 1fr; }
    .plan-grid { grid-template-columns: 1fr; }
    .project-detail-head { flex-direction: column; }
    .artifact-overlay { padding: 10px; }
    .artifact-overlay-box { height: 90vh; }
}

/* ===== 网站访问统计（管理端，老师/管理员可见） ===== */
.stats-week {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 130px;
    padding: 10px 4px 0;
}
.stats-week-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    min-width: 0;
}
.stats-week-bar {
    width: 100%;
    max-width: 34px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, #8b5cf6, #6366f1);
    min-height: 2px;
    transition: height .3s;
}
.stats-week-num {
    font-size: 11px;
    color: #cbd5e1;
    margin-top: 6px;
}
.stats-week-label {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}






