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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(34, 211, 238, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(236, 72, 153, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    z-index: 1;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: clamp(40px, 10vh, 100px);
    padding-bottom: clamp(40px, 10vh, 100px);
}

.logo {
    font-size: clamp(3rem, 12vw, 8rem);
    font-weight: 900;
    text-transform: lowercase;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #ec4899 0%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    animation: glow 3s ease-in-out infinite alternate;
    text-align: center;
    position: relative;
}

.motd {
    font-size: clamp(1rem, 3.5vw, 1.3rem);
    color: #a0a0a0;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: none;
    background: linear-gradient(90deg, #ec4899, #22d3ee, #ec4899);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease-in-out infinite, motdGlow 3s ease-in-out infinite alternate;
    opacity: 0.85;
    display: block;
    text-align: center;
    margin-bottom: 1rem;
    white-space: normal;
}

@keyframes motdGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.3));
    }
    100% {
        filter: drop-shadow(0 0 20px rgba(34, 211, 238, 0.5));
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
    100% {
        background-position: 0% center;
    }
}

@keyframes glow {
    0% {
        filter: drop-shadow(0 0 20px rgba(236, 72, 153, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 40px rgba(34, 211, 238, 0.8));
    }
}

.subtitle {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: #a0a0a0;
    margin-bottom: 4rem;
    text-align: center;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 900px;
    padding: 0 20px;
}

.link-card {
    background: rgba(20, 20, 20, 0.6);
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 2rem;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);

    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 110px;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, #ec4899, #22d3ee);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(236, 72, 153, 0.3);
}

.link-card:nth-child(1):hover {
    box-shadow: 0 20px 40px rgba(236, 72, 153, 0.4);
}

.link-card:nth-child(2):hover {
    box-shadow: 0 20px 40px rgba(34, 211, 238, 0.4);
}

.link-card:nth-child(3):hover {
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.4);
}

.link-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ec4899, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.link-card:nth-child(2) .link-title {
    background: linear-gradient(135deg, #22d3ee, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.link-card:nth-child(3) .link-title {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.link-url {
    font-size: 0.9rem;
    color: #a0a0a0;
    font-family: 'Courier New', monospace;
}

@media (max-width: 768px) {
    .links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .link-card {
        padding: 1.5rem;
    }

    .subtitle {
        margin-bottom: 3rem;
    }
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

.footer-text {
    margin-top: 10rem;
    max-width: 800px;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.8;
    color: #888;
    min-height: 150px;
}

.word {
    opacity: 0;
    animation: wordFadeIn 0.6s ease-in-out forwards;
}

@keyframes wordFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .container {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .footer-text {
        margin-top: 4rem;
        font-size: 1rem;
        padding: 0 12px;
    }

    .motd {
        font-size: 1rem;
        margin-bottom: 0.75rem;
        padding: 0 12px;
    }

    .logo {
        margin-bottom: 1.25rem;
    }

    .links {
        padding: 0 12px;
    }
}

/* 404 Error Page Styles */
.error-code {
    font-size: clamp(5rem, 25vw, 12rem);
    font-weight: 900;
    text-transform: lowercase;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #ec4899 0%, #22d3ee 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: glitchCode 0.4s ease-in-out infinite alternate, gradientShift 3s ease-in-out infinite;
    text-align: center;
    line-height: 1;
    display: inline-block;
    width: 100%;
}

@keyframes glitchCode {
    0% {
        filter: drop-shadow(0 0 20px rgba(236, 72, 153, 0.4)) drop-shadow(0 0 10px rgba(34, 211, 238, 0.2));
        transform: skewX(0deg);
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(236, 72, 153, 0.5)) drop-shadow(0 0 20px rgba(34, 211, 238, 0.4));
    }
    100% {
        filter: drop-shadow(0 0 40px rgba(34, 211, 238, 0.6)) drop-shadow(0 0 10px rgba(236, 72, 153, 0.3));
        transform: skewX(-1deg);
    }
}

.error-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #fff;
    text-align: center;
    letter-spacing: 0.05em;
}

.error-description {
    font-size: 1.1rem;
    color: #a0a0a0;
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    line-height: 1.8;
}

.error-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    letter-spacing: 0.05em;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.btn-home {
    background: linear-gradient(135deg, #ec4899, #22d3ee);
    color: #000;
    font-weight: 700;
}

.btn-home:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(236, 72, 153, 0.4);
    filter: brightness(1.1);
}

.btn-back {
    background: rgba(20, 20, 20, 0.6);
    color: #fff;
    border: 2px solid #ec4899;
}

.btn-back:hover {
    transform: translateY(-3px);
    background: rgba(236, 72, 153, 0.1);
    box-shadow: 0 15px 30px rgba(236, 72, 153, 0.3);
}

.error-animation {
    position: relative;
    height: 200px;
    margin-bottom: 2rem;
}

.floating-object {
    position: absolute;
    font-size: 3rem;
    opacity: 0.3;
    animation: floatAround 8s ease-in-out infinite;
}

.floating-object:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.floating-object:nth-child(2) {
    right: 10%;
    top: 50px;
    animation-delay: 2s;
    animation-duration: 10s;
}

.floating-object:nth-child(3) {
    left: 50%;
    bottom: 0;
    animation-delay: 4s;
    animation-duration: 12s;
}

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

@media (max-width: 768px) {
    .error-code {
        margin-bottom: 0.5rem;
    }

    .error-actions {
        gap: 1rem;
    }

    .btn {
        padding: 0.8rem 2rem;
        font-size: 0.95rem;
    }

    .error-animation {
        height: 120px;
    }

    .floating-object {
        font-size: 2rem;
    }
}
