/* 行情页面样式 */
.quotes-section {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

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

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: #3498db;
}

.quote-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
}

.watchlist-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.watchlist-select:focus {
    outline: none;
    border-color: #3498db;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.table-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

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

.data-table thead {
    background-color: #f8f9fa;
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #34495e;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
}

.data-table tr:hover td {
    background-color: #f8f9fa;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.stock-code {
    font-weight: 600;
    color: #2c3e50;
}

.stock-name {
    color: #5d6d7e;
}

.up {
    color: #27ae60;
    font-weight: 600;
}

.down {
    color: #e74c3c;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.detail-btn {
    background-color: #3498db;
    color: white;
}

.detail-btn:hover {
    background-color: #2980b9;
}

.remove-btn {
    background-color: #e74c3c;
    color: white;
}

.remove-btn:hover {
    background-color: #c0392b;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 20px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background-color: white;
    color: #34495e;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(.disabled) {
    background-color: #f8f9fa;
    border-color: #3498db;
}

.page-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.message.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .table-container {
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .section-title {
        justify-content: center;
    }
    
    .quote-controls {
        justify-content: center;
    }
    
    .search-input {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .quotes-section {
        padding: 10px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
        font-size: 12px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
    
    .btn-sm {
        width: 100%;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .table-container {
        background-color: #1e293b;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    .section-title {
        color: #e2e8f0;
    }
    
    .data-table thead {
        background-color: #334155;
    }
    
    .data-table th {
        color: #cbd5e1;
        border-bottom-color: #475569;
    }
    
    .data-table td {
        color: #e2e8f0;
        border-bottom-color: #475569;
    }
    
    .data-table tr:hover td {
        background-color: #334155;
    }
    
    .stock-code {
        color: #e2e8f0;
    }
    
    .stock-name {
        color: #94a3b8;
    }
    
    .search-input,
    .watchlist-select {
        background-color: #334155;
        border-color: #475569;
        color: #e2e8f0;
    }
    
    .search-input:focus,
    .watchlist-select:focus {
        border-color: #38bdf8;
    }
    
    .page-btn {
        background-color: #334155;
        border-color: #475569;
        color: #e2e8f0;
    }
    
    .page-btn:hover:not(.disabled) {
        background-color: #475569;
        border-color: #38bdf8;
    }
    
    .page-btn.active {
        background-color: #38bdf8;
        border-color: #38bdf8;
    }
    
    .loading {
        color: #94a3b8;
    }
    
    .message.success {
        background-color: #064e3b;
        color: #a7f3d0;
        border-left-color: #10b981;
    }
    
    .message.error {
        background-color: #4c1d95;
        color: #fbcfe8;
        border-left-color: #be185d;
    }
}