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

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

.hidden {
    display: none !important;
}

.page {
    min-height: 100vh;
}

/* 登录页面 */
.login-box {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #1a73e8;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    font-family: monospace;
}

.form-group small {
    color: #666;
    font-size: 12px;
}

.code-input {
    display: flex;
    gap: 10px;
}

.code-input input {
    flex: 1;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary:hover {
    background: #1557b0;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 10px 20px;
    background: #666;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #444;
}

.btn-success {
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-success:hover {
    background: #218838;
}

.btn-success:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-danger {
    padding: 5px 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
}

.message.success {
    background: #d4edda;
    color: #155724;
}

/* 主页面 */
header {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 20px;
    color: #1a73e8;
}

/* 标签页 */
.tabs {
    display: flex;
    background: white;
    padding: 0 30px;
    border-bottom: 1px solid #eee;
}

.tab {
    padding: 15px 30px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
}

.tab:hover {
    color: #1a73e8;
}

.tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

.tab-content {
    padding: 20px 30px;
}

/* 工具栏 */
.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.toolbar input[type="date"] {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    background: white;
}

.toolbar input[type="date"]:hover {
    border-color: #1a73e8;
}

.toolbar .date-label {
    color: #666;
    font-size: 14px;
}

/* 卡片列表 */
.card-list {
    display: grid;
    gap: 15px;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.card-header h3 {
    font-size: 16px;
    color: #1a73e8;
}

.card-header .id {
    font-size: 12px;
    color: #999;
}

.card-content {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    word-break: break-all;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.card-checkbox {
    margin-right: 10px;
}

/* 选股结果表格 */
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.result-table th,
.result-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.result-table th {
    background: #f8f9fa;
    font-weight: 500;
    color: #666;
}

.result-table tr:hover {
    background: #f8f9fa;
}

/* 原有样式兼容 */
.selection-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.selection-table table {
    width: 100%;
    border-collapse: collapse;
}

.selection-table th,
.selection-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.selection-table th {
    background: #f8f9fa;
    font-weight: 500;
    color: #666;
}

.selection-table tr:hover {
    background: #f8f9fa;
}

.change-up {
    color: #dc3545;
}

.change-down {
    color: #28a745;
}

/* 弹窗 */
.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;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* 空状态 */
.empty {
    text-align: center;
    padding: 40px;
    color: #999;
}
