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

:root {
    --primary: #007AFF;
    --primary-dark: #0056CC;
    --success: #FF3B30;  /* 红色表示正收益 */
    --danger: #34C759;   /* 绿色表示亏损 */
    --warning: #FF9500;
    --background: #F5F5F7;
    --card-bg: #FFFFFF;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --border: #D2D2D7;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius: 16px;
    --radius-sm: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* 微信浏览器兼容 */
    -webkit-overflow-scrolling: touch;
}

.app {
    min-height: 100vh;
}

/* Header */
.header {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.logo svg {
    color: var(--primary);
}

/* Logo链接样式 */
.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none !important;
    transition: var(--transition);
    border-bottom: none !important;
    -webkit-tap-highlight-color: transparent;
}

.logo-link:hover,
.logo-link:active,
.logo-link:visited {
    opacity: 0.8;
    text-decoration: none !important;
    border-bottom: none !important;
    color: inherit;
}

.logo-link .logo-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none !important;
    border-bottom: none !important;
}

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

.nav-tab {
    padding: 8px 16px;
    border-radius: 100px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.nav-tab:hover {
    background: var(--background);
    color: var(--text-primary);
}

.nav-tab.active {
    background: var(--primary);
    color: white;
}

/* Main Content */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* Hidden */
.hidden {
    display: none !important;
}

/* Stats Section */
.stats-section {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
}

/* 投资动态标题样式 */
.investment-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
}

.investment-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.investment-date {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

/* 新布局：最新成果 + 右侧统计 */
.stats-grid.new-layout {
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.right-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.right-stats .stat-card.small {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px;
}

.right-stats .stat-card.small .stat-value {
    font-size: 28px;
}

/* 最新成果卡片 */
.latest-results-card {
    display: flex;
    flex-direction: column;
    min-height: 180px;
    position: relative;
}

/* 闪烁文字效果 - 更吸睛 */
.flash-text {
    animation: flash 1.5s ease-in-out infinite;
    font-weight: 800;
    font-size: 18px;
    color: #ff6b35;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes flash {
    0%, 100% {
        opacity: 1;
        color: #ff6b35;
        text-shadow: 
            0 0 10px rgba(255, 107, 53, 0.8),
            0 0 20px rgba(255, 107, 53, 0.6),
            0 0 30px rgba(255, 107, 53, 0.4);
        transform: scale(1);
    }
    25% {
        color: #ff8c42;
        text-shadow: 
            0 0 15px rgba(255, 140, 66, 0.9),
            0 0 30px rgba(255, 140, 66, 0.7),
            0 0 45px rgba(255, 140, 66, 0.5);
    }
    50% {
        opacity: 0.85;
        color: #ffa94d;
        text-shadow: 
            0 0 20px rgba(255, 169, 77, 1),
            0 0 40px rgba(255, 169, 77, 0.8),
            0 0 60px rgba(255, 169, 77, 0.6);
        transform: scale(1.02);
    }
    75% {
        color: #ff8c42;
        text-shadow: 
            0 0 15px rgba(255, 140, 66, 0.9),
            0 0 30px rgba(255, 140, 66, 0.7),
            0 0 45px rgba(255, 140, 66, 0.5);
    }
}

/* 最新成果内容区 */
.latest-results-content {
    flex: 1;
    overflow: hidden;
    margin: 12px 0;
}

.results-scroll-container {
    height: 100px;
    overflow: hidden;
    position: relative;
}

.results-list {
    animation: scrollUp 15s linear infinite;
}

.results-list:hover {
    animation-play-state: paused;
}

@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.result-item {
    padding: 6px 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
}

.result-date {
    color: var(--text-secondary);
    font-size: 12px;
}

.result-stock {
    font-weight: 600;
    color: var(--primary);
}

.result-return {
    font-weight: 600;
}

.result-return.positive {
    color: var(--success);
}

.result-return.negative {
    color: var(--danger);
}

/* 底部详情链接 */
.latest-results-footer {
    text-align: right;
    margin-top: auto;
    padding-top: 8px;
}

.detail-link {
    font-size: 13px;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.detail-link:hover {
    text-decoration: underline;
}

/* 最新成果详情弹窗 */
.latest-results-detail-list {
    max-height: 60vh;
    overflow-y: auto;
}

.latest-result-detail-item {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
}

.latest-result-detail-item:hover {
    background: var(--bg-color);
}

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

.result-detail-date {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 100px;
}

.result-detail-info {
    flex: 1;
    font-size: 14px;
}

.result-detail-arrow {
    color: var(--text-secondary);
    font-size: 18px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.stat-card.clickable {
    cursor: pointer;
    position: relative;
}

.stat-card.clickable::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--text-secondary);
    border-right: 2px solid var(--text-secondary);
    transform: rotate(45deg);
    opacity: 0.5;
    transition: var(--transition);
}

.stat-card.clickable:hover::after {
    opacity: 1;
    transform: rotate(45deg) translate(2px, -2px);
}

.stat-label {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 4px;
}

.stat-value.secondary {
    color: var(--warning);
}

.stat-sublabel {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Date Filter Section */
.date-filter-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.date-filter-content {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.date-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.date-input-group label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.date-input-group input {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: var(--background);
    transition: var(--transition);
}

.date-input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--card-bg);
}

.date-separator {
    color: var(--text-secondary);
    font-size: 14px;
    padding: 0 4px;
    padding-top: 24px;
}

.btn-clear-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-clear-filter:hover {
    background: var(--border);
    color: var(--text-primary);
}

.btn-clear-filter svg {
    width: 14px;
    height: 14px;
}

/* Trades Section */
.trades-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.trade-count {
    font-size: 14px;
    color: var(--text-secondary);
}

.filter-hint {
    color: var(--primary);
    font-weight: 500;
}

.trades-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trade-card {
    background: var(--background);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1.8fr 0.5fr 0.5fr 0.9fr 0.8fr 0.9fr 0.8fr 0.7fr 0.8fr auto;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.trade-card:hover {
    background: #EBEBF0;
}

.trade-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trade-name {
    font-size: 16px;
    font-weight: 600;
}

.trade-code {
    font-size: 13px;
    color: var(--text-secondary);
}

.trade-date, .trade-price, .trade-position, .trade-style, .trade-investor, .trade-sell-price, .trade-sell-date, .trade-holding-days {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.date-label, .position-label, .style-label, .investor-label, .sell-price-label, .sell-date-label, .holding-days-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.date-value, .price-value, .position-value, .style-value, .investor-value, .sell-price-value, .sell-date-value, .holding-days-value {
    font-size: 13px;
    font-weight: 500;
}

.price-value {
    font-weight: 600;
}

.position-value {
    font-weight: 600;
}

.style-value.style-b {
    color: var(--primary);
    font-weight: 600;
}

.style-value.style-d {
    color: var(--warning);
    font-weight: 600;
}

.style-value.style-c {
    color: #FF3B30;
    font-weight: 600;
}

.investor-value {
    font-weight: 600;
}

.sell-price-value {
    font-weight: 600;
}

.sell-date-value {
    font-weight: 500;
}

.holding-days-value {
    font-weight: 600;
    color: var(--text-secondary);
}

.trade-return {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.return-value {
    font-size: 18px;
    font-weight: 700;
}

.return-value.positive {
    color: var(--success);
}

.return-value.negative {
    color: var(--danger);
}

.return-value.holding {
    color: var(--warning);
}

.return-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* New Trade Card Layout */
.trade-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.trade-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.trade-title .stock-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.trade-title .stock-code {
    font-size: 13px;
    color: var(--text-secondary);
}

.investor-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(0, 122, 255, 0.15);
    color: var(--primary);
}

.investor-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(0, 122, 255, 0.15);
    color: var(--primary);
}

.trade-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trade-info-row {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: flex-start;
}

.trade-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 60px;
    max-width: 120px;
    text-align: center;
}

.trade-info-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.trade-info-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.trade-info-value.positive {
    color: var(--success);
    font-weight: 600;
}

.trade-info-value.negative {
    color: var(--danger);
    font-weight: 600;
}

.trade-info-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.trade-notes {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: var(--card-bg);
    border-radius: 8px;
    margin-top: 4px;
}

/* Style Badge */
.style-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.style-b {
    background: rgba(0, 122, 255, 0.15);
    color: var(--primary);
}

.style-d {
    background: rgba(255, 149, 0, 0.15);
    color: var(--warning);
}

.style-c {
    background: rgba(255, 59, 48, 0.15);
    color: #FF3B30;
}

.trade-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--primary);
    color: white;
}

.btn-icon.delete:hover {
    background: var(--danger);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.btn-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--background);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--card-bg);
}

/* Smart Input Section */
.smart-input-section {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.05) 0%, rgba(0, 122, 255, 0.02) 100%);
    border: 1px solid rgba(0, 122, 255, 0.15);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 8px;
}

.smart-input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}

.smart-input-label svg {
    color: var(--primary);
}

.smart-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: var(--card-bg);
    transition: var(--transition);
    resize: vertical;
    min-height: 60px;
}

.smart-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.smart-input::placeholder {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Position Input Styles */
.position-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.position-input-wrapper input {
    width: 100%;
    padding-right: 40px;
}

.position-suffix {
    position: absolute;
    right: 16px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    pointer-events: none;
}

/* Trade Position Display */
.trade-position {
    margin-top: 6px;
}

.position-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.position-high .position-badge {
    background: rgba(255, 59, 48, 0.1);
    color: var(--danger);
}

.position-medium .position-badge {
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning);
}

.position-low .position-badge {
    background: rgba(52, 199, 89, 0.1);
    color: var(--success);
}

.btn-parse {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    margin-top: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-parse:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

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

.parse-hint {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.input-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: var(--background);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--card-bg);
}

.form-group .form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 400;
}

.form-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.form-divider span {
    padding: 0 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-secondary,
.btn-primary {
    flex: 1;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-secondary {
    background: var(--background);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Investor Stats Table */
.investor-stats-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.investor-stats-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.investor-stats-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.investor-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.investor-stats-table th {
    background: var(--background);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.investor-stats-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.investor-stats-table tr:last-child td {
    border-bottom: none;
}

.investor-stats-table tr:hover {
    background: var(--card-bg);
}

.investor-stats-table .positive {
    color: var(--success);
    font-weight: 600;
}

.investor-stats-table .negative {
    color: var(--danger);
    font-weight: 600;
}

.investor-stats-table .no-data {
    text-align: center;
    color: var(--text-secondary);
    padding: 24px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 12px 16px;
    }

    .logo {
        font-size: 18px;
    }

    .logo svg {
        width: 24px;
        height: 24px;
    }

    .btn-add {
        padding: 8px 16px;
        font-size: 13px;
    }

    .btn-add span {
        display: none;
    }

    .main {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stats-grid.new-layout {
        grid-template-columns: 1fr;
    }
    
    .right-stats {
        flex-direction: row;
    }
    
    .right-stats .stat-card.small {
        padding: 12px;
    }
    
    .right-stats .stat-card.small .stat-value {
        font-size: 22px;
    }
    
    .latest-results-card {
        min-height: 160px;
    }
    
    .results-scroll-container {
        height: 80px;
    }
    
    .result-item {
        font-size: 12px;
        padding: 6px 0;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 24px;
    }

    .investment-title {
        font-size: 20px;
    }

    .investment-date {
        font-size: 12px;
    }

    .date-filter-section {
        padding: 16px;
    }

    .date-filter-content {
        flex-direction: column;
        align-items: stretch;
    }

    .date-inputs {
        min-width: auto;
    }

    .btn-clear-filter {
        width: 100%;
        justify-content: center;
    }

    .trades-section {
        padding: 16px;
    }

    .trade-card {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }

    .trade-info {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .trade-date,
    .trade-price {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .trade-return {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid var(--border);
        padding-top: 12px;
        margin-top: 8px;
    }

    .trade-card {
        position: relative;
        padding: 16px;
    }

    .trade-header {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 16px;
    }

    .trade-title {
        width: 100%;
    }

    .trade-actions {
        position: static;
        justify-content: flex-end;
        width: 100%;
    }

    .trade-info-row {
        gap: 6px;
    }

    .trade-info-item {
        min-width: 50px;
        max-width: none;
    }
    
    .trade-info-label {
        font-size: 9px;
    }
    
    .trade-info-value,
    .trade-info-price {
        font-size: 11px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .modal-body {
        max-height: calc(100vh - 80px);
    }
}

@media (max-width: 768px) {
    .filter-row-all {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .filter-row-all .date-separator {
        display: none;
    }

    .filter-item {
        min-width: 100%;
    }

    .filter-item-action {
        min-width: 100%;
        margin-top: 8px;
    }

    .filter-label-placeholder {
        display: none;
    }

    .btn-clear-filter {
        width: 100%;
        justify-content: center;
    }
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hover);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    border-left: 4px solid var(--success);
}

.notification.error {
    border-left: 4px solid var(--danger);
}

.notification::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.notification.success::before {
    background: var(--success);
}

.notification.error::before {
    background: var(--danger);
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-label {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-sublabel {
        font-size: 11px;
    }

    .date-inputs {
        flex-direction: column;
        align-items: stretch;
    }

    .date-separator {
        text-align: center;
        padding: 4px 0;
    }
}

/* Clickable Row */
.clickable-row {
    cursor: pointer;
    transition: var(--transition);
}

.clickable-row:hover {
    background: rgba(0, 122, 255, 0.05);
}

/* Modal Large */
.modal-large {
    max-width: 800px;
}

/* Detail Modal Styles */
.detail-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.detail-investor-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.detail-investor-info .style-badge {
    font-size: 20px;
    padding: 6px 12px;
}

.detail-investor-info .investor-id {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 详情页统计信息行 */
.detail-stats-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--background);
    border-radius: var(--radius-sm);
}

.detail-stat-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 60px;
}

.detail-stat-inline .detail-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.detail-stat-inline .detail-stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.detail-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--background);
    border-radius: var(--radius-sm);
}

.detail-stat-item {
    text-align: center;
}

.detail-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.detail-stat-value.positive {
    color: var(--success);
}

.detail-stat-value.negative {
    color: var(--danger);
}

/* 详情页图表样式 */
.detail-chart-section {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--background);
    border-radius: var(--radius-sm);
}

.detail-chart-section .chart-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.detail-chart-container {
    height: 200px;
    margin-bottom: 12px;
}

/* 指数对比表格样式 */
.index-comparison-section {
    margin-top: 24px;
    margin-bottom: 24px;
}

.detail-trades h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.detail-trades-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.detail-trade-card {
    background: var(--background);
    border-radius: var(--radius-sm);
    padding: 16px;
    border-left: 4px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.detail-trade-card:hover {
    background: var(--card-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.detail-trade-card.completed {
    border-left-color: var(--success);
}

.detail-trade-card.holding {
    border-left-color: var(--warning);
}

.detail-trade-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.detail-trade-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.detail-trade-code {
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--card-bg);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.detail-trade-position {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(0, 122, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.detail-trade-status {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    margin-left: auto;
}

.detail-trade-status.status-completed {
    background: rgba(52, 199, 89, 0.15);
    color: var(--success);
}

.detail-trade-status.status-holding {
    background: rgba(255, 149, 0, 0.15);
    color: var(--warning);
}

.detail-trade-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 第二行：交易数据横向排列 */
.detail-trade-info-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.detail-trade-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-trade-info-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.detail-trade-info-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.detail-trade-info-value.positive {
    color: var(--success);
}

.detail-trade-info-value.negative {
    color: var(--danger);
}

.detail-trade-info-price {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 4px;
}

/* 旧样式兼容 */
.detail-trade-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 70px;
    flex: 1;
    text-align: center;
}

.detail-trade-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-trade-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.detail-trade-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-trade-value.positive {
    color: var(--success);
    font-weight: 600;
}

.detail-trade-value.negative {
    color: var(--danger);
    font-weight: 600;
}

.detail-trade-holding {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 8px;
}

@media (max-width: 768px) {
    .detail-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-large {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .detail-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 12px;
    }
    
    .detail-stat-label {
        font-size: 11px;
        margin-bottom: 4px;
    }
    
    .detail-stat-value {
        font-size: 18px;
    }
    
    .detail-trade-header {
        gap: 6px;
    }
    
    .detail-trade-name {
        font-size: 15px;
    }
    
    .detail-trade-code {
        font-size: 12px;
        padding: 1px 6px;
    }
    
    .detail-trade-position {
        font-size: 11px;
        padding: 1px 6px;
    }
    
    .detail-trade-status {
        font-size: 11px;
        padding: 1px 6px;
    }
    
    .detail-trade-body {
        gap: 8px;
    }
    
    .detail-trade-info-row {
        gap: 12px;
    }
    
    .detail-trade-info-item {
        gap: 4px;
    }
    
    .detail-trade-info-label {
        font-size: 11px;
    }
    
    .detail-trade-info-value {
        font-size: 12px;
    }
    
    .detail-trade-row {
        min-width: 60px;
    }
    
    .detail-trade-label {
        font-size: 10px;
    }
    
    .detail-trade-value {
        font-size: 12px;
    }
}

/* 微信浏览器和移动端兼容性样式 */
/* WeChat Browser Compatibility */
.wechat-browser .modal-content {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* 修复微信浏览器fixed定位问题 */
.wechat-browser .notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* 移动端触摸优化 */
@media (pointer: coarse) {
    .btn-icon,
    .btn-close,
    .btn-clear-filter,
    .nav-tab {
        min-height: 44px;
        min-width: 44px;
    }
    
    .trade-card {
        -webkit-tap-highlight-color: transparent;
    }
    
    .clickable-row {
        -webkit-tap-highlight-color: rgba(0, 122, 255, 0.1);
    }
}

/* iOS Safari 底部安全区域 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .main {
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }
    
    @media (max-width: 768px) {
        .main {
            padding-bottom: calc(16px + env(safe-area-inset-bottom));
        }
    }
}

/* 修复iOS输入框缩放问题 */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* 微信浏览器localStorage提示 */
.wechat-storage-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--warning);
    color: white;
    padding: 12px 16px;
    text-align: center;
    font-size: 14px;
    z-index: 10000;
    display: none;
}

.wechat-storage-warning.show {
    display: block;
}

/* 统一按钮样式 - 添加交易、修改密码、退出登录、导入导出 */
.btn-action,
.btn-export,
.btn-import {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-action:hover,
.btn-export:hover,
.btn-import:hover {
    background: var(--background);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-action svg,
.btn-export svg,
.btn-import svg {
    width: 18px;
    height: 18px;
}

/* 详情提示文字样式 */
.detail-hint {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-left: 4px;
    opacity: 0.8;
}

.stat-card:hover .detail-hint {
    color: var(--primary);
    opacity: 1;
}

/* 手机端详情提示样式 */
@media (max-width: 768px) {
    .detail-hint {
        font-size: 10px;
        display: inline-block;
        margin-left: 2px;
    }
    
    /* 强制去掉百姓之家下划线 */
    .logo-link,
    .logo-link:hover,
    .logo-link:active,
    .logo-link:visited,
    .logo-link .logo-text {
        text-decoration: none !important;
        border-bottom: none !important;
        box-shadow: none !important;
        -webkit-text-decoration: none !important;
    }
}

@media (max-width: 480px) {
    .stat-label {
        font-size: 11px;
    }
    
    .detail-hint {
        font-size: 9px;
        display: block;
        margin-left: 0;
        margin-top: 2px;
        opacity: 0.7;
    }
    
    /* 小屏幕下强制去掉百姓之家下划线 */
    .logo-link,
    .logo-link * {
        text-decoration: none !important;
        border-bottom: none !important;
    }
}

/* 模态框标题中的详情提示 */
.modal-detail-hint {
    font-size: 14px;
    color: #9c27b0;
    font-weight: 600;
    margin-left: 8px;
    text-shadow: 0 0 8px rgba(156, 39, 176, 0.4);
}

/* 微信分享按钮 */
.btn-share-wechat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #07C160;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    margin-left: 12px;
    vertical-align: middle;
    transition: opacity 0.2s;
}

.btn-share-wechat:hover {
    opacity: 0.9;
}

.btn-share-wechat svg {
    width: 14px;
    height: 14px;
}

/* 手机端模态框标题提示样式 */
@media (max-width: 768px) {
    .modal-detail-hint {
        font-size: 13px;
        margin-left: 4px;
    }
}

@media (max-width: 480px) {
    .modal-detail-hint {
        font-size: 12px;
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }
    
    .modal-header h3 {
        font-size: 16px;
        line-height: 1.3;
    }
}

/* 详情按钮样式 */
.btn-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 100px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-detail:hover {
    background: var(--primary);
    color: white;
}

/* 完整备份/恢复按钮样式 */
.btn-backup,
.btn-restore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 100px;
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-backup {
    background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%);
    color: white;
    border-color: #2196F3;
}

.btn-backup:hover {
    background: linear-gradient(135deg, #1976D2 0%, #2196F3 100%);
    color: white;
    border-color: #1976D2;
}

.btn-restore {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
    color: white;
    border-color: #FF6B6B;
}

.btn-restore:hover {
    background: linear-gradient(135deg, #FF5252 0%, #FF6B6B 100%);
    color: white;
    border-color: #FF5252;
}

.btn-backup svg,
.btn-restore svg {
    width: 18px;
    height: 18px;
}

/* 管理工具栏 */
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar-left {
    display: flex;
    gap: 12px;
}

.toolbar-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* 导出格式选择器 */
.export-format-select {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
    min-width: 120px;
}

.export-format-select:hover {
    border-color: var(--primary);
}

.export-format-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 0 16px;
    }
    
    .toolbar-left,
    .toolbar-right {
        justify-content: space-between;
    }
    
    .btn-action,
    .btn-export,
    .btn-import {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .btn-action svg,
    .btn-export svg,
    .btn-import svg {
        width: 16px;
        height: 16px;
    }
}

/* 图表样式 */
.chart-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.chart-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.chart-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.chart-select:hover {
    border-color: var(--primary);
}

.chart-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 16px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .chart-section {
        padding: 16px;
        margin-bottom: 20px;
    }

    .chart-container {
        height: 250px;
    }

    .chart-legend {
        gap: 16px;
    }

    .legend-item {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .chart-container {
        height: 200px;
    }

    .chart-legend {
        gap: 12px;
    }
}

/* Footer 备案信息 */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 20px;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.beian {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.version {
    color: var(--text-secondary);
    font-size: 12px;
    margin: 0;
    padding: 2px 8px;
    background: var(--bg-color);
    border-radius: 4px;
}

.visitor-count {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0 0 8px 0;
}

.visitor-count span {
    color: var(--primary);
    font-weight: 600;
    font-size: 15px;
}

.footer .strategy-note {
    font-size: 14px;
    font-weight: bold;
    color: #000;
    margin: 0 0 12px 0;
    padding: 10px 16px;
    background-color: #f5f5f7;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

@media (max-width: 768px) {
    .footer {
        padding: 16px;
    }
    
    .beian {
        font-size: 12px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
    }
    
    .version {
        font-size: 11px;
    }
}

/* 详情页统计信息响应式布局 */
@media (max-width: 768px) {
    .detail-stats-row {
        padding: 12px 16px;
        gap: 8px;
    }
    
    .detail-stat-inline {
        min-width: 50px;
    }
    
    .detail-stat-inline .detail-stat-label {
        font-size: 11px;
    }
    
    .detail-stat-inline .detail-stat-value {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .detail-stats-row {
        padding: 10px 12px;
        gap: 4px;
    }
    
    .detail-stat-inline {
        min-width: 45px;
    }
    
    .detail-stat-inline .detail-stat-label {
        font-size: 10px;
    }
    
    .detail-stat-inline .detail-stat-value {
        font-size: 13px;
    }
}

/* 头部微信按钮样式 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-wechat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 20px;
    color: #1D1D1F;
    font-size: 14px;
    font-weight: 500;
    cursor: default;
    transition: all 0.2s ease;
    user-select: none;
}

.btn-wechat svg {
    fill: #07C160;
}

.btn-add-wechat {
    padding: 8px 16px;
    background: #07C160;
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-wechat:hover {
    background: #06AD56;
}

/* 微信二维码模态框 */
.wechat-modal-content {
    max-width: 360px;
}

.wechat-modal-body {
    padding: 24px;
    text-align: center;
}

.wechat-qr-container {
    width: 240px;
    height: 240px;
    margin: 0 auto 16px;
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wechat-qr-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wechat-qr-placeholder {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #666;
}

.wechat-qr-placeholder p {
    font-size: 14px;
    margin: 0;
}

.wechat-hint {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* 响应式：头部按钮 */
@media (max-width: 768px) {
    .header-actions {
        gap: 8px;
    }
    
    .btn-wechat {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .btn-wechat svg {
        width: 20px;
        height: 20px;
    }
    
    .btn-add-wechat {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .btn-wechat svg {
        width: 18px;
        height: 18px;
    }
    
    .wechat-modal-content {
        max-width: 320px;
    }
    
    .wechat-qr-container {
        width: 200px;
        height: 200px;
    }
}

/* ========== 管理页面数据统计样式 ========== */

.stats-dashboard-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.stats-dashboard-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.strategy-note {
    width: 100%;
    font-size: 14px;
    font-weight: bold;
    color: #000;
    margin: 0 0 16px 0;
    padding: 10px 16px;
    background-color: #f5f5f7;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-sizing: border-box;
}

.stats-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.stats-date-input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-color);
}

.stats-date-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-filter, .btn-reset {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-filter {
    background: var(--primary);
    color: white;
}

.btn-filter:hover {
    background: #0051D5;
}

.btn-reset {
    background: var(--bg-color);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-reset:hover {
    background: var(--border);
}

.stats-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stats-dashboard-card {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: var(--transition);
}

.stats-dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stats-dashboard-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stats-dashboard-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.stats-chart-container {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.stats-chart-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.stats-chart-container canvas {
    max-height: 300px;
}

@media (max-width: 768px) {
    .stats-dashboard-section {
        padding: 16px;
    }
    
    .stats-dashboard-section .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stats-filter {
        width: 100%;
    }
    
    .stats-date-input {
        flex: 1;
        min-width: 120px;
    }
    
    .stats-dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stats-dashboard-value {
        font-size: 22px;
    }
}

/* 持仓详情表格样式 */
.holding-detail-table th,
.holding-detail-table td {
    font-size: 13px;
    padding: 10px 12px;
    white-space: nowrap;
}

.holding-detail-table th {
    font-weight: 600;
}

@media (max-width: 480px) {
    .holding-detail-table th,
    .holding-detail-table td {
        font-size: 12px;
        padding: 8px 10px;
    }
}

/* 留言板样式 */
.message-board-section {
    margin-top: 32px;
    padding: 24px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.message-board-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.message-scroll-container {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: var(--bg-color);
    border-radius: 12px;
    padding: 16px;
}

.message-list {
    animation: scrollUp 10s linear infinite;
}

@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.message-scroll-container:hover .message-list {
    animation-play-state: paused;
}

.message-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

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

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.message-nickname {
    font-weight: 600;
    color: var(--primary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 斑竹标识 */
.admin-badge {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    box-shadow: 0 2px 4px rgba(255,107,107,0.3);
}

.message-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.message-content {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    word-wrap: break-word;
}

/* 回复按钮 */
.message-actions {
    margin-top: 8px;
}

.reply-btn {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reply-btn:hover {
    background: var(--primary);
    color: white;
}

/* 回复列表 */
.message-replies {
    margin-top: 12px;
    padding-left: 16px;
    border-left: 3px solid var(--primary-light);
}

.reply-item {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
}

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

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.reply-nickname {
    font-weight: 600;
    color: var(--primary);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.reply-time {
    font-size: 11px;
    color: var(--text-secondary);
}

.reply-content {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    word-wrap: break-word;
}

.message-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    font-size: 14px;
}

/* 留言表单样式 */
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    background: var(--bg-color);
    color: var(--text-primary);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-secondary {
    padding: 10px 20px;
    border: 1px solid var(--border);
    background: var(--bg-color);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-primary {
    padding: 10px 20px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

@media (max-width: 768px) {
    .message-board-section {
        padding: 16px;
    }
    
    .message-board-section .section-header {
        flex-direction: row;
        gap: 12px;
        align-items: center;
        justify-content: space-between;
    }
    
    .message-board-section .section-header h3 {
        font-size: 16px;
        white-space: nowrap;
    }
    
    .message-board-section .section-header .btn-action {
        padding: 8px 12px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .message-scroll-container {
        height: 180px;
    }
    
    /* 策略说明文字在逗号处换行显示 */
    .strategy-note {
        font-size: 12px;
        padding: 8px 12px;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .strategy-note .strategy-line {
        display: block;
        white-space: nowrap;
    }
}

/* ========== 截图上传样式 ========== */
.screenshot-section {
    margin-top: 24px;
}

.screenshot-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--warning-light);
    border: 1px solid var(--warning);
    border-radius: 8px;
    color: var(--warning);
    font-size: 13px;
    margin-bottom: 16px;
}

.screenshot-hint svg {
    flex-shrink: 0;
}

.screenshot-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.screenshot-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.screenshot-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.screenshot-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-screenshot-paste,
.btn-screenshot-upload,
.btn-screenshot-delete {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-screenshot-paste {
    background: var(--primary);
    color: white;
}

.btn-screenshot-paste:hover {
    background: #0051D5;
}

.btn-screenshot-upload {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-screenshot-upload:hover {
    background: var(--border);
}

.btn-screenshot-delete {
    background: rgba(255, 59, 48, 0.1);
    color: #FF3B30;
}

.btn-screenshot-delete:hover {
    background: rgba(255, 59, 48, 0.2);
}

.screenshot-preview-container {
    margin-top: 8px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border);
}

.screenshot-preview-img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    cursor: zoom-in;
    display: block;
}

.screenshot-preview-img:hover {
    opacity: 0.9;
}

/* 截图查看模态框 */
.screenshot-viewer-modal .modal-content {
    max-width: 95vw;
    max-height: 95vh;
    position: relative;
}

.screenshot-viewer-modal .modal-header {
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 10;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.screenshot-viewer-modal .btn-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    border: 2px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.screenshot-viewer-modal .btn-close:hover {
    background: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
}

.screenshot-viewer-modal .btn-close svg {
    width: 20px;
    height: 20px;
}

/* 交易截图查看器样式 */
.screenshot-viewer-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

.screenshot-viewer-row {
    display: flex;
    gap: 15px;
    flex: 1;
    min-height: 200px;
}

.screenshot-viewer-box {
    flex: 1;
    background: #000;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s;
    min-height: 0;
}

.screenshot-viewer-box:hover {
    transform: scale(1.02);
}

.screenshot-viewer-box.full-width {
    flex: 1;
}

.screenshot-viewer-box h4 {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 500;
    flex-shrink: 0;
}

.screenshot-viewer-box img {
    flex: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
    min-height: 0;
}

@media (max-width: 768px) {
    .screenshot-viewer-row {
        flex-direction: column;
        min-height: auto;
    }
    
    .screenshot-viewer-box {
        min-height: 150px;
    }
}

.screenshot-viewer-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.screenshot-viewer-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.screenshot-tabs {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-color);
    border-radius: 12px;
}

.screenshot-tab {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.screenshot-tab:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.screenshot-tab.active {
    background: var(--primary);
    color: white;
}

.screenshot-tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 交易记录中的截图指示器 */
.trade-screenshot-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--primary);
}

.trade-screenshot-indicator:hover {
    background: var(--primary);
    color: white;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .screenshot-grid {
        grid-template-columns: 1fr;
    }
    
    .screenshot-upload {
        min-height: 100px;
        padding: 16px;
    }
    
    .screenshot-upload-large {
        min-height: 140px;
    }
    
    .screenshot-placeholder span {
        font-size: 13px;
    }
    
    .screenshot-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .screenshot-tab {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ========== 管理页面标签切换样式 ========== */
.admin-tabs {
    display: flex;
    gap: 12px;
    padding: 0 24px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.admin-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.admin-tab:hover {
    color: var(--primary);
}

.admin-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.admin-tab svg {
    width: 18px;
    height: 18px;
}

/* 标签页内容 */
.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

/* 筛选行 */
.filter-row {
    display: flex;
    gap: 24px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.style-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.style-filter-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.style-filter-group select {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    min-width: 140px;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.style-filter-group select:hover,
.style-filter-group select:focus {
    border-color: var(--primary);
}

/* 股票搜索输入框样式 */
.style-filter-group input[type="text"] {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    min-width: 140px;
    outline: none;
    transition: var(--transition);
}

.style-filter-group input[type="text"]:hover,
.style-filter-group input[type="text"]:focus {
    border-color: var(--primary);
}

.style-filter-group input[type="text"]::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* 分页控制 */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    margin-top: 20px;
    border-radius: 0 0 var(--radius) var(--radius);
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.pagination-info select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.pagination-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-btn {
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 36px;
    text-align: center;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    color: var(--text-secondary);
    padding: 0 4px;
}

/* 主页显示开关 */
.home-display-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
    outline: none;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-switch.active {
    background: var(--primary);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-switch.active::after {
    left: 22px;
}

/* 设置页面 */
.settings-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-top: 24px;
}

.settings-section h2,
.settings-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.settings-description {
    color: var(--text-secondary);
    font-size: 14px;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-form label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.input-with-hint {
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-input {
    width: 80px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.settings-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.input-hint {
    font-size: 13px;
    color: var(--text-secondary);
}

.form-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 交易截图状态 - 水平内联显示 */
.screenshot-status-inline {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.screenshot-status-inline .screenshot-status-item-inline {
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    cursor: help;
}

.screenshot-status-icon.loading {
    color: var(--text-secondary);
    animation: pulse 1.5s infinite;
}

.screenshot-status-icon.uploaded {
    background: #FF3B30;
    color: white;
}

.screenshot-status-icon.missing {
    background: #34C759;
    color: white;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .admin-tabs {
        padding: 0 16px;
        gap: 8px;
    }

    .admin-tab {
        padding: 10px 14px;
        font-size: 13px;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .style-filter-group select {
        width: 100%;
    }

    .pagination-controls {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .pagination-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .trade-screenshot-status {
        gap: 12px;
    }

    .screenshot-status-item {
        font-size: 12px;
    }
}
