/* 投资观点管理系统 - 样式 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    min-height: 100vh;
}

.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* 顶部搜索栏 */
.header {
    background: #1a1a2e;
    padding: 16px 24px;
    border-bottom: 1px solid #2a2a3e;
    display: flex;
    align-items: center;
    gap: 24px;
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.search-bar {
    display: flex;
    gap: 12px;
    flex: 1;
    align-items: center;
}

.search-bar input[type="text"] {
    flex: 1;
    max-width: 400px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #3a3a4e;
    background: #16162a;
    color: #fff;
    font-size: 14px;
}

.search-bar select {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #3a3a4e;
    background: #16162a;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.search-bar input[type="date"] {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #3a3a4e;
    background: #16162a;
    color: #fff;
    font-size: 14px;
}

/* 主体布局 */
.main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 左侧边栏 */
.sidebar {
    width: 220px;
    background: #12121f;
    border-right: 1px solid #2a2a3e;
    padding: 20px;
    overflow-y: auto;
}

.sidebar h3 {
    font-size: 12px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.blogger-list, .tag-list, .stock-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.blogger-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.blogger-list label:hover {
    background: #1a1a2e;
}

.blogger-list input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #6366f1;
}

.tag-list .tag {
    display: inline-block;
    padding: 4px 10px;
    background: #1a1a2e;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.tag:hover, .tag.active {
    background: #2a2a4e;
    border-color: #6366f1;
}

.stock-list .stock-item {
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    transition: background 0.2s;
}

.stock-list .stock-item:hover {
    background: #1a1a2e;
}

/* 中间内容区 */
.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #0f0f1a;
}

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

#opinionCount {
    font-size: 14px;
    color: #888;
}

.view-toggle {
    display: flex;
    gap: 4px;
}

.view-toggle button {
    padding: 8px 16px;
    border: none;
    background: #1a1a2e;
    color: #888;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.view-toggle button:hover {
    background: #2a2a3e;
}

.view-toggle button.active {
    background: #6366f1;
    color: #fff;
}

/* 观点列表 */
.opinion-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.opinion-card {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.opinion-card:hover {
    border-color: #6366f1;
    transform: translateY(-2px);
}

.opinion-card .card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.opinion-card .blogger-tag {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.opinion-card .blogger-tag.笨嘴 { background: rgba(99, 102, 241, 0.2); color: #6366f1; }
.opinion-card .blogger-tag.徐小明 { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.opinion-card .blogger-tag.徐小明复盘 { background: rgba(34, 197, 94, 0.2); color: #16a34a; }
.opinion-card .blogger-tag.牛得林奇 { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.opinion-card .blogger-tag.老梁 { background: rgba(236, 72, 153, 0.2); color: #ec4899; }

.opinion-card .date {
    font-size: 12px;
    color: #666;
}

.opinion-card .summary {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    color: #ccc;
}

.opinion-card .stocks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.opinion-card .stock-tag {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
}

.opinion-card .stock-tag.看多 { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.opinion-card .stock-tag.看空 { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.opinion-card .stock-tag.中性 { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }

.opinion-card .reasons {
    font-size: 12px;
    color: #666;
    padding-top: 12px;
    border-top: 1px solid #2a2a3e;
}

/* 时间轴视图 */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #2a2a3e;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
    padding: 16px;
    background: #1a1a2e;
    border-radius: 12px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6366f1;
    border: 3px solid #0f0f1a;
}

.timeline-item .date {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.timeline-item .blogger {
    font-size: 14px;
    font-weight: 600;
    color: #6366f1;
    margin-bottom: 8px;
}

.timeline-item .summary {
    font-size: 14px;
    line-height: 1.6;
    color: #ccc;
}

.timeline-item .stocks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* 对比视图 */
.compare-view {
    padding: 20px;
}

.compare-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.compare-controls input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #3a3a4e;
    background: #1a1a2e;
    color: #fff;
    font-size: 14px;
}

.compare-controls button {
    padding: 12px 24px;
    border: none;
    background: #6366f1;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.compare-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.compare-card {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 16px;
}

.compare-card .blogger-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.compare-card .date {
    font-size: 12px;
    color: #888;
    margin-bottom: 12px;
}

.compare-card .stance {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.compare-card .stance.看多 { color: #ef4444; }
.compare-card .stance.看空 { color: #10b981; }
.compare-card .stance.中性 { color: #f59e0b; }

.compare-card .opinion-summary {
    font-size: 14px;
    line-height: 1.6;
    color: #ccc;
}

.compare-card .reasons {
    font-size: 12px;
    color: #666;
    margin-top: 12px;
}

/* 右侧博主画像 */
.profile-panel {
    width: 280px;
    background: #12121f;
    border-left: 1px solid #2a2a3e;
    padding: 20px;
    overflow-y: auto;
}

.profile-panel h3 {
    font-size: 12px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.blogger-profile {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.blogger-profile .name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.blogger-profile .style {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

.blogger-profile .expertise {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.blogger-profile .expertise span {
    padding: 4px 10px;
    background: #2a2a4e;
    border-radius: 8px;
    font-size: 12px;
    color: #ccc;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    color: #888;
    cursor: pointer;
}

.modal-close:hover {
    color: #fff;
}

.modal h2 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 20px;
}

/* 辅助类 */
.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    color: #888;
    padding: 40px;
}