/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主要内容样式 */
main {
    padding: 30px 20px;
    text-align: center;
}

.fetch-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    margin: 20px 0;
}

.fetch-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.fetch-button:active {
    transform: translateY(1px);
}

/* 加载中样式 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    font-size: 1.2rem;
    color: #667eea;
}

.loading::after {
    content: "";
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 结果容器样式 */
.result-container {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 5px solid #667eea;
    text-align: left;
}

.result-container h2 {
    margin-bottom: 15px;
    color: #333;
}

.result-content {
    background-color: #2d3748;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 错误信息样式 */
.error-message {
    margin: 30px 0;
    padding: 20px;
    background-color: #fff5f5;
    border-radius: 8px;
    border-left: 5px solid #e53e3e;
    text-align: left;
}

.error-message h2 {
    color: #e53e3e;
    margin-bottom: 10px;
}

.error-message p {
    color: #742a2a;
}

/* 页脚样式 */
footer {
    padding: 20px;
    text-align: center;
    background-color: #f8f9fa;
    color: #718096;
    font-size: 0.9rem;
}

/* 工具类 */
.hidden {
    display: none;
}