@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;700;900&display=swap');

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.15),
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(100%);
    }
}

.container {
    max-width: 900px;
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.content {
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 故障艺术标题 */
.glitch {
    font-size: 6rem;
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    color: #fbbf24;
    letter-spacing: 0.1em;
    animation: glitch 1s infinite;
    margin-bottom: 2rem;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ec4899;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #8b5cf6;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 3s infinite linear alternate-reverse;
}

@keyframes glitch {

    0%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 31px, 0);
    }

    20% {
        clip: rect(70px, 9999px, 71px, 0);
    }

    40% {
        clip: rect(30px, 9999px, 130px, 0);
    }

    60% {
        clip: rect(90px, 9999px, 140px, 0);
    }

    80% {
        clip: rect(60px, 9999px, 85px, 0);
    }

    100% {
        clip: rect(40px, 9999px, 100px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0);
    }

    20% {
        clip: rect(40px, 9999px, 80px, 0);
    }

    40% {
        clip: rect(10px, 9999px, 40px, 0);
    }

    60% {
        clip: rect(80px, 9999px, 120px, 0);
    }

    80% {
        clip: rect(20px, 9999px, 60px, 0);
    }

    100% {
        clip: rect(50px, 9999px, 90px, 0);
    }
}

/* 404错误码 */
.error-code {
    font-size: 10rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.1);
    line-height: 1;
    margin-bottom: 2rem;
    text-shadow: 0 0 30px rgba(236, 72, 153, 0.5);
}

/* 消息文本 */
.message {
    margin-bottom: 3rem;
}

.main-text {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ec4899;
}

.sub-text {
    font-size: 1.5rem;
    opacity: 0.7;
    font-style: italic;
}

/* 成员剪影 */
.silhouette {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
    opacity: 0.3;
}

.member {
    width: 40px;
    height: 120px;
    background: linear-gradient(to bottom, transparent, #fbbf24, transparent);
    border-radius: 20px;
    animation: fadeOut 3s ease-in-out infinite;
}

.member:nth-child(1) {
    animation-delay: 0s;
}

.member:nth-child(2) {
    animation-delay: 0.3s;
}

.member:nth-child(3) {
    animation-delay: 0.6s;
}

.member:nth-child(4) {
    animation-delay: 0.9s;
}

.member:nth-child(5) {
    animation-delay: 1.2s;
}

@keyframes fadeOut {

    0%,
    100% {
        opacity: 0.5;
        transform: scaleY(1);
    }

    50% {
        opacity: 0.1;
        transform: scaleY(0.8);
    }
}

/* 按钮 */
.buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.btn {
    padding: 15px 40px;
    border: 2px solid #fbbf24;
    background: transparent;
    color: #fbbf24;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: #fbbf24;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    color: #0a0a0a;
}

.btn-ave {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.btn-ave::before {
    background: #8b5cf6;
}

.btn-ave:hover {
    color: #fff;
}

/* 响应式 */
@media (max-width: 768px) {
    .glitch {
        font-size: 3rem;
    }

    .error-code {
        font-size: 6rem;
    }

    .main-text {
        font-size: 1.8rem;
    }

    .sub-text {
        font-size: 1.2rem;
    }

    .buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }
}