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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f6f8;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.days-filter {
    display: flex;
    gap: 8px;
    align-items: center;
}

.day-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.day-btn:hover {
    background: #f0f0f0;
}

.day-btn.active {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

#days-input {
    width: 70px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#query-btn, #refresh-btn, .link-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

#query-btn {
    background: #52c41a;
    color: #fff;
}

#refresh-btn {
    background: #faad14;
    color: #fff;
}

.link-btn {
    background: #722ed1;
    color: #fff;
    margin-left: 10px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

#data-date {
    color: #666;
    font-size: 14px;
}

.loading {
    text-align: center;
    padding: 30px;
    color: #666;
}

.error {
    padding: 15px;
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
    border-radius: 4px;
    margin-bottom: 15px;
}

.hidden {
    display: none !important;
}

.industry-table, .stock-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.industry-table th, .industry-table td,
.stock-table th, .stock-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.industry-table th, .stock-table th {
    background: #fafafa;
    font-weight: 600;
    color: #555;
}

.industry-table tr:hover, .stock-table tr:hover {
    background: #f5f5f5;
}

.num {
    text-align: right;
    font-family: "SFMono-Regular", Consolas, monospace;
}

.up {
    color: #cf1322;
}

.down {
    color: #237804;
}

.expand-btn {
    padding: 4px 10px;
    background: #1890ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    width: 95%;
    max-width: 1300px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 20px;
    position: relative;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.close-btn:hover {
    color: #333;
}

#modal-title {
    margin-bottom: 15px;
    padding-right: 30px;
}

@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .days-filter {
        flex-wrap: wrap;
    }
    .industry-table th, .industry-table td {
        padding: 8px 10px;
        font-size: 12px;
    }
}
