:root {
    --primary-color: #FFDAB9;
    --secondary-color: #E6E6FA;
    --query-color: #D8BFD8;
    --background-color: #FCFBF8;
    --surface-color: #FFFFFF;
    --text-color: #333333;
    --textt-color: #777777;
    --text-secondary-color: #777777;
    --font-main: 'ZCOOL KuaiLe', cursive;
    --status-normal-bg: rgba(45,211,111,0.1);
    --status-normal-text: #28a745;
    --status-error-bg: rgba(235,68,90,0.1);
    --status-error-text: #dc3545;
    --status-maintenance-bg: rgba(255,196,9,0.15);
    --status-maintenance-text: #ffc107;
    --shadow-color: rgba(0,0,0,0.08);
    --alert-warning-bg: rgba(255,193,7,0.1);
    --alert-warning-text: #ffc107;
}

/* 基础样式 */
html, body {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    height: auto !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    padding-top: 0;
}

/* 安全警告 */
.security-warning {
    background-color: #dc3545;
    color: white;
    padding: 15px;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    font-size: 1.1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.body-wrapper {
    overflow-x: hidden;
}

/* 顶部导航栏 - 已修改为居中布局 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center; /* 修改为居中 */
    align-items: center;
    padding: 15px 5%;
    background-color: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 1000;
    transition: top 0.3s ease;
}

.top-nav.with-warning {
    top: 54px;
}

/* 汉堡菜单按钮 - 固定在左侧 */
.hamburger-btn {
    position: absolute;
    left: 20px;
    background: none;
    border: none;
    width: 30px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    padding: 0;
    pointer-events: auto;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background: linear-gradient(45deg, var(--primary-color), var(--query-color));
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-btn:hover span {
    background: linear-gradient(45deg, var(--query-color), var(--primary-color));
}

/* 导航品牌 - 确保居中 */
.nav-brand {
    font-family: var(--font-main);
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--textt-color);
    text-decoration: none;
    letter-spacing: 1px;
    margin: 0 auto; /* 确保居中 */
}

.nav-links {
    display: none; /* 隐藏原有导航链接 */
}

/* 侧边栏 - 已缩小宽度 */
.sidebar {
    position: fixed;
    top: 0;
    left: -250px; /* 缩小宽度 */
    width: 250px; /* 从280px缩小到250px */
    height: 100%;
    background: rgba(255,255,255,0.95);
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

.sidebar-open .sidebar {
    left: 0;
}

.sidebar-header {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.close-sidebar-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #777;
    transition: color 0.3s;
    pointer-events: auto;
}

.close-sidebar-btn:hover {
    color: #333;
}

.sidebar-content {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-btn {
    display: block;
    width: 100%;
    padding: 12px 15px; /* 减小padding以适应更窄的侧边栏 */
    margin-bottom: 10px;
    border-radius: 6px;
    background: linear-gradient(45deg, #FFDAB9, #D8BFD8);
    color: white;
    font-family: 'ZCOOL KuaiLe', cursive;
    font-size: 1rem; /* 减小字体大小 */
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    pointer-events: auto;
}

.sidebar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,218,185,0.4);
}

/* 主要内容容器 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 50px 20px;
    transform: rotate(-0.5deg);
}

.header {
    text-align: center;
    margin-bottom: 50px;
    transform: skewX(-5deg);
}

.header h1 {
    font-family: var(--font-main);
    font-size: 4.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 0px rgba(255,255,255,0.8), 4px 4px 0px var(--shadow-color);
    letter-spacing: 5px;
}

.header p {
    font-family: var(--font-main);
    font-size: 1.5rem;
    color: var(--text-secondary-color);
    margin-top: 10px;
    letter-spacing: 2px;
}

/* 控制区域 */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
}

.search-container {
    flex-grow: 1;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 18px 30px 18px 60px;
    background-color: var(--surface-color);
    border: 1px solid #eee;
    border-radius: 50px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--shadow-color);
    font-family: var(--font-main);
    letter-spacing: 1px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 5px 25px rgba(255,218,185,0.5);
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 25px;
    transform: translateY(-50%);
    color: var(--text-secondary-color);
    font-size: 1.2rem;
    opacity: 0.6;
}

/* API网格布局 */
.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    perspective: 1500px;
}

.api-card {
    background-color: var(--surface-color);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 1px solid #f0f0f0;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
}

.api-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(255,218,185,0.3), transparent 30%);
    animation: rotate 8s linear infinite;
    opacity: 0;
    transition: opacity 0.5s;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.api-card:hover {
    transform: rotateY(3deg) rotateX(3deg) scale(1.05) translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.api-card:hover::before {
    opacity: 1;
}

.card-content {
    transform-style: preserve-3d;
    transform: translateZ(20px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.card-header h3 {
    font-family: var(--font-main);
    font-size: 1.8rem;
    color: var(--text-color);
    margin-right: 15px;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-normal {
    background-color: var(--status-normal-bg);
    color: var(--status-normal-text);
}

.status-error {
    background-color: var(--status-error-bg);
    color: var(--status-error-text);
}

.status-maintenance {
    background-color: var(--status-maintenance-bg);
    color: var(--status-maintenance-text);
}

.card-body p {
    color: var(--text-secondary-color);
    font-size: 0.95rem;
    line-height: 1.6;
    min-height: 55px;
}

.card-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary-color);
}

.info-item {
    display: flex;
    align-items: center;
}

.info-item svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    opacity: 0.5;
}

/* 页脚 */
.footer-text {
    text-align: center;
    margin-top: 60px;
    padding-bottom: 20px;
    color: #aaa;
    font-family: var(--font-main);
    letter-spacing: 1px;
    font-size: 1rem;
    transform: skewX(-5deg);
}

.hidden {
    display: none !important;
}

/* 警告提示 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid transparent;
    animation: fadeInDown 0.5s;
}

.alert-success {
    background-color: rgba(40,167,69,0.1);
    border-color: rgba(40,167,69,0.2);
    color: #155724;
}

.alert-danger {
    background-color: rgba(220,53,69,0.1);
    border-color: rgba(220,53,69,0.2);
    color: #721c24;
}

.alert-warning {
    background-color: var(--alert-warning-bg);
    border-color: rgba(255,193,7,0.2);
    color: var(--alert-warning-text);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--surface-color);
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    transform: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-family: var(--font-main);
    font-size: 1.8rem;
}

.close-btn {
    font-size: 2rem;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-secondary-color);
}

.close-btn:hover {
    color: var(--text-color);
}

/* 表单组 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 1.1rem;
    font-family: var(--font-main);
    letter-spacing: 1px;
}

.loading-spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-right: 5px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 标签页 */
.tab-container {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 1.1rem;
    color: var(--text-secondary-color);
    position: relative;
}

.tab-btn.active {
    color: var(--text-color);
    font-weight: bold;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--query-color));
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 音乐播放器 */
#xf-music-player {
    position: fixed;
    left: -220px;
    bottom: 20px;
    width: 220px;
    background: rgba(255,255,255,0.9);
    z-index: 999;
    border-radius: 0 15px 15px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: left 0.3s ease-out;
    padding: 15px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,218,185,0.3);
    pointer-events: none;
}

#music-trigger {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 60px;
    background: linear-gradient(45deg, #FFDAB9, #D8BFD8);
    border-radius: 0 5px 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    pointer-events: auto;
}

#trigger-icon {
    width: 10px;
    height: 10px;
    transform: rotate(180deg);
    transition: transform 0.3s;
}

.player-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.song-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#music-cover {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255,218,185,0.5);
}

#music-name {
    font-size: 14px;
    color: #1E90FF;
    font-weight: 500;
    font-family: 'ZCOOL KuaiLe', cursive;
}

#artist-name {
    font-size: 12px;
    color: #D8BFD8;
}

.player-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

#next-btn, #prev-btn {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    pointer-events: auto;
}

#play-toggle {
    background: linear-gradient(45deg, #FFDAB9, #D8BFD8);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(216,191,216,0.3);
    pointer-events: auto;
}

#play-icon, #pause-icon {
    width: 18px;
    height: 18px;
}

#pause-icon {
    display: none;
}

.progress-container {
    margin-top: 10px;
}

.time-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

#current-time, #duration {
    font-size: 11px;
    color: #777;
}

.progress-bar-bg {
    height: 3px;
    background: rgba(216,191,216,0.2);
    border-radius: 2px;
    pointer-events: auto;
}

#progress-bar {
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, #FFDAB9, #D8BFD8);
    border-radius: 2px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 3rem;
    }
    
    .header p {
        font-size: 1.2rem;
    }
    
    .api-grid {
        grid-template-columns: 1fr;
    }
    
    .top-nav {
        padding: 15px;
    }
    
    .nav-brand {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 100px 15px 30px 15px;
    }
    
    /* 移动端侧边栏更窄 */
    .sidebar {
        width: 220px;
        left: -220px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2.2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .search-input {
        padding: 15px 15px 15px 45px;
    }
    
    .search-icon {
        left: 15px;
    }
    
    .tab-btn {
        font-size: 1rem;
        padding: 10px;
    }
    
    /* 移动端侧边栏更窄 */
    .sidebar {
        width: 200px;
        left: -200px;
    }
}
