/* 
 * 第五行：一行两列投资历程布局
 * 我的投资 + 心路历程（灵活可变）
 * 作者：欧秘 (西北狼·狼眼世界 CTO)
 * 创建时间：2026-04-12
 */

/* 第五行容器 - 行高缩小一半 */
.fifth-row-investment-journey {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 12px 0;
    padding: 12px;
    background: linear-gradient(135deg, #fff9f0 0%, #fff5e6 100%);
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #ffeccc;
    min-height: 300px;
    max-height: 350px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .fifth-row-investment-journey {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
}

/* 栏目通用样式 - 缩小版 */
.investment-journey-column {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    border: 1px solid #ffeccc;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.investment-journey-column:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

/* 我的投资栏目 */
.investment-column {
    border-top: 4px solid #f39c12;
}

.investment-column .column-title {
    color: #d68910;
}

.investment-column .column-title i {
    color: #f39c12;
}

/* 心路历程栏目 */
.journey-column {
    border-top: 4px solid #1abc9c;
}

.journey-column .column-title {
    color: #17a589;
}

.journey-column .column-title i {
    color: #1abc9c;
}

/* 栏目标题 */
.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #fff9f0;
}

.column-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 12px;
}

.column-title i {
    font-size: 1.3rem;
    background: linear-gradient(135deg, currentColor, rgba(255,255,255,0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 快速操作按钮 */
.quick-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn i {
    font-size: 0.95rem;
}

/* 我的投资按钮 */
.investment-column .action-btn {
    background: #fef5e7;
    color: #d68910;
    border: 1px solid #f8c471;
}

.investment-column .action-btn:hover {
    background: #fdebd0;
    color: #f39c12;
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(243, 156, 18, 0.2);
}

/* 心路历程按钮 */
.journey-column .action-btn {
    background: #e8f8f5;
    color: #17a589;
    border: 1px solid #76d7c4;
}

.journey-column .action-btn:hover {
    background: #d1f2eb;
    color: #1abc9c;
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(26, 188, 156, 0.2);
}

/* 内容区域 */
.content-area {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    padding-right: 10px;
}

/* 滚动条样式 */
.content-area::-webkit-scrollbar {
    width: 6px;
}

.content-area::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.content-area::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.content-area::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 投资组合概览 - 只显示3只个股 */
.portfolio-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
    max-height: 100px;
    overflow-y: auto;
    padding-right: 5px;
}

/* 限制我的投资只显示3只个股 */
.portfolio-item:nth-child(n+4) {
    display: none;
}

.portfolio-item {
    background: #fef9e7;
    padding: 18px;
    border-radius: 10px;
    border-left: 4px solid #f39c12;
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    background: #fcf3cf;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.1);
}

.portfolio-item h4 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    color: #2c3e50;
    font-weight: 600;
}

.portfolio-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f39c12;
    margin-bottom: 8px;
}

.portfolio-change {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
}

.positive-change {
    background: #d5f4e6;
    color: #27ae60;
}

.negative-change {
    background: #fdeaea;
    color: #e74c3c;
}

/* 照片网格 */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.photo-item:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.1);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 10px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed #f8c471;
    border-radius: 12px;
    padding: 35px;
    text-align: center;
    margin-top: 20px;
    background: #fef9e7;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #f39c12;
    background: #fdebd0;
    transform: translateY(-3px);
}

.upload-icon {
    font-size: 3rem;
    color: #f39c12;
    margin-bottom: 15px;
}

.upload-text {
    color: #d68910;
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.upload-hint {
    font-size: 0.9rem;
    color: #b7950b;
}

/* 文章列表 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.article-item {
    background: #e8f8f5;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #1abc9c;
    transition: all 0.3s ease;
    cursor: pointer;
}

.article-item:hover {
    background: #d1f2eb;
    transform: translateX(8px);
    box-shadow: 0 5px 15px rgba(26, 188, 156, 0.15);
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.article-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    flex: 1;
}

.article-date {
    font-size: 0.85rem;
    color: #17a589;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 15px;
}

.article-excerpt {
    font-size: 0.95rem;
    color: #5d6d7e;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-tag {
    background: #d1f2eb;
    color: #17a589;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.article-tag:hover {
    background: #1abc9c;
    color: white;
    transform: scale(1.05);
}

/* 编辑器 */
.editor-container {
    margin-top: 25px;
}

.editor-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.editor-btn {
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #5d6d7e;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.editor-btn:hover {
    background: #1abc9c;
    color: white;
    border-color: #1abc9c;
    transform: translateY(-2px);
}

.editor-textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.editor-textarea:focus {
    outline: none;
    border-color: #1abc9c;
    background: white;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.1);
}

/* 发布按钮 */
.publish-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1abc9c, #17a589);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.publish-btn:hover {
    background: linear-gradient(135deg, #17a589, #148f77);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(26, 188, 156, 0.3);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #bdc3c7;
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-text {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #7f8c8d;
}

.empty-hint {
    font-size: 0.95rem;
    color: #bdc3c7;
}

/* 加载状态 */
.loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 250px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f39c12;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.journey-column .loading-spinner {
    border-top-color: #1abc9c;
}

/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
    .fifth-row-investment-journey {
        background: linear-gradient(135deg, #2c1a0f 0%, #3e2723 100%);
        border-color: #5d4037;
    }
    
    .investment-journey-column {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .column-title {
        color: #e2e8f0;
    }
    
    .portfolio-item {
        background: #4a5568;
    }
    
    .photo-item {
        border: 1px solid #718096;
    }
    
    .upload-area {
        background: #4a5568;
        border-color: #718096;
    }
    
    .article-item {
        background: #4a5568;
    }
    
    .editor-textarea {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .editor-toolbar {
        background: #4a5568;
    }
    
    .editor-btn {
        background: #2d3748;
        border-color: #718096;
        color: #cbd5e0;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-item {
    animation: fadeIn 0.5s ease forwards;
}

.photo-item {
    animation: fadeIn 0.5s ease forwards;
}

.article-item {
    animation: fadeIn 0.5s ease forwards;
}

.portfolio-item:nth-child(1) { animation-delay: 0.1s; }
.portfolio-item:nth-child(2) { animation-delay: 0.2s; }
.portfolio-item:nth-child(3) { animation-delay: 0.3s; }
.portfolio-item:nth-child(4) { animation-delay: 0.4s; }

.photo-item:nth-child(1) { animation-delay: 0.1s; }
.photo-item:nth-child(2) { animation-delay: 0.2s; }
.photo-item:nth-child(3) { animation-delay: 0.3s; }
.photo-item:nth-child(4) { animation-delay: 0.4s; }
.photo-item:nth-child(5) { animation-delay: 0.5s; }
.photo-item:nth-child(6) { animation-delay: 0.6s; }

.article-item:nth-child(1) { animation-delay: 0.1s; }
.article-item:nth-child(2) { animation-delay: 0.2s; }
.article-item:nth-child(3) { animation-delay: 0.3s; }
.article-item:nth-child(4) { animation-delay: 0.4s; }