/*
 * api-center.css - API中心页面 + 页面切换样式
 * 路径: /static/css/api-center.css
 * 
 * 包含:
 * 1. 页面切换容器和动画 (ps- 前缀)
 * 2. 浮动导航箭头
 * 3. API中心卡片样式 (ac- 前缀)
 */

/* ==================== 页面切换容器 ==================== */
.ps-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 200vw;
    height: 100vh;
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.ps-wrapper.ps-show-api {
    transform: translateX(-100vw);
}

.ps-page {
    width: 100vw;
    height: 100vh;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.ps-page::-webkit-scrollbar {
    width: 6px;
}

.ps-page::-webkit-scrollbar-track {
    background: transparent;
}

.ps-page::-webkit-scrollbar-thumb {
    background: rgba(255, 193, 7, 0.3);
    border-radius: 3px;
}

.ps-page::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 193, 7, 0.5);
}

/* ==================== 浮动导航箭头 ==================== */
.ps-nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 100px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.12), rgba(255, 107, 0, 0.08));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 193, 7, 0.2);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ps-arrow-right {
    right: 0;
    border-radius: 20px 0 0 20px;
    border-right: none;
}

.ps-arrow-left {
    left: 0;
    border-radius: 0 20px 20px 0;
    border-left: none;
}

.ps-nav-arrow:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.22), rgba(255, 107, 0, 0.15));
    width: 56px;
    box-shadow: 0 0 30px rgba(255, 193, 7, 0.15);
}

.ps-nav-arrow svg {
    width: 24px;
    height: 24px;
    color: #ffc107;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(255, 193, 7, 0.4));
}

.ps-nav-arrow:hover svg {
    transform: scale(1.15);
}

.ps-arrow-right svg {
    animation: ps-pulse-right 1.8s ease-in-out infinite;
}

.ps-arrow-left svg {
    animation: ps-pulse-left 1.8s ease-in-out infinite;
}

@keyframes ps-pulse-right {
    0%, 100% { transform: translateX(0); opacity: 1; }
    50% { transform: translateX(5px); opacity: 0.6; }
}

@keyframes ps-pulse-left {
    0%, 100% { transform: translateX(0); opacity: 1; }
    50% { transform: translateX(-5px); opacity: 0.6; }
}

.ps-arrow-label {
    position: absolute;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 500;
    color: #ffc107;
    opacity: 0;
    transition: all 0.3s ease;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

.ps-arrow-right .ps-arrow-label { right: 54px; }
.ps-arrow-left .ps-arrow-label { left: 54px; }
.ps-nav-arrow:hover .ps-arrow-label { opacity: 1; }

/* ==================== API中心内容 ==================== */
.ac-content {
    justify-content: flex-start !important;
    padding-top: 30px !important;
}

.ac-page-title {
    text-align: center;
    margin-bottom: 50px;
}

.ac-page-title h1 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
}

/* ==================== API卡片网格 ==================== */
.ac-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.ac-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.ac-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffc107, #ff6b00);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ac-card:hover::before { transform: scaleX(1); }

.ac-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 193, 7, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 40px rgba(255, 193, 7, 0.08);
}

.ac-card-active { cursor: pointer; }

.ac-card-active:hover {
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 40px rgba(34, 197, 94, 0.1);
}

.ac-card-soon { opacity: 0.7; cursor: default; }
.ac-card-soon:hover { opacity: 0.85; transform: translateY(-4px); }

/* ==================== 卡片图标 ==================== */
.ac-card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 107, 0, 0.08));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 193, 7, 0.15);
    transition: all 0.3s ease;
}

.ac-card:hover .ac-card-icon {
    transform: scale(1.05);
    border-color: rgba(255, 193, 7, 0.3);
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.15);
}

/* ==================== 卡片文字 ==================== */
.ac-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.ac-card:hover h3 { color: #ffc107; }

.ac-card p {
    color: #888888;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 18px;
    min-height: 44px;
}

/* ==================== 状态标签 ==================== */
.ac-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.ac-status-ok {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.ac-status-dev {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.ac-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.ac-dot-green {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    animation: ac-blink-green 1.5s ease-in-out infinite;
}

.ac-dot-yellow {
    background: #ffc107;
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.5);
    animation: ac-blink-yellow 2s ease-in-out infinite;
}

@keyframes ac-blink-green {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(34, 197, 94, 0.6); }
    50% { opacity: 0.5; box-shadow: 0 0 4px rgba(34, 197, 94, 0.3); }
}

@keyframes ac-blink-yellow {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(255, 193, 7, 0.5); }
    50% { opacity: 0.4; box-shadow: 0 0 4px rgba(255, 193, 7, 0.2); }
}

/* ==================== 卡片入场动画 ==================== */
.ac-card { animation: ac-fadeIn 0.5s ease-out backwards; }
.ac-card:nth-child(1) { animation-delay: 0.05s; }
.ac-card:nth-child(2) { animation-delay: 0.1s; }
.ac-card:nth-child(3) { animation-delay: 0.15s; }
.ac-card:nth-child(4) { animation-delay: 0.2s; }
.ac-card:nth-child(5) { animation-delay: 0.25s; }
.ac-card:nth-child(6) { animation-delay: 0.3s; }
.ac-card:nth-child(7) { animation-delay: 0.35s; }
.ac-card:nth-child(8) { animation-delay: 0.4s; }
.ac-card:nth-child(9) { animation-delay: 0.45s; }

@keyframes ac-fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ac-card-soon { animation: ac-fadeIn-soon 0.5s ease-out backwards; }

@keyframes ac-fadeIn-soon {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 0.7; transform: translateY(0); }
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 900px) {
    .ac-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .ac-page-title h1 { font-size: 32px; }
}

@media (max-width: 768px) {
    .ps-nav-arrow { width: 40px; height: 80px; }
    .ps-nav-arrow svg { width: 20px; height: 20px; }
    .ps-nav-arrow:hover { width: 48px; }
    .ps-arrow-label { font-size: 11px; }
}

@media (max-width: 600px) {
    .ac-grid { grid-template-columns: 1fr; gap: 16px; padding: 0 10px; }
    .ac-page-title { margin-bottom: 30px; }
    .ac-page-title h1 { font-size: 26px; }
    .ac-card { padding: 22px; }
    .ac-card-icon { width: 48px; height: 48px; font-size: 24px; margin-bottom: 16px; }
    .ac-card h3 { font-size: 16px; }
    .ac-card p { font-size: 13px; min-height: auto; margin-bottom: 14px; }
}

@media (max-width: 480px) {
    .ps-nav-arrow { width: 36px; height: 70px; }
    .ps-nav-arrow svg { width: 18px; height: 18px; }
}