/* 基本样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #e41d3c;
    margin-bottom: 10px;
}

/* 主内容区域 */
main {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

/* 输入区域 */
.input-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

textarea {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    min-height: 100px;
    resize: vertical;
    font-family: 'Consolas', monospace;
}

button {
    background-color: #e41d3c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #c4172f;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.small-btn {
    padding: 4px 8px;
    font-size: 12px;
    margin-left: 10px;
    background-color: #666;
}

.small-btn:hover {
    background-color: #444;
}

.info-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

/* 刷新设置 */
.refresh-settings {
    margin-top: 15px;
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.refresh-settings label {
    font-size: 14px;
    color: #555;
}

.refresh-settings input {
    width: 80px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/* 结果区域 */
.results-section {
    margin-bottom: 30px;
}

/* 加载指示器 */
#loading {
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f8f8;
    font-weight: bold;
}

tr:hover {
    background-color: #f5f5f5;
}

/* 价格显示样式 */
.current-price {
    color: #e41d3c;
    font-weight: bold;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 12px;
}

.discount {
    background-color: #e41d3c;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
    margin-left: 5px;
}

/* 历史记录区域 */
.history-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: 8px;
}

.history-section h2 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

#history-table {
    font-size: 13px;
}

/* 导出区域 */
.export-section {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    width: 80%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    border-radius: 8px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

/* 图表容器 */
.chart-container {
    width: 100%;
    height: 350px;
    margin: 20px 0;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    background-color: #fff;
}

#priceChart {
    width: 100% !important;
    height: 100% !important;
}

#price-history-data {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px;
}

/* 操作按钮 */
.action-btn {
    background-color: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
    cursor: pointer;
}

.action-btn:hover {
    background-color: #555;
}

/* 辅助类 */
.hidden {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        padding: 15px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 6px 8px;
    }
    
    .refresh-settings {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .refresh-settings input {
        width: 100%;
    }
} 