/* 404页面样式 */
.error-container {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 200px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    padding: 2rem 1.5rem;
    padding-bottom: 3rem;
}

.error-content {
    text-align: center;
    z-index: 2;
    animation: fadeInScale 0.8s ease-out;
    max-width: 800px;
    width: 100%;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 404数字动画 */
.error-number {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    font-size: 6rem;
    font-weight: bold;
    line-height: 1;
    align-items: center;
}

.number {
    display: inline-block;
    color: var(--text-primary);
    animation: numberBounce 1s ease-out;
    position: relative;
}

.number:nth-child(1) {
    animation-delay: 0.1s;
}

.number:nth-child(2) {
    animation-delay: 0.2s;
}

.number:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes numberBounce {
    0% {
        transform: translateY(-100px) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: translateY(20px) rotate(10deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
}

/* 浮动图标 */
.error-animation {
    position: relative;
    height: 120px;
    margin: 1.5rem 0;
}

.floating-icon {
    position: absolute;
    font-size: 3rem;
    color: var(--text-secondary);
    opacity: 0.3;
    animation: floatAround 8s ease-in-out infinite;
}

.floating-icon:nth-child(1) {
    top: 0;
    left: 10%;
    animation-delay: 0s;
}

.floating-icon:nth-child(2) {
    top: 20%;
    right: 15%;
    animation-delay: 1s;
}

.floating-icon:nth-child(3) {
    bottom: 10%;
    left: 20%;
    animation-delay: 2s;
}

.floating-icon:nth-child(4) {
    bottom: 0;
    right: 10%;
    animation-delay: 3s;
}

@keyframes floatAround {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(30px, -30px) rotate(90deg);
    }
    50% {
        transform: translate(-20px, -50px) rotate(180deg);
    }
    75% {
        transform: translate(-30px, 20px) rotate(270deg);
    }
}

/* 标题和消息 */
.error-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
    color: var(--text-primary);
    animation: slideInLeft 0.8s ease-out 0.3s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.error-message {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
    animation: slideInRight 0.8s ease-out 0.5s both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 按钮 - 毛玻璃效果 */
.error-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.7s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-btn,
.fun-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow);
}

.home-btn {
    background: var(--text-primary);
    color: var(--white);
}

.home-btn:hover {
    background: var(--text-secondary);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

.home-btn:active {
    transform: translateY(-1px);
}

.fun-btn {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px var(--shadow),
                0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.fun-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--text-secondary);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow-hover),
                0 0 0 1px rgba(255, 255, 255, 0.6) inset,
                0 0 20px rgba(255, 255, 255, 0.2);
}

.fun-btn:active {
    transform: translateY(-1px);
}

.fun-btn.magic-active {
    animation: magicPulse 0.5s ease;
}

@keyframes magicPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 30px var(--text-secondary);
    }
}

/* 趣味知识 - 毛玻璃效果 */
.error-fun-facts {
    margin-top: 1.5rem;
    animation: fadeIn 1s ease-out 0.9s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fun-fact {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow),
                0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .fun-fact {
    background: rgba(42, 42, 42, 0.7);
    box-shadow: 0 4px 20px var(--shadow),
                0 0 0 1px rgba(64, 64, 64, 0.5) inset;
}

.fun-fact:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-hover),
                0 0 0 1px rgba(255, 255, 255, 0.6) inset,
                0 0 20px rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .fun-fact:hover {
    background: rgba(42, 42, 42, 0.85);
    box-shadow: 0 8px 30px var(--shadow-hover),
                0 0 0 1px rgba(64, 64, 64, 0.6) inset,
                0 0 20px rgba(255, 255, 255, 0.05);
}

.fun-fact i {
    font-size: 2rem;
    color: var(--text-secondary);
    animation: iconSpin 3s linear infinite;
}

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

.fun-fact p {
    text-align: left;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 粒子效果 */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 50%;
    opacity: 0.2;
    animation: particleFloat 15s infinite ease-in-out;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
    animation-duration: 15s;
}

.particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
    animation-duration: 18s;
}

.particle:nth-child(4) {
    left: 40%;
    animation-delay: 1s;
    animation-duration: 14s;
}

.particle:nth-child(5) {
    left: 50%;
    animation-delay: 3s;
    animation-duration: 16s;
}

.particle:nth-child(6) {
    left: 60%;
    animation-delay: 5s;
    animation-duration: 13s;
}

.particle:nth-child(7) {
    left: 70%;
    animation-delay: 2.5s;
    animation-duration: 17s;
}

.particle:nth-child(8) {
    left: 80%;
    animation-delay: 4.5s;
    animation-duration: 15s;
}

.particle:nth-child(9) {
    left: 90%;
    animation-delay: 1.5s;
    animation-duration: 14s;
}

.particle:nth-child(10) {
    left: 95%;
    animation-delay: 3.5s;
    animation-duration: 16s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.2;
    }
    90% {
        opacity: 0.2;
    }
    100% {
        transform: translateY(-100px) translateX(50px) scale(1);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .error-container {
        padding: 1.5rem 1rem;
        padding-bottom: 2rem;
    }
    
    .error-number {
        font-size: 4rem;
        gap: 0.5rem;
        margin-bottom: 1rem;
        margin-top: 0.5rem;
    }
    
    .error-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .error-message {
        font-size: 0.9rem;
        padding: 0 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .home-btn,
    .fun-btn {
        width: 85%;
        justify-content: center;
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .error-animation {
        height: 100px;
        margin: 1rem 0;
    }
    
    .floating-icon {
        font-size: 2rem;
    }
    
    .fun-fact {
        padding: 1rem;
        gap: 0.5rem;
        flex-direction: column;
        text-align: center;
    }
    
    .fun-fact i {
        font-size: 1.5rem;
    }
    
    .fun-fact p {
        text-align: center;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .error-container {
        padding: 1rem 0.75rem;
        padding-bottom: 1.5rem;
    }
    
    .error-number {
        font-size: 3rem;
        gap: 0.25rem;
    }
    
    .error-title {
        font-size: 1.25rem;
    }
    
    .error-message {
        font-size: 0.85rem;
    }
    
    .home-btn,
    .fun-btn {
        width: 90%;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .error-animation {
        height: 80px;
    }
    
    .floating-icon {
        font-size: 1.5rem;
    }
}


