/* css/index.css - 首页特有样式 */

/* Body 布局 */
body {
    background: linear-gradient(135deg, #f0f7ff 0%, #e3eaf5 100%);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 20px 20px 20px;
    padding-left: max(20px, env(safe-area-inset-left, 20px));
    padding-right: max(20px, env(safe-area-inset-right, 20px));
}

/* 核心卡片容器 */
.portal-card {
    width: 100%;
    max-width: 420px;
    padding: 30px;
    text-align: center;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 布局包裹层 */
.main-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

/* 左侧区域 */
.card-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 20;
}

/* 导航区域 */
.nav-container {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
    width: 100%;
}

/* 底部区域 */
.footer-area {
    margin-top: 30px;
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(255, 248, 240, 0.6);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255, 240, 220, 0.7);
    text-align: left;
    width: 100%;
}

.disclaimer {
    font-size: 0.7rem;
    color: #b8a89a;
    line-height: 1.4;
    margin-bottom: 8px;
}

.copyright {
    font-size: 0.75rem;
    color: #c4a882;
    font-weight: 600;
}

/* Header */
.header {
    margin-top: 10px;
    margin-bottom: 25px;
}

.brand-logo-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(92, 107, 192, 0.25);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    cursor: pointer;
}

.brand-logo-container:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 35px rgba(92, 107, 192, 0.4);
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.logo {
    font-size: 2.2rem;
    font-weight: 800;
    color: #5c6bc0;
    letter-spacing: -1.5px;
    line-height: 1;
    animation: logoBreath 6s ease-in-out infinite;
}

.logo span {
    color: #9fa8da;
}

.slogan {
    font-size: 0.9rem;
    color: #777;
    margin-top: 8px;
    min-height: 1.2em;
    font-weight: 500;
}

/* 搜索框 */
.search-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 5px;
    overflow: visible;
}

.search-input {
    width: 100%;
    padding: 14px 15px;
    padding-left: 45px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    font-size: 0.95rem;
    color: #555;
    outline: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: box-shadow, border-color, background;
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(92, 107, 192, 0.1);
    border-color: #5c6bc0;
}

/* 搜索框聚焦光环 */
.search-wrapper::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: conic-gradient(from 0deg, transparent 0%, rgba(92, 107, 192, 0.15) 20%, transparent 40%);
    opacity: 0;
    pointer-events: none;
    z-index: -1;
    filter: blur(6px);
    transition: opacity 0.4s ease;
}

.search-wrapper:focus-within::after {
    opacity: 1;
    animation: searchAura 3s linear infinite;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    font-weight: 900;
    color: #5c6bc0;
    font-family: serif;
}

/* 导航项 */
.nav-item {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 20px 25px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.nav-item:hover::before {
    transform: translate3d(350%, 0, 0);
}

.nav-item:last-child {
    border-bottom: none;
}

.nav-item:hover {
    background: rgba(92, 107, 192, 0.05);
}

.nav-item-disabled {
    cursor: not-allowed;
    opacity: 0.55;
    pointer-events: none;
}

.nav-item-disabled .info h3::after {
    content: '敬请期待';
    display: inline-block;
    margin-left: 8px;
    font-size: 0.6rem;
    font-weight: 600;
    color: #c4a882;
    background: rgba(196, 168, 130, 0.12);
    padding: 1px 6px;
    border-radius: 6px;
    vertical-align: middle;
}

.icon-box {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    perspective: 800px;
}

.info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.info p {
    font-size: 0.8rem;
    color: #999;
}

/* 3D 图标库 */
.cube {
    width: 28px;
    height: 28px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 8s infinite linear;
}

.cube div {
    position: absolute;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(2px);
    background: linear-gradient(135deg, rgba(179, 157, 219, 0.3), rgba(144, 202, 249, 0.4));
}

.front { transform: translateZ(14px); }
.back { transform: rotateY(180deg) translateZ(14px); }
.right { transform: rotateY(90deg) translateZ(14px); }
.left { transform: rotateY(-90deg) translateZ(14px); }
.top { transform: rotateX(90deg) translateZ(14px); }
.bottom { transform: rotateX(-90deg) translateZ(14px); }

@keyframes rotateCube {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

.tetrahedron {
    width: 36px;
    height: 31px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate3D 8s infinite linear;
    transform-origin: 50% 24px;
    top: -8px;
}

.tetrahedron div {
    position: absolute;
    width: 36px;
    height: 31px;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    transform-origin: 50% 100%;
}

.face1 { background: linear-gradient(135deg, rgba(144, 202, 249, 0.5), rgba(100, 181, 246, 0.7)); transform: rotateY(0deg) translateZ(11px) rotateX(19.47deg); }
.face2 { background: linear-gradient(135deg, rgba(100, 181, 246, 0.5), rgba(66, 165, 245, 0.7)); transform: rotateY(120deg) translateZ(11px) rotateX(19.47deg); }
.face3 { background: linear-gradient(135deg, rgba(66, 165, 245, 0.5), rgba(33, 150, 243, 0.7)); transform: rotateY(240deg) translateZ(11px) rotateX(19.47deg); }
.face4 { background: linear-gradient(135deg, rgba(144, 202, 249, 0.4), rgba(100, 181, 246, 0.6)); transform: rotateY(0deg) translateZ(11px) rotateX(90deg); }

@keyframes rotate3D {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* 圣遗物图标 */
.artifact-icon {
    width: 32px;
    height: 32px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.a-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(168, 130, 255, 0.6);
    animation: pulseRing 3s ease-in-out infinite;
}

.a-ring-1 {
    width: 32px;
    height: 32px;
    animation-delay: 0s;
}

.a-ring-2 {
    width: 20px;
    height: 20px;
    animation-delay: 0.5s;
    border-color: rgba(168, 130, 255, 0.4);
}

.a-ring-3 {
    width: 10px;
    height: 10px;
    animation-delay: 1s;
    background: rgba(168, 130, 255, 0.35);
    border: none;
}

@keyframes pulseRing {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 0.4; }
}

/* ========== 首页极曜玻化深色模式适配 ========== */
[data-theme="dark"] body {
    background: radial-gradient(circle at top, #0c0c0e 0%, #030303 100%) !important;
    color: #e4e4e7 !important;
    transition: background-color 0.4s ease, color 0.4s ease;
}

[data-theme="dark"] body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 80vw;
    height: 80vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, rgba(255,255,255,0) 60%);
    z-index: 0;
    pointer-events: none;
    animation: driftOrb1 30s ease-in-out infinite alternate;
}

[data-theme="dark"] body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 70vw;
    height: 70vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.06) 0%, rgba(255,255,255,0) 60%);
    z-index: 0;
    pointer-events: none;
    animation: driftOrb2 30s ease-in-out infinite alternate;
}

@keyframes driftOrb1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

@keyframes driftOrb2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-10%, -10%) scale(1.1); }
}

[data-theme="dark"] .portal-card {
    background: rgba(20, 20, 24, 0.6) !important;
    backdrop-filter: blur(24px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(140%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .nav-container {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

[data-theme="dark"] .nav-item {
    color: #e4e4e7 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
}

[data-theme="dark"] .nav-item:hover {
    background: rgba(129, 140, 248, 0.08) !important;
}

[data-theme="dark"] .info h3 {
    color: #f4f4f5 !important;
}

[data-theme="dark"] .info p {
    color: #a1a1aa !important;
}

[data-theme="dark"] .logo {
    color: #818cf8 !important;
}

[data-theme="dark"] .logo span {
    color: #c7d2fe !important;
}

[data-theme="dark"] .slogan {
    color: #a1a1aa !important;
}

[data-theme="dark"] .search-input {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #e4e4e7 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.01) !important;
}

[data-theme="dark"] .search-input:focus {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: #818cf8 !important;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.02) !important;
    color: #fff !important;
}

[data-theme="dark"] .search-wrapper::after {
    background: conic-gradient(from 0deg, transparent 0%, rgba(129, 140, 248, 0.25) 20%, transparent 40%) !important;
}

[data-theme="dark"] .search-icon {
    color: #818cf8 !important;
}

[data-theme="dark"] .footer-area {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
}

[data-theme="dark"] .disclaimer {
    color: #71717a !important;
}

[data-theme="dark"] .copyright {
    color: #a1a1aa !important;
}

/* 首页 3D 图标在深色下的适配 */
[data-theme="dark"] .cube div {
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.2), rgba(99, 102, 241, 0.3));
}

[data-theme="dark"] .tetrahedron div {
    opacity: 0.85;
}

[data-theme="dark"] .a-ring {
    border-color: rgba(167, 139, 250, 0.6);
}
[data-theme="dark"] .a-ring-2 {
    border-color: rgba(167, 139, 250, 0.35);
}
[data-theme="dark"] .a-ring-3 {
    background: rgba(167, 139, 250, 0.3);
}

[data-theme="dark"] .search-results {
    background: rgba(24, 24, 27, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}

