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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 40px 20px;
}

.home-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    z-index: 1000;
}

.home-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 32px;
    text-align: center;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.controls {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

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

.control-group label {
    font-weight: 500;
    color: #555;
}

select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    background: white;
    transition: border-color 0.3s;
}

select:hover {
    border-color: #667eea;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    padding: 10px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

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

.btn-success {
    padding: 10px 30px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-success:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

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

.info-box {
    background: #e8f4fd;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
}

.info-box h3 {
    color: #333;
    font-size: 16px;
    margin-bottom: 12px;
}

.info-box .filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.info-box .tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
    transition: all 0.3s;
}

.info-box .tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#progress_area {
    margin-bottom: 25px;
    max-height: 600px;
    overflow-y: auto;
}

.page-container {
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.page-header {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    font-size: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.stocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.stock-tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border: 2px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 85px;
    justify-content: center;
}

.stock-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 符合条件的股票 - 红框红底 */
.stock-tag.qualified {
    border-color: #dc3545;
    border-width: 2px;
    background: #ffe6e6;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

/* 选中的股票 */
.stock-tag.selected {
    background: #667eea;
    border-color: #667eea;
}

.stock-tag.selected .stock-code,
.stock-tag.selected .stock-name,
.stock-tag.selected .stock-price {
    color: white;
}

.stock-code {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
}

.stock-name {
    color: #666;
    font-size: 12px;
    margin-bottom: 4px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.stock-price {
    color: #ff5722;
    font-size: 12px;
    font-weight: 500;
}

.page-loading {
    text-align: center;
    padding: 15px;
    color: #667eea;
    font-size: 14px;
}

.page-info {
    text-align: center;
    padding: 12px;
    color: #666;
    font-size: 14px;
    background: #fff3cd;
    border-radius: 5px;
    margin: 10px 0;
}

.continue-btn {
    display: block;
    width: 100%;
    padding: 12px 24px;
    margin: 15px 0;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.continue-btn:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.finish-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    margin: 20px 0;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.finish-btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.result-table thead {
    background: #667eea;
    color: white;
}

.result-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.result-table th:last-child {
    text-align: right;
}

.result-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

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

.result-table td {
    padding: 12px;
    font-size: 14px;
    color: #333;
}

.result-table td:last-child {
    text-align: right;
}

.code {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #667eea;
}

.price {
    font-weight: 600;
}

.change-up {
    color: #f44336;
}

.change-down {
    color: #4CAF50;
}

.summary {
    text-align: center;
    padding: 15px;
    background: #e8f4fd;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 15px;
    color: #333;
}

.summary strong {
    color: #667eea;
    font-size: 18px;
}
