/* 全局样式 - 参考与首页 home.css 统一配色 */
:root {
    /* 主色调 - 深蓝科技风（与首页一致） */
    --primary-color: #6366F1;
    --primary-light: #818CF8;
    --primary-dark: #4F46E5;
    
    /* 辅助色 */
    --success-color: #10B981;
    --warning-color: #faad14;
    --danger-color: #EF4444;
    --info-color: #3B82F6;
    
    /* 中性色 */
    --bg-color: #f5f6fa;
    --card-bg: #ffffff;
    --border-color: #e8ecf1;
    --text-primary: #1a1a2e;
    --text-secondary: #666666;
    --text-muted: #999999;
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", 
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, 
                 Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航栏 */
.header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.pool-summary {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
}

.pool-summary-text {
    font-size: 0.9rem;
    color: white;
}

.pool-summary .highlight {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffeb3b;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
}

.user-icon {
    font-size: 1.2rem;
}

.username {
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
}

.btn-logout {
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

/* 主内容区 */
.main-content {
    padding: 2rem 0;
}

/* 操作栏 */
.action-bar {
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-end;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

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

.btn-default {
    background: #f0f0f0;
    color: var(--text-primary);
}

.btn-default:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: var(--danger-color);
    color: #fff;
}

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

.icon {
    vertical-align: middle;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    text-align: center;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* 错误状态 */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    text-align: center;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.error-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    filter: grayscale(100%);
    opacity: 0.6;
}

.error-state h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.error-state p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* 大按钮 */
.btn-large {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(44, 95, 45, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-large:hover {
    box-shadow: 0 6px 16px rgba(44, 95, 45, 0.3);
    transform: translateY(-2px);
}

.btn-large .icon {
    display: inline-block;
}

/* 股票池列表 */
.pools-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* 居中布局（空状态下只显示创建卡片） */
.pools-list.pools-list-center {
    display: flex;
    justify-content: center;
    padding: 3rem 0;
}
.pools-list.pools-list-center .pool-card-create {
    width: 320px;
    min-height: 180px;
}

.pool-card {
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.pool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light); box-shadow: 0 4px 20px rgba(99,102,241,.12);
}

.pool-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.pool-card h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 600;
}

.stock-count-badge {
    padding: 4px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.pool-card-description {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    min-height: 3rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.pool-card-footer {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pool-card-date {
    flex: 1;
}

/* 股票池卡片删除按钮 - 与创建按钮同色系 */
.btn-pool-delete {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-size: 12px;
    color: #6366F1;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.btn-pool-delete:hover {
    color: #fff;
    background: #6366F1;
    border-color: #6366F1;
}

.btn-pool-delete:active {
    background: #4F46E5;
    border-color: #4F46E5;
}

.btn-pool-delete svg {
    flex-shrink: 0;
}

/* 删除确认按钮 - 红色警告 */
.btn-pool-delete-confirm {
    padding: 8px 20px;
    font-size: 14px;
    color: #fff;
    background: #e63946;
    border: 1px solid #e63946;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-pool-delete-confirm:hover {
    background: #d32f3f;
    border-color: #d32f3f;
}

.btn-pool-delete-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 8px;
    width: 100%;
}

.search-box input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.search-box input:focus {
    border-color: #40a9ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 搜索结果 */
.search-results {
    margin-bottom: 24px;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f5f5f5;
}

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

.stock-code {
    color: #1890ff;
    font-weight: bold;
}

/* 股票卡片容器 */
.stocks-container {
    min-height: 200px;
}

/* 股票卡片 */
.stock-card {
    position: relative;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.25s ease;
    border: 1px solid #f0f0f0;
}

.stock-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    border-color: #e0e0e0;
}

.stock-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f5f5f5;
}

.stock-title {
    flex: 1;
}

.stock-title h4 {
    font-size: 17px;
    font-weight: 600;
    color: #1f1f1f;
    margin-bottom: 6px;
    line-height: 1.3;
}

.stock-title .stock-code {
    font-size: 13px;
    color: #8c8c8c;
    font-weight: 400;
    font-family: 'Monaco', 'Menlo', monospace;
}

.remove-btn {
    padding: 6px;
    border: none;
    background: transparent;
    color: #bfbfbf;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 6px;
    flex-shrink: 0;
    margin-left: 8px;
}

.remove-btn:hover {
    background: #fff1f0;
    color: #ff4d4f;
}

/* 价格区域 */
.stock-price-section {
    margin-bottom: 16px;
}

.stock-price {
    font-size: 32px;
    font-weight: 700;
    color: #262626;
    margin-bottom: 8px;
    line-height: 1.2;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', sans-serif;
}

.stock-price.up {
    color: #ff4d4f;
}

.stock-price.down {
    color: #52c41a;
}

.stock-price.loading {
    color: #bfbfbf;
    font-size: 24px;
}

/* 涨跌幅标签 */
.stock-change-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stock-change {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.stock-change.up {
    background: #fff1f0;
    color: #ff4d4f;
}

.stock-change.up::before {
    content: '▲ ';
    font-size: 10px;
    margin-right: 2px;
}

.stock-change.down {
    background: #f6ffed;
    color: #52c41a;
}

.stock-change.down::before {
    content: '▼ ';
    font-size: 10px;
    margin-right: 2px;
}

.stock-change.flat {
    background: #f5f5f5;
    color: #8c8c8c;
}

/* 价格类型标签 */
.price-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    background: #f0f0f0;
    color: #8c8c8c;
    font-weight: 500;
}

.price-type-badge.realtime {
    background: #e6f7ff;
    color: #1890ff;
}

/* 成交量成交额信息 */
.stock-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #f5f5f5;
}

.stock-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stock-meta-item > span:first-child {
    font-size: 12px;
    color: #8c8c8c;
    font-weight: 400;
}

.stock-meta-item > span:last-child {
    font-size: 14px;
    color: #262626;
    font-weight: 600;
}


/* 对话框 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.dialog {
    width: 90%;
    max-width: 520px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.dialog-header h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.close-btn {
    padding: 0;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
    border-radius: 50%;
}

.close-btn:hover {
    color: var(--text-primary);
    background: var(--bg-color);
}

.dialog-body {
    padding: 1.5rem;
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* 表单 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.required {
    color: var(--danger-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* 错误页面 */
.error-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-color);
}

.error-box {
    padding: 40px;
    background: #fff;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.error-icon {
    margin-bottom: 20px;
    font-size: 3rem;
}

.error-box h1 {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.error-message {
    margin-bottom: 24px;
    color: var(--text-secondary);
}

/* 响应式 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-right {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .pool-summary,
    .user-info {
        width: 100%;
        justify-content: center;
    }
    
    .pools-list {
        grid-template-columns: 1fr;
    }
    
    .dialog {
        width: 95%;
    }
}

/* ==================== 详情页面专属样式 ==================== */

/* 头部布局 */
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.header-title-row {
    padding-top: 8px;
}

.pool-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.5px;
}

/* 返回按钮 */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-2px);
}

/* 详情页头部操作按钮 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-header-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-header-action:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.btn-danger-outline {
    border-color: rgba(245, 34, 45, 0.5);
    background: rgba(245, 34, 45, 0.15);
}

.btn-danger-outline:hover {
    background: rgba(245, 34, 45, 0.25);
    border-color: rgba(245, 34, 45, 0.8);
}

/* 股票池描述区域 */
.pool-description-section {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

.pool-description-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.pool-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 8px 0 0 0;
    font-style: italic;
}

/* 搜索输入框优化 */
.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.1);
}

/* 加载状态 */
.loading-state {
    /* 使用绝对定位或flex让loading在父容器中居中 */
    grid-column: 1 / -1; /* 占据整个网格行 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px; /* 与容器高度一致 */
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.loading-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* 提示信息区域 */
.info-tips {
    margin-top: 2rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--info-color);
}

.info-tips p {
    margin: 0;
    padding: 4px 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.8;
}

.info-tips strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* 详情页空股票状态 */
.empty-stock-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.empty-stock-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.empty-stock-state h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.empty-stock-state p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 400px;
}

/* 分享对话框优化 */
.share-info {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 14px;
}

.share-url-box {
    display: flex;
    gap: 12px;
    margin-bottom: 1rem;
}

.share-url-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-color);
    font-family: 'Monaco', 'Menlo', monospace;
}

.expire-time {
    margin: 0;
    padding: 8px 12px;
    background: #fffbe6;
    border-left: 3px solid var(--warning-color);
    border-radius: var(--radius-sm);
    color: #ad6800;
    font-size: 13px;
}

/* 编辑按钮样式补充 */
.btn-text {
    background: transparent;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .header-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .btn-header-action {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .btn-back {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .pool-description-section {
        padding: 1rem 0;
    }
    
    .info-tips {
        margin-top: 1.5rem;
        padding: 0.8rem;
    }
    
    .share-url-box {
        flex-direction: column;
    }
}

/* ==================== 统一导航头部（与首页一致） ==================== */

/* 头部样式已统一使用 /index/css/home.css，此处不再重复定义 */

/* 股票池页面额外样式 */
.pool-stat { font-size: 12px; color: rgba(255,255,255,.6); }
.pool-stat .pool-cnt { color: #FFD700; font-weight: 700; font-size: 14px; }

@media (max-width: 1024px) { .pool-stat { display: none; } }
@media (max-width: 768px) { .pool-stat { display: none; } }

/* 页面背景 & 卡片配色 */

    .pool-card { padding: 14px; }
    .container { padding: 0 12px; }
}

/* 创建股票池卡片 */
.pool-card-create {
    border: 2px dashed #818CF8;
    background: rgba(99, 102, 241, 0.05);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}
.pool-card-create:hover {
    border-color: #4F46E5;
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}
.create-card-inner {
    text-align: center;
    padding: 20px;
}
.create-card-icon {
    color: #6366F1;
    margin-bottom: 12px;
    transition: color 0.3s;
}
.pool-card-create:hover .create-card-icon {
    color: #4F46E5;
}
.create-card-text {
    font-size: 15px;
    font-weight: 600;
    color: #6366F1;
    transition: color 0.3s;
}
.pool-card-create:hover .create-card-text {
    color: #4F46E5;
}

/* 管理员专属卡片：其他人股票池 */
.pool-card-admin {
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
    border: none;
    color: #fff;
    overflow: hidden;
}
.pool-card-admin::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 85% 15%, rgba(255,255,255,0.25) 0%, transparent 40%),
        radial-gradient(circle at 15% 85%, rgba(255,255,255,0.15) 0%, transparent 40%);
    pointer-events: none;
}
.pool-card-admin:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.4);
}
.admin-card-inner {
    position: relative;
    text-align: center;
    padding: 20px;
    z-index: 1;
}
.admin-card-icon {
    color: #fff;
    margin-bottom: 10px;
    opacity: 0.95;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}
.admin-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}
.admin-card-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 10px;
}
.admin-card-badge {
    display: inline-block;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #6366F1;
    background: #fff;
    border-radius: 10px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 股票池详情页操作栏 */
.pool-toolbar {
    background: #fff;
    border-bottom: 1px solid #e8ecf1;
    padding: 12px 0;
}
/* 统一单行布局：左返回 | 中标题 | 右操作 */
.pool-toolbar .toolbar-unified {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    min-height: 40px;
}
.pool-toolbar .toolbar-unified > .pool-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    white-space: nowrap;
    pointer-events: none;
}
.pool-toolbar .toolbar-right-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.pool-toolbar .btn-header-action {
    padding: 6px 14px;
    border: 1px solid #C7D2FE;
    border-radius: 8px;
    background: #EEF2FF;
    color: #6366F1;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.pool-toolbar .btn-header-action:hover {
    border-color: #6366F1;
    color: #fff;
    background: #6366F1;
}
.pool-toolbar .btn-danger-outline {
    color: #EF4444;
    border-color: #FECACA;
}
.pool-toolbar .btn-danger-outline:hover {
    background: #FEF2F2;
    border-color: #EF4444;
}

/* ===== 视图切换按钮 ===== */
.pool-toolbar .view-toggle {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.pool-toolbar .view-toggle-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #e8ecf1; border-radius: 6px;
    background: #fff; color: #9CA3AF;
    cursor: pointer; transition: all 0.15s; padding: 0;
}
.pool-toolbar .view-toggle-btn:hover { color: #6366F1; border-color: #6366F1; }
.pool-toolbar .view-toggle-btn.active { color: #6366F1; background: #F5F3FF; border-color: #6366F1; }

/* ===== 列表视图模式 ===== */
.stocks-container.list-view {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    min-height: auto;
}
.stocks-container.card-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* 列表头部 */
.stock-list-header {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #E8F4FD;
    border-bottom: 2px solid #B3D9F2;
    font-size: 12px;
    font-weight: 600;
    color: #2C6FA0;
    position: sticky;
    top: 0;
    z-index: 1;
}
.stock-list-header .stock-list-col {
    color: #2C6FA0;
}

/* 列表行 */
.stock-list-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #F3F4F6;
    font-size: 13px;
    transition: background 0.15s;
}
.stock-list-item:last-child { border-bottom: none; }
.stock-list-item:hover { background: #F9FAFB; }

/* 列表 - 数据列（均分宽度） */
.stock-list-col {
    flex: 1;
    text-align: left;
    font-size: 13px;
    color: #374151;
    padding: 0 8px;
    white-space: nowrap;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stock-list-col.col-action {
    flex: 0 0 80px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 列表 - 股票名称 */
.stock-list-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 列表 - 股票代码 */
.stock-list-code {
    font-size: 12px;
    color: #6B7280;
    font-family: 'Monaco', 'Menlo', monospace;
}

/* 列表 - 价格值 */
.price-val {
    font-weight: 700;
    font-size: 14px;
}
.price-val.up { color: #E03131; }
.price-val.down { color: #2F9E44; }

/* 列表 - 涨跌幅值 */
.change-val {
    font-weight: 600;
    font-size: 13px;
}
.change-val.up { color: #E03131; }
.change-val.down { color: #2F9E44; }
.change-val.flat { color: #9CA3AF; }

/* 列表 - 删除按钮 */
.stock-list-remove {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #D1D5DB;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s;
    padding: 0;
}
.stock-list-remove:hover {
    background: #FEF2F2;
    color: #EF4444;
}

/* ===== 手机端自适应 ===== */
@media (max-width: 640px) {
    .pool-toolbar .btn-header-action { padding: 5px 10px; font-size: 12px; }
    .pool-toolbar .toolbar-unified > .pool-title { font-size: 16px; }
    .pool-toolbar .view-toggle-btn { width: 28px; height: 28px; }
    /* 列表模式 - 手机端 */
    .stock-list-header { font-size: 11px; padding: 8px 12px; }
    .stock-list-item { padding: 10px 12px; font-size: 12px; }
    .stock-list-col.hide-mobile { display: none; }
    .stock-list-name { font-size: 12px; }
    .stock-list-code { font-size: 11px; }
    .price-val { font-size: 13px; }
    .change-val { font-size: 12px; }
    .stock-list-remove { width: 28px; height: 28px; flex: 0 0 28px; }
    .stock-list-col.price-col { flex: 1.5; }
    /* 卡片模式 - 手机端 */
    .stocks-container.card-view { grid-template-columns: 1fr; }
}

/* ===== 搜索结果 · 行情表格样式（类似图一） ===== */
.search-quote-table {
    margin-bottom: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid #eef0f3;
}
.search-quote-row {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #f2f3f5;
    transition: background .18s;
    gap: 10px;
}
.search-quote-row:last-child { border-bottom: none; }
.search-quote-row:hover { background: #f7faff; }
.search-quote-row.is-joined { background: #fafbfc; }
.search-quote-row .sq-info {
    flex: 0 0 160px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.search-quote-row .sq-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2329;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-quote-row .sq-code {
    font-size: 12px;
    color: #8f959e;
    margin-top: 2px;
    font-family: "SF Mono", Consolas, Monaco, monospace;
}
.search-quote-row .sq-col {
    flex: 1;
    text-align: center;
    font-size: 14px;
    color: #4e5969;
    font-variant-numeric: tabular-nums;
    font-family: "SF Mono", Consolas, Monaco, monospace;
}
.search-quote-row .sq-price {
    font-size: 16px;
    font-weight: 700;
    flex: 1.1;
}
.search-quote-row .sq-change {
    font-size: 14px;
    font-weight: 600;
    flex: 1.1;
}
.search-quote-row .sq-col.up, .search-quote-row .sq-price.up, .search-quote-row .sq-change.up { color: #e63946; }
.search-quote-row .sq-col.down, .search-quote-row .sq-price.down, .search-quote-row .sq-change.down { color: #2ba471; }
.search-quote-row .sq-col.flat, .search-quote-row .sq-price.flat, .search-quote-row .sq-change.flat { color: #8a8f99; }

.search-quote-row .sq-action {
    flex: 0 0 64px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.sq-add-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1890ff;
    color: #fff;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.28);
    transition: transform .15s, background .18s, box-shadow .18s;
}
.sq-add-btn:hover { background: #0f7ae5; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(24, 144, 255, 0.36); }
.sq-add-btn:active { transform: translateY(0); }
.sq-joined-tag {
    font-size: 12px;
    color: #8f959e;
    background: #f2f3f5;
    border-radius: 12px;
    padding: 4px 12px;
    white-space: nowrap;
}

.search-quote-empty {
    margin-bottom: 20px;
    padding: 28px 16px;
    background: #fff;
    border-radius: 10px;
    text-align: center;
    color: #8f959e;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px dashed #e6e8eb;
}

/* 加入后高亮定位闪烁 */
@keyframes stockFlash {
    0%   { background: #e6f4ff; }
    70%  { background: #e6f4ff; }
    100% { background: transparent; }
}
.stock-highlight-flash { animation: stockFlash 1.8s ease-out; }

/* 手机端：行情表隐藏中间列，保留名称/价格/涨跌幅/按钮 */
@media (max-width: 640px) {
    .search-quote-row { padding: 12px 14px; gap: 6px; }
    .search-quote-row .sq-info { flex: 0 0 110px; }
    .search-quote-row .sq-name { font-size: 14px; }
    .search-quote-row .sq-price { font-size: 14px; }
    .search-quote-row .sq-change { font-size: 13px; }
    .search-quote-row .hide-mobile { display: none; }
    .search-quote-row .sq-action { flex: 0 0 48px; }
    .sq-add-btn { width: 28px; height: 28px; }
}

/* ==================== 股票名称/代码 点击跳转详情 ==================== */
.stock-link {
    cursor: pointer;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.stock-link:hover {
    color: #2563eb !important;
    text-decoration: underline;
    text-decoration-color: #2563eb;
}

/* ==================== 股票星标（重点关注）按钮 ==================== */
/* 卡片模式里，remove-btn 和 star-btn 并列放在右侧 */
.stock-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.star-btn {
    padding: 6px;
    border: none;
    background: transparent;
    color: #D1D5DB;
    cursor: pointer;
    transition: transform 0.15s ease, color 0.15s ease, background 0.15s ease;
    border-radius: 6px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.star-btn:hover {
    background: #FFFBEB;
    color: #F59E0B;
    transform: scale(1.08);
}
.star-btn:active {
    transform: scale(0.92);
}
.star-btn.active {
    color: #F59E0B;
}
.star-btn.active:hover {
    background: #FEF3C7;
    color: #D97706;
}
/* 点击瞬间的"弹跳+高亮"动画 */
@keyframes star-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.4) rotate(-10deg); }
    70%  { transform: scale(0.92) rotate(6deg); }
    100% { transform: scale(1); }
}
.star-btn.active svg {
    animation: star-pop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 1px 2px rgba(245, 158, 11, 0.3));
}

/* 列表模式下的星标按钮尺寸小一点 */
.star-btn-sm {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin-left: 4px;
    padding: 0;
}

/* 已星标卡片的视觉强化：左侧小竖条 + 轻微金色光晕 */
.stock-card.is-starred {
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.12), 0 0 0 1px rgba(245, 158, 11, 0.25);
}
.stock-card.is-starred::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #F59E0B, #FBBF24);
    border-radius: 12px 0 0 12px;
}
.stock-card { position: relative; }

/* 已星标列表行的视觉强化：左侧金色细条 */
.stock-list-item.is-starred {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.04) 0%, transparent 40%);
}
.stock-list-item.is-starred::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #F59E0B;
}
.stock-list-item { position: relative; }

/* 手机端适配 */
@media (max-width: 640px) {
    .star-btn-sm { width: 28px; height: 28px; flex: 0 0 28px; }
    .star-btn { padding: 5px; }
}
