/* 基本樣式 */
.stock-crawler-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.stock-crawler-header {
    text-align: center;
    margin-bottom: 30px;
}

.stock-crawler-header h2 {
    color: #2c3e50;
    font-size: 28px;
}

/* 表單樣式 */
.stock-crawler-form {
    margin-bottom: 30px;
}

.stock-crawler-form .form-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#stockCodeInput {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.stock-crawler-form button {
    padding: 12px 25px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.stock-crawler-form button:hover {
    background: #2980b9;
}

.stock-crawler-form button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.hint {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 5px;
}

/* 結果樣式 */
#stockResultContainer {
    margin: 30px 0;
    min-height: 100px;
}

.stock-result {
    background: #f8f9fa;
    border-radius: 5px;
    padding: 20px;
    border-left: 4px solid #3498db;
}

.stock-result h3 {
    margin-top: 0;
    color: #2c3e50;
}

.stock-price {
    font-size: 28px;
    font-weight: bold;
    margin: 10px 0;
}

.stock-change {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.stock-change.up {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
}

.stock-change.down {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.update-time {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 10px;
}

/* 圖表容器 */
.stock-chart-container {
    margin-top: 40px;
    height: 400px;
}

/* 通知消息 */
.stock-notice {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notice-info {
    background: #e3f2fd;
    color: #1976d2;
}

.notice-error {
    background: #ffebee;
    color: #d32f2f;
}

.loading-message {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
}

.tracked-stocks-container {
    margin: 30px 0;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 15px;
}

.tracked-stocks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tracked-stocks-header h3 {
    margin: 0;
    color: #2c3e50;
}

.tracked-stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.tracked-stock-item:last-child {
    border-bottom: none;
}

.stock-info {
    flex: 1;
}

.stock-actions {
    display: flex;
    gap: 10px;
}

.btn-view, .btn-remove, .track-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-view {
    background: #3498db;
    color: white;
}

.btn-view:hover {
    background: #2980b9;
}

.btn-remove {
    background: #e74c3c;
    color: white;
}

.btn-remove:hover {
    background: #c0392b;
}

.track-btn {
    background: #f1c40f;
    color: #2c3e50;
}

.track-btn.tracking {
    background: #2ecc71;
    color: white;
}

.track-btn:hover {
    opacity: 0.9;
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}