body {
    font-family: 'Arial', sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
    line-height: 1.6;
}

.search-container {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-top: 50px;
}

h1 {
    color: #1a73e8;
    margin-bottom: 15px;
}

.search-box {
    display: flex;
    justify-content: center;
    margin: 25px 0;
}

#searchInput {
    width: 70%;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #dfe1e5;
    border-radius: 24px 0 0 24px;
    outline: none;
    transition: all 0.3s;
}

#searchInput:focus {
    border-color: #1a73e8;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.1);
}

#searchButton {
    padding: 12px 25px;
    font-size: 16px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 0 24px 24px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

#searchButton:hover {
    background-color: #1765cc;
}

.loading {
    display: none;
    margin-top: 20px;
    flex-direction: column;
    align-items: center;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #1a73e8;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    color: #d32f2f;
    margin-top: 20px;
    padding: 15px;
    background-color: #ffebee;
    border-radius: 4px;
    display: none;
    border-left: 4px solid #d32f2f;
}

.error h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.error-details {
    background-color: #fce4ec;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    font-family: monospace;
    font-size: 14px;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

.retry-button {
    padding: 8px 16px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.retry-button:hover {
    background-color: #1765cc;
}

.confirm-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.dialog-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.dialog-content h3 {
    color: #d32f2f;
    margin-top: 0;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.dialog-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#confirmYes {
    background-color: #1a73e8;
    color: white;
}

#confirmNo {
    background-color: #f5f5f5;
    color: #333;
}

@media (max-width: 600px) {
    .search-box {
        flex-direction: column;
    }
    
    #searchInput, #searchButton {
        width: 100%;
        border-radius: 24px;
        margin: 5px 0;
    }
}
/* 解释显示区域样式 - 更新按钮布局 */
.explanation {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 1001;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.explanation h3 {
    color: #1a73e8;
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.explanation p {
    margin: 10px 0;
    line-height: 1.6;
}

.explanation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

.explanation-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    flex: 1;
}

#acceptExplanation {
    background-color: #1a73e8;
    color: white;
}

#useOriginalQuery {
    background-color: #ff9800;
    color: white;
}

#cancelExplanation {
    background-color: #f5f5f5;
    color: #333;
}

#acceptExplanation:hover {
    background-color: #1765cc;
}

#useOriginalQuery:hover {
    background-color: #e68a00;
}

#cancelExplanation:hover {
    background-color: #e0e0e0;
}