* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2980, #26d0ce);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    font-size: 16px;
}

@media (max-width: 768px) {
    body {
        padding: 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
        font-size: 13px;
    }
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 200px;
    height: 200px;
    background: rgba(30, 136, 229, 0.05);
    border-radius: 50%;
}

.container::after {
    content: "";
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: rgba(41, 182, 246, 0.05);
    border-radius: 50%;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

h1 {
    font-size: 2.8rem;
    color: #1e88e5;
    margin-bottom: 10px;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    display: inline-block;
}

h1::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 10%;
    width: 80%;
    height: 4px;
    background: linear-gradient(to right, transparent, #1e88e5, transparent);
    border-radius: 2px;
}

.contact-info {
    background: linear-gradient(to right, #e3f2fd, #bbdefb);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: bold;
    color: #0d47a1;
    border: 1px solid #90caf9;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 2;
}

.contact-info a {
    color: #0d47a1;
    text-decoration: none;
    font-weight: bold;
}

.contact-info a:hover {
    text-decoration: underline;
}

.section {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: 1.4rem;
    color: #1565c0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e3f2fd;
}

.query-type {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.query-type label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 12px 25px;
    background: #e3f2fd;
    border-radius: 50px;
    transition: all 0.3s;
}

.query-type label:hover {
    background: #bbdefb;
    transform: translateY(-2px);
}

.query-type input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.query-type input[type="radio"] + span {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2px solid #1e88e5;
    border-radius: 50%;
}

.query-type input[type="radio"]:checked + span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 12px;
    height: 12px;
    background: #1e88e5;
    border-radius: 50%;
}

.input-section textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #bbdefb;
    border-radius: 10px;
    font-size: 1.1rem;
    resize: vertical;
    transition: border-color 0.3s;
}

.input-section textarea:focus {
    border-color: #1e88e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.2);
}

.settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    font-weight: bold;
    color: #1565c0;
}

.setting-item input {
    padding: 13px;
    border: 2px solid #bbdefb;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.setting-item input:focus {
    border-color: #1e88e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.2);
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 30px 0;
    justify-content: center;
}

button {
    padding: 14px 30px;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 160px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#startBtn {
    background: linear-gradient(to right, #4caf50, #2e7d32);
    color: white;
}

#stopBtn {
    background: linear-gradient(to right, #f44336, #c62828);
    color: white;
}

#clearBtn {
    background: linear-gradient(to right, #ff9800, #ef6c00);
    color: white;
}

#exportBtn {
    background: linear-gradient(to right, #21f360, #08b102);
    color: white;
}

#homeBtn {
    background: linear-gradient(to right, #2196f3, #1565c0);
    color: white;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: translateY(1px);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.progress-container {
    margin: 30px 0;
    background: linear-gradient(to right, #e3f2fd, #bbdefb);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 1.1rem;
    color: #0d47a1;
}

.progress-bar {
    height: 28px;
    background: #e0e0e0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.1);
}

.progress {
    height: 100%;
    background: linear-gradient(to right, #1e88e5, #0d47a1);
    border-radius: 14px;
    width: 0;
    transition: width 0.5s ease;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.3);
}

.result-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-bottom: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 15px;
    border-radius: 12px;
    background: linear-gradient(to right, #e3f2fd, #bbdefb);
}

.result-stats div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.result-stats span:first-child {
    color: #1565c0;
    font-size: 1.1rem;
}

.result-stats span:last-child {
    font-size: 1.8rem;
    color: #0d47a1;
}

.result-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 2px solid #bbdefb;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 600px;
}

th {
    background: linear-gradient(to bottom, #1e88e5, #1565c0);
    color: white;
    padding: 16px 15px;
    text-align: left;
    position: sticky;
    top: 0;
}

th:first-child {
    border-top-left-radius: 8px;
}

th:last-child {
    border-top-right-radius: 8px;
}

td {
    padding: 14px 15px;
    border-bottom: 1px solid #e0e0e0;
}

tr:nth-child(even) {
    background-color: #f5f9ff;
}

tr:hover {
    background-color: #e3f2fd;
}

.status-success {
    color: #2e7d32;
    font-weight: bold;
}

.status-error {
    color: #c62828;
    font-weight: bold;
}

.status-pending {
    color: #ef6c00;
    font-weight: bold;
}

.footer-note {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    color: #546e7a;
    font-size: 0.9rem;
}

/* 优化现有的媒体查询 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 0;
        border-radius: 8px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .query-type {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .query-type label {
        width: 100%;
        justify-content: center;
        padding: 8px 15px;
    }
    
    .input-section textarea {
        min-height: 100px;
    }
    
    .settings {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .setting-item input {
        padding: 10px;
    }
    
    .buttons {
        flex-direction: column;
        gap: 10px;
        margin: 15px 0;
    }
    
    button {
        width: 100%;
        padding: 12px 15px;
        min-width: auto;
        font-size: 1rem;
        min-height: 44px; /* 确保触摸目标足够大 */
    }
    
    .setting-item input {
        padding: 10px;
        height: 44px; /* 确保触摸目标足够大 */
    }
    
    .progress-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    .result-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 10px;
    }
    
    .result-stats span:last-child {
        font-size: 1.4rem;
    }
    
    /* 优化表格在移动端的显示 */
    .result-container {
        table-responsive {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            max-height: 400px;
            overflow-y: auto;
        }
        
        @media (max-width: 768px) {
            .table-responsive {
                max-height: 300px;
            }
        }
        
        @media (max-width: 480px) {
            .table-responsive {
                max-height: 250px;
            }
        }
    }
    
    table {
        min-width: auto;
    }
    
    th, td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
}

/* 添加小屏幕手机的媒体查询 */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .contact-info {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    /* 调整表格布局，使其在小屏幕上更易读 */
    th:nth-child(1), td:nth-child(1) { /* 序号列 */
        width: 15%;
    }
    
    th:nth-child(2), td:nth-child(2) { /* 查询内容列 */
        width: 25%;
    }
    
    th:nth-child(3), td:nth-child(3) { /* 结果列 */
        width: 40%;
    }
    
    th:nth-child(4), td:nth-child(4) { /* 状态列 */
        width: 20%;
    }
}
.pulse {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(0.8); opacity: 1; }
}

/* 密钥错误状态样式 */
.status-key-error {
    color: #ff5722;
    font-weight: bold;
}

/* 购买密钥按钮样式 */
.setting-item {
    position: relative;
}

.buy-key-btn {
    position: absolute;
    right: 0;
    top: 40px;
    background: linear-gradient(to right, #ff9800, #f57c00);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-width: auto;
}

.buy-key-btn:hover {
    background: linear-gradient(to right, #f57c00, #e65100);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 调整密钥输入框宽度，为按钮留出空间 */
.setting-item input#apiKey {
    width: calc(100% - 90px);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .buy-key-btn {
        position: relative;
        top: 0;
        margin-top: 10px;
        width: 100%;
    }
    
    .setting-item input#apiKey {
        width: 100%;
    }
}