/* =====================================================
   猩伙伴民宿 AI 智能体矩阵 - 优雅极简风格
   ===================================================== */

/* ==================== 变量定义 ==================== */
:root {
    --bg: #0a0a0a;
    --bg-secondary: #111111;
    --surface: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-tertiary: rgba(255, 255, 255, 0.35);
    --accent: #007AFF;
    --accent-light: rgba(0, 122, 255, 0.15);
    --success: #30D158;
    --warning: #FF9F0A;
    --purple: #BF5AF2;
    --pink: #FF375F;
}

/* ==================== 基础重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

/* 背景渐变 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 149, 0, 0.06), transparent),
        radial-gradient(ellipse 60% 40% at 90% 50%, rgba(191, 90, 242, 0.05), transparent),
        radial-gradient(ellipse 40% 30% at 10% 80%, rgba(48, 209, 88, 0.03), transparent),
        radial-gradient(ellipse 50% 40% at 20% 20%, rgba(255, 107, 53, 0.04), transparent);
    pointer-events: none;
    z-index: 0;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==================== 首页门户 ==================== */
.portal {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 24px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* 状态栏 */
.status-bar {
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
    margin-bottom: 24px;
}

.logo-mark {
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

#portalStatus {
    font-size: 12px;
    font-weight: 200;
    color: var(--text-tertiary);
}

/* Hero 区域 */
.hero {
    text-align: center;
    margin-bottom: 48px;
    max-width: 600px;
}

.hero-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.hero-icon {
    animation: float 3s ease-in-out infinite;
}

.hero-icon svg {
    width: 58px;
    height: 58px;
    filter: drop-shadow(0 4px 12px rgba(255, 149, 0, 0.3));
}

.hero-title {
    font-size: 36px;
    font-weight: 200;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text) 0%, rgba(255, 149, 0, 0.7) 50%, rgba(191, 90, 242, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.hero-title {
    font-size: 42px;
    font-weight: 200;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text) 0%, rgba(255, 149, 0, 0.7) 50%, rgba(191, 90, 242, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FF9500, transparent);
    margin: 0 auto 18px;
    border-radius: 1px;
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 200;
    color: #FF9500;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.hero-description {
    font-size: 16px;
    font-weight: 200;
    color: var(--text-tertiary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.hero-br { display: none; }

.hero-tagline {
    font-size: 15px;
    font-weight: 300;
    color: rgba(255, 149, 0, 0.7);
    margin-top: 10px;
}

/* 功能卡片网格 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    width: 100%;
    max-width: 900px;
    margin-bottom: 32px;
}

/* 功能卡片 */
.feature-card {
    position: relative;
    padding: 14px 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 
        8px 8px 20px rgba(0, 0, 0, 0.5),
        -4px -4px 12px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.feature-card:hover {
    box-shadow: 
        12px 12px 28px rgba(0, 0, 0, 0.6),
        -6px -6px 16px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.05) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.feature-card:hover {
    border-color: rgba(0, 122, 255, 0.3);
    transform: translateY(-2px);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:active {
    transform: translateY(0);
}

.feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 149, 0, 0.15);
    border: 0.5px solid rgba(255, 149, 0, 0.25);
    margin-bottom: 10px;
    color: #FF9500;
}

.feature-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.5;
}

.feature-title {
    font-size: 14px;
    font-weight: 300;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
    color: var(--text);
}

.feature-desc {
    font-size: 12px;
    font-weight: 200;
    color: var(--text-tertiary);
    line-height: 1.4;
}

.feature-arrow {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border: 0.5px solid rgba(0, 122, 255, 0.2);
    color: var(--accent);
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* 运营看板卡片 */
.dashboard-card {
    grid-column: 1 / -1;
    background: linear-gradient(145deg, rgba(72, 209, 88, 0.15), rgba(72, 209, 88, 0.03));
    border: 0.5px solid rgba(72, 209, 88, 0.25);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        8px 8px 20px rgba(0, 0, 0, 0.5),
        -4px -4px 12px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.dashboard-card:hover {
    border-color: rgba(48, 209, 88, 0.5);
    box-shadow: 
        12px 12px 28px rgba(0, 0, 0, 0.6),
        -6px -6px 16px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.dashboard-card-content {
    display: flex;
    align-items: center;
    padding: 24px 28px;
    gap: 24px;
}

.dashboard-card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex-shrink: 0;
}

.dashboard-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(48, 209, 88, 0.1);
    border: 0.5px solid rgba(48, 209, 88, 0.2);
    color: var(--success);
}

.dashboard-card-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
}

.dashboard-card-title {
    font-size: 15px;
    font-weight: 300;
    color: var(--text);
}

.dashboard-card-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}

.dashboard-card-stats {
    display: flex;
    gap: 40px;
    flex: 1;
    justify-content: center;
}

.dashboard-card-stat {
    text-align: center;
}

.dashboard-card-value {
    font-size: 24px;
    font-weight: 200;
    letter-spacing: -0.02em;
    color: var(--text);
}

.dashboard-card-label {
    font-size: 11px;
    font-weight: 200;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.dashboard-card-arrow {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(48, 209, 88, 0.1);
    border: 0.5px solid rgba(48, 209, 88, 0.2);
    color: var(--success);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.portal-footer {
    margin-top: auto;
    padding-top: 20px;
}

.portal-footer p {
    font-size: 11px;
    font-weight: 200;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}

/* ==================== 应用容器 ==================== */
.app-container {
    display: none;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.app-container.active {
    display: flex;
}

/* 应用头部 */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 0.5px solid var(--border);
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 0.5px solid var(--border);
    border-radius: 12px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.25s ease;
}

.back-btn:hover {
    border-color: rgba(0, 122, 255, 0.4);
    color: var(--accent);
    background: var(--accent-light);
}

.back-btn:active {
    transform: scale(0.97);
}

.page-title {
    font-size: 17px;
    font-weight: 300;
    letter-spacing: -0.01em;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-indicator {
    font-size: 11px;
    font-weight: 200;
    color: var(--success);
    padding: 6px 12px;
    border: 0.5px solid rgba(48, 209, 88, 0.2);
    border-radius: 12px;
    background: rgba(48, 209, 88, 0.05);
}

/* 设置按钮 */
.settings-btn {
    width: 36px;
    height: 36px;
    border: 0.5px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.settings-btn:hover {
    border-color: rgba(0, 122, 255, 0.4);
    color: var(--accent);
    background: var(--accent-light);
}

.settings-btn:active {
    transform: scale(0.95);
}

/* 应用主体 */
.app-main {
    flex: 1;
    padding: 32px 28px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

/* ==================== 聊天页面 ==================== */
.chat-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
}

.empty-state h2 {
    font-size: 24px;
    font-weight: 200;
    margin-bottom: 8px;
    color: var(--text);
}

.empty-state p {
    font-size: 14px;
    font-weight: 200;
    color: var(--text-tertiary);
}

/* 消息 */
.message {
    display: flex;
    gap: 14px;
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.ai {
    align-self: flex-start;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
    background: var(--accent-light);
    border: 0.5px solid rgba(0, 122, 255, 0.2);
    color: var(--accent);
}

.message.user .avatar {
    background: rgba(255, 159, 10, 0.1);
    border-color: rgba(255, 159, 10, 0.2);
    color: var(--warning);
}

.bubble {
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 200;
    line-height: 1.6;
    color: var(--text);
    background: var(--surface);
    border: 0.5px solid var(--border);
}

.message.user .bubble {
    background: rgba(255, 159, 10, 0.05);
    border-color: rgba(255, 159, 10, 0.15);
}

.bubble .loading {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
}

.bubble .loading::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.bubble .error {
    color: var(--pink);
}

/* Markdown 样式 */
.bubble h1, .bubble h2, .bubble h3, .bubble h4 {
    margin-top: 16px;
    margin-bottom: 8px;
    font-weight: 300;
    color: var(--text);
}

.bubble h1:first-child, .bubble h2:first-child, .bubble h3:first-child {
    margin-top: 0;
}

.bubble h2 { font-size: 18px; color: var(--accent); }
.bubble h3 { font-size: 16px; color: var(--purple); }

.bubble p {
    margin-bottom: 12px;
}

.bubble p:last-child {
    margin-bottom: 0;
}

.bubble ul, .bubble ol {
    margin: 12px 0;
    padding-left: 20px;
}

.bubble li {
    margin-bottom: 6px;
}

.bubble strong {
    font-weight: 500;
    color: var(--warning);
}

.bubble code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
    padding: 2px 6px;
    background: var(--accent-light);
    border-radius: 4px;
    color: var(--accent);
}

.bubble pre {
    margin: 12px 0;
    padding: 16px;
    background: rgba(191, 90, 242, 0.05);
    border: 0.5px solid rgba(191, 90, 242, 0.15);
    border-radius: 12px;
    overflow-x: auto;
}

.bubble pre code {
    padding: 0;
    background: none;
}

/* 输入区域 */
.input-container {
    padding: 20px 0 0;
    border-top: 0.5px solid var(--border);
}

.input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.input-wrapper textarea {
    flex: 1;
    padding: 14px 18px;
    border: 0.5px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 200;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: all 0.25s ease;
    max-height: 120px;
}

.input-wrapper textarea:focus {
    border-color: rgba(0, 122, 255, 0.4);
    background: var(--accent-light);
}

.input-wrapper textarea::placeholder {
    color: var(--text-tertiary);
}

.send-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: var(--accent);
    color: white;
    font-size: 14px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.send-btn:hover {
    background: #0A84FF;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.send-btn:active {
    transform: scale(0.97);
}

/* ==================== 运营看板页面 ==================== */
.dashboard-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-header-section {
    margin-bottom: 4px;
}

.dashboard-header-section h2 {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}

.dashboard-date {
    font-size: 12px;
    font-weight: 300;
    color: var(--text-tertiary);
}

/* 统计网格 - 苹果风格 */
.stats-grid-dashboard {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stat-item {
    padding: 16px 18px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 0.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 
        6px 6px 16px rgba(0, 0, 0, 0.4),
        -3px -3px 8px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover {
    box-shadow: 
        8px 8px 20px rgba(0, 0, 0, 0.5),
        -4px -4px 12px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 11px;
    font-weight: 300;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--text);
}

.stat-trend {
    font-size: 10px;
    font-weight: 300;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* 次要统计行 */
.stats-row-secondary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stat-item-secondary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 0.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 
        6px 6px 16px rgba(0, 0, 0, 0.4),
        -3px -3px 8px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item-secondary:hover {
    box-shadow: 
        8px 8px 20px rgba(0, 0, 0, 0.5),
        -4px -4px 12px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.stat-icon-small {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: 8px;
    color: var(--accent);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 22px;
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--text);
}

.stat-unit {
    font-size: 14px;
    font-weight: 300;
}

.stat-desc {
    font-size: 11px;
    font-weight: 300;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* 图表区域 */
.charts-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 12px;
}

.chart-panel {
    padding: 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 
        3px 3px 8px rgba(0, 0, 0, 0.25),
        -1px -1px 5px rgba(255, 255, 255, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.chart-title {
    font-size: 13px;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 12px;
}

.chart-panel canvas {
    width: 100%;
    height: 120px;
}

/* ==================== 海报工坊页面 ==================== */
.poster-workshop {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.poster-header h2 {
    font-size: 26px;
    font-weight: 200;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.poster-desc {
    font-size: 14px;
    font-weight: 200;
    color: var(--text-tertiary);
}

.poster-step {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 0.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 
        8px 8px 20px rgba(0, 0, 0, 0.45),
        -4px -4px 12px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.poster-step:hover {
    box-shadow: 
        10px 10px 24px rgba(0, 0, 0, 0.55),
        -5px -5px 14px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.poster-step.hidden {
    display: none;
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 300;
    background: var(--surface);
    border: 0.5px solid var(--border);
    color: var(--text-tertiary);
}

.step-num.active {
    background: var(--accent-light);
    border-color: rgba(0, 122, 255, 0.3);
    color: var(--accent);
}

.step-num.completed {
    background: rgba(48, 209, 88, 0.1);
    border-color: rgba(48, 209, 88, 0.3);
    color: var(--success);
}

.step-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.step-title {
    font-size: 15px;
    font-weight: 300;
    color: var(--text);
    margin-bottom: 20px;
}

.feature-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 0.5px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 200;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: all 0.25s ease;
}

.feature-form textarea:focus {
    border-color: rgba(0, 122, 255, 0.4);
}

.feature-form textarea::placeholder {
    color: var(--text-tertiary);
}

.ratio-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 200;
    color: var(--text-secondary);
}

.ratio-selector select {
    padding: 10px 14px;
    border: 0.5px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 200;
    outline: none;
    cursor: pointer;
}

/* 提示词编辑器 */
.prompt-editor {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.prompt-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prompt-field label {
    font-size: 12px;
    font-weight: 200;
    color: var(--text-secondary);
}

.prompt-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 0.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 200;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: all 0.25s ease;
}

.prompt-field textarea:focus {
    border-color: rgba(0, 122, 255, 0.4);
}

.prompt-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* 海报加载 */
.poster-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 0.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 
        8px 8px 20px rgba(0, 0, 0, 0.45),
        -4px -4px 12px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.poster-loading.hidden {
    display: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.poster-loading p {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 200;
    color: var(--text-secondary);
}

/* 海报结果 */
.poster-result {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 0.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 
        8px 8px 20px rgba(0, 0, 0, 0.45),
        -4px -4px 12px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.poster-result.hidden {
    display: none;
}

.generated-image {
    margin: 20px 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface);
    border: 0.5px solid var(--border);
}

.generated-image img {
    width: 100%;
    height: auto;
    display: block;
}

.image-actions {
    display: flex;
    gap: 12px;
}

/* ==================== 响应式布局 ==================== */
@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-row, .stats-row-secondary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .portal {
        padding: 32px 16px;
    }
    
    .hero {
        margin-bottom: 40px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .feature-card {
        padding: 24px 20px;
    }
    
    .dashboard-card-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .dashboard-card-stats {
        gap: 24px;
        justify-content: flex-start;
    }
    
    .stat-row, .stats-row-secondary {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .stat-item {
        padding: 14px 14px;
    }
    
    .stat-item-secondary {
        padding: 12px 12px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .stat-number {
        font-size: 18px;
    }
    
    .app-main {
        padding: 20px 16px;
    }
    
    .app-header {
        padding: 16px 20px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .input-wrapper {
        flex-direction: column;
    }
    
    .send-btn {
        width: 100%;
        padding: 14px;
    }
    
    .portal-footer {
        padding-top: 32px;
    }
    
    .dashboard-page {
        gap: 16px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .stat-desc {
        font-size: 10px;
    }
}
