/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.sky-header {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav ul li {
    margin-left: 2rem;
}

.nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.nav ul li a:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* 英雄区域 */
.hero {
    background: rgba(102, 126, 234, 0.5);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 公告区域 */
.announcement {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    padding: 2rem 0;
    margin: 2rem auto;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.announcement-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.announcement h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.announcement-text {
    color: #333;
    line-height: 1.8;
    font-size: 1.1rem;
    white-space: pre-wrap;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/sky-pattern.png') repeat;
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 功能特点 */
.features {
    background: rgba(255, 255, 255, 0.6);
    padding: 4rem 0;
}

.features h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #667eea;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    background: rgba(102, 126, 234, 0.05);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
    backdrop-filter: blur(10px);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: rgba(102, 126, 234, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-item h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #667eea;
}

/* 工具列表预览 */
.tools-preview {
    background: rgba(255, 255, 255, 0.5);
    padding: 4rem 0;
    backdrop-filter: blur(8px);
}

.tools-preview h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #667eea;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.tool-card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #667eea;
}

.tool-card p {
    margin-bottom: 1rem;
    color: #666;
}

.tool-card .btn {
    background: #667eea;
    color: white;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

.tool-card .btn:hover {
    background: #5568d3;
}

/* 页脚 */
.sky-footer {
    background: rgba(102, 126, 234, 0.5);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    backdrop-filter: blur(8px);
}

/* 工具页面 */
.tools-page {
    background: rgba(255, 255, 255, 0.6);
    padding: 4rem 0;
    backdrop-filter: blur(8px);
}

.tools-page h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #667eea;
}

/* 关于页面 */
.about-section {
    background: rgba(255, 255, 255, 0.6);
    padding: 4rem 0;
    backdrop-filter: blur(8px);
}

.about-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #667eea;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .about-content {
        grid-template-columns: 2fr 1fr;
    }
}

.about-text {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #333;
}

.sponsor-section {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.sponsor-section h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.sponsor-section p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #333;
}

.sponsor-code, .sponsor-link {
    margin-bottom: 1.5rem;
}

.sponsor-code h4, .sponsor-link h4 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.code-container {
    background: rgba(102, 126, 234, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    text-align: center;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.sponsor-link a {
    display: inline-block;
    margin-top: 0.5rem;
}

/* API工具表单 */
.api-tool {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.api-tool h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    text-align: right;
    margin-top: 2rem;
}

/* API响应区域 */
.response-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid #e9ecef;
}

.response-section h4 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.response-content {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: left;
}

/* 后台登录页面 */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-form {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
}

.login-form h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 2rem;
    font-size: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0.5rem 0;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        padding: 0;
    }
    
    .nav ul li {
        margin: 0 0.3rem 0.5rem 0.3rem;
    }
    
    .nav ul li a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .hero {
        padding: 3rem 0 2rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    
    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .features {
        padding: 2rem 0;
    }
    
    .features h3 {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }
    
    .features-grid,
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-item,
    .tool-card {
        padding: 1.5rem;
    }
    
    .features-preview {
        padding: 2rem 0;
    }
    
    .tools-preview h3 {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }
    
    .login-form {
        padding: 2rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 成功/错误消息 */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.message.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.message.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* 工具卡片新样式 */
.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tool-header h4 {
    margin: 0;
    font-size: 1.3rem;
    color: #667eea;
}

.status-indicator {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-online {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-offline {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.status-maintenance {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.tool-meta {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.method-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.method-GET {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.method-POST {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.method-PUT {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.method-DELETE {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.endpoint-url {
    font-family: 'Courier New', Courier, monospace;
    background: rgba(102, 126, 234, 0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 0.5rem 1rem;
}

.modal-content .close:hover,
.modal-content .close:focus {
    color: #333;
    text-decoration: none;
}

.modal-tool-container {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.modal-tool-container h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.tool-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.loading-container {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-container .loading {
    margin-bottom: 1rem;
    width: 40px;
    height: 40px;
    border-width: 5px;
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.error-message h4 {
    color: #dc3545;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* 新增样式 */
.required {
    color: #dc3545;
    font-weight: bold;
    margin-left: 2px;
}

.no-params-message {
    background: rgba(102, 126, 234, 0.05);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 3px solid #667eea;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    border-radius: 20px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-tool-container {
        padding: 1.5rem;
    }
    
    .tool-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .tool-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .endpoint-url {
        max-width: 100%;
    }
    
    .response-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
    
    /* 更新日志页面响应式 */
    .update-logs-page {
        padding: 2rem 0;
    }
    
    .update-logs-container {
        padding: 1.5rem;
    }
    
    .log-item {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .log-title {
        font-size: 1.3rem;
    }
    
    .log-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    /* 关于页面响应式 */
    .about-section {
        padding: 2rem 0;
    }
    
    .about-section h2 {
        font-size: 1.6rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-text,
    .sponsor-section {
        padding: 1.5rem;
    }
    
    /* 工具页面响应式 */
    .tools-page {
        padding: 2rem 0;
    }
    
    .tools-page h2 {
        font-size: 1.6rem;
    }
    
    /* API工具表单响应式 */
    .api-tool {
        padding: 1.5rem;
    }
    
    .api-tool h3 {
        font-size: 1.3rem;
    }
}

/* 图片容器和查看大图按钮 */
.image-container {
    position: relative;
    display: inline-block;
    width: 100%;
    text-align: center;
    margin-bottom: 15px;
}

.image-container img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.image-container img:hover {
    transform: scale(1.02);
}

.view-large-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.3);
}

.view-large-btn:hover {
    background-color: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

/* 大图预览样式 */
.large-image-container {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    justify-content: center;
    align-items: center;
}

.large-image-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.large-image-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 2001;
    animation: largeImageSlideIn 0.3s ease-out;
}

@keyframes largeImageSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.large-image-content img {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.large-image-close {
    position: absolute;
    top: -35px;
    right: -35px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    text-align: center;
    line-height: 35px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    z-index: 2002;
}

.large-image-close:hover,
.large-image-close:focus {
    color: #667eea;
    transform: rotate(90deg);
    background-color: rgba(0, 0, 0, 0.8);
}

/* 复制结果按钮样式 */
.copy-btn {
    padding: 6px 12px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background-color: #5a6268;
}