/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

/* 容器布局 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 页头 */
header {
    background-color: #1565c0;
    color: #fff;
    padding: 20px;
    text-align: center;
}

header h1 {
    font-size: 24px;
    margin: 0;
}

/* 查询面板 */
.query-panel {
    padding: 20px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.query-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group select,
.form-group input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 200px;
    justify-content: flex-end;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #1565c0;
    color: white;
}

.btn-primary:hover {
    background-color: #0d47a1;
}

.btn-secondary {
    background-color: #4caf50;
    color: white;
}

.btn-secondary:hover {
    background-color: #388e3c;
}

/* 结果面板 */
.result-panel {
    padding: 20px;
}

.data-summary {
    margin-bottom: 20px;
}

.data-summary h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

#metalName {
    margin-left: 10px;
    color: #1565c0;
    font-weight: normal;
}

#dataSummary {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.summary-item {
    background-color: #f5f5f5;
    padding: 10px 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.summary-label {
    font-weight: bold;
    margin-right: 5px;
    color: #555;
}

.summary-value {
    color: #1565c0;
    font-weight: bold;
}

/* 数据表格 */
.data-table-container {
    position: relative;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #333;
    position: sticky;
    top: 0;
}

.data-table tbody tr:hover {
    background-color: #f9f9f9;
}

/* 价格上涨/下跌颜色 */
.price-up {
    color: #388e3c;
}

.price-down {
    color: #d32f2f;
}

/* 消息样式 */
.no-data-message, 
.loading-message {
    text-align: center;
    padding: 40px;
    color: #757575;
    font-size: 16px;
}

.loading-message {
    display: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .form-group {
        min-width: 100%;
    }
    
    .form-actions {
        min-width: 100%;
        justify-content: center;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: 14px;
    }
} 