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

body {
    background: radial-gradient(circle at 10% 30%, #0a0f1e, #03060c);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, 'Roboto', sans-serif;
    color: #eef5ff;
    padding: 2rem 1.5rem 5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard {
    max-width: 1400px;
    margin: 0 auto;
    flex: 1;
}

.hero {
    text-align: center;
    margin-bottom: 2rem;
}
.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a0c4ff, #5b8cff, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}
.hero p {
    color: #8e9eae;
    margin-top: 0.5rem;
}

.glass-card {
    background: rgba(18, 25, 40, 0.65);
    backdrop-filter: blur(12px);
    border-radius: 1.8rem;
    border: 1px solid rgba(91, 140, 255, 0.25);
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.4);
    padding: 1.2rem;
    margin-bottom: 2rem;
}

.fund-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.fund-table th, .fund-table td {
    padding: 1rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid rgba(91, 140, 255, 0.2);
    vertical-align: top;
}
.fund-table th {
    color: #90a9dd;
    font-weight: 600;
    background: rgba(10, 20, 35, 0.5);
}
.fund-table tr:hover {
    background: rgba(91, 140, 255, 0.08);
}
.date-cell {
    font-weight: 600;
    color: #c0dbff;
}
.value-cell {
    font-family: monospace;
    font-weight: 500;
}

.growth-cell {
    font-family: monospace;
    font-weight: 500;
    color: #5b8cff;
}

.cumulative-growth-cell {
    font-family: monospace;
    font-weight: 500;
    color: #5b8cff;
}

.card-cumulative-growth {
    font-family: monospace;
    font-weight: 500;
    color: #5b8cff;
    margin-top: 5px;
}

/* 操作列样式 */
.action-cell {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.edit-btn {
    background: rgba(91, 140, 255, 0.2);
    color: #5b8cff;
}

.edit-btn:hover {
    background: rgba(91, 140, 255, 0.4);
    transform: scale(1.05);
}

.delete-btn {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.delete-btn:hover {
    background: rgba(255, 107, 107, 0.4);
    transform: scale(1.05);
}

.card-growth {
    font-family: monospace;
    font-weight: 500;
    color: #5b8cff;
    margin-top: 5px;
}

/* 截图列 */
.screenshots-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.screenshot-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
    border: 1px solid #3a4c6e;
    transition: 0.1s;
}
.add-screenshot-btn {
    width: 50px;
    height: 50px;
    background: rgba(91, 140, 255, 0.2);
    border: 1px dashed #5b8cff;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5b8cff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
}
.img-wrapper {
    position: relative;
    display: inline-block;
}
.delete-img {
    position: absolute;
    top: -6px;
    right: -6px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #ff9e8f;
    cursor: pointer;
    backdrop-filter: blur(2px);
    z-index: 2;
}

/* 附件列 */
.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.attachment-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
    background: rgba(91, 140, 255, 0.1);
    border-radius: 1.5rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    max-width: 100%;
}
.attachment-item i {
    font-size: 0.9rem;
    color: #5b8cff;
    cursor: pointer;
}
.attachment-name {
    white-space: normal;
    word-wrap: break-word;
    max-width: 200px;
}
.delete-attachment {
    cursor: pointer;
    color: #ff8a7a;
    margin-left: 0.2rem;
}
.add-attachment-btn {
    background: rgba(91, 140, 255, 0.2);
    border: 1px dashed #5b8cff;
    border-radius: 2rem;
    padding: 0.2rem 0.8rem;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    width: fit-content;
    margin-top: 0.3rem;
}

/* 悬浮按钮 */
.fab-add {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(145deg, #5b8cff, #3b5fdb);
    width: 56px;
    height: 56px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 6px 16px rgba(91,140,255,0.4);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 100;
    border: none;
}
.fab-add:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 24px rgba(91,140,255,0.6);
}

/* 页脚 */
.footer {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    font-size: 0.8rem;
    color: #7c8aa8;
    border-top: 1px solid rgba(91, 140, 255, 0.2);
    background: rgba(10, 20, 35, 0.4);
    backdrop-filter: blur(4px);
    border-radius: 2rem;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* 模态框 */
.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: 0.2s;
}
.modal-mask.active {
    visibility: visible;
    opacity: 1;
}
.modal-content {
    background: #0f172be6;
    border-radius: 1.8rem;
    padding: 1.5rem;
    width: 90%;
    max-width: 500px;
    border: 1px solid #5b8cff;
    color: white;
}
.modal-content input {
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    border-radius: 2rem;
    background: #07111e;
    border: 1px solid #2c405c;
    color: white;
}
.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}
.modal-buttons button {
    padding: 8px 18px;
    border-radius: 40px;
    border: none;
    cursor: pointer;
}
.btn-primary {
    background: #5b8cff;
}

/* 卡片样式 - 用于手机竖屏 */
.card-container {
    display: none;
}

.card-item {
    background: rgba(18, 25, 40, 0.65);
    backdrop-filter: blur(12px);
    border-radius: 1.8rem;
    border: 1px solid rgba(91, 140, 255, 0.25);
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.4);
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-date {
    font-weight: 600;
    color: #c0dbff;
    font-size: 1rem;
}

.card-value {
    font-family: monospace;
    font-weight: 500;
    font-size: 1.1rem;
    color: #5b8cff;
}

.card-body {
    margin-top: 1rem;
}

/* 增长率容器 - 用于在同一行显示环增和累增 */
.growth-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.growth-item {
    flex: 1;
}

.card-section {
    margin-bottom: 1rem;
}

.card-section-title {
    font-size: 0.85rem;
    color: #90a9dd;
    margin-bottom: 0.5rem;
}

/* 图表容器样式 */
.chart-container {
    width: 100%;
    margin: 0 auto;
}

.fund-name {
    color: #cbd5ff;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.glass-card {
    background: rgba(18, 25, 40, 0.65);
    backdrop-filter: blur(12px);
    border-radius: 1.8rem;
    border: 1px solid rgba(91, 140, 255, 0.25);
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.4);
    padding: 1.2rem;
    margin-bottom: 2rem;
    overflow-x: auto;
}

#fundChart {
    height: 525px;
    display: block;
}

@media (max-width: 768px) {
    body {
        padding: 1rem 0.8rem 4rem;
    }
    
    /* 隐藏表格，显示卡片 */
    .fund-table {
        display: none;
    }
    
    .card-container {
        display: block;
    }
    
    .screenshot-thumb, .add-screenshot-btn {
        width: 40px;
        height: 40px;
    }
    
    .attachment-name {
        max-width: 100%;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .glass-card {
        padding: 1rem;
        margin-bottom: 1.5rem;
        /* 移除外框 */
        background: transparent;
        backdrop-filter: none;
        border: none;
        box-shadow: none;
        border-radius: 0;
        /* 确保图表容器有滚动条 */
        overflow-x: auto;
    }
    
    /* 图表容器样式 */
    .chart-container {
        width: 100%;
        margin: 0 auto;
    }
    
    /* 确保图表高度合适 */
    #fundChart {
        height: 400px !important;
        display: block;
    }
    
    .fab-add {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
        border-radius: 25px;
    }
}