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

body {
    background: #201C28;
    display: flex;
    align-content: center;
    flex-flow: column;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 2rem;
    padding-top: 4rem;
}

.container {
    display: flex;
    align-self: center;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    width: 100%;
}

img {
    animation: flipInX 0.8s ease-out;
    width: 25rem;
    height: 8rem;
    margin-bottom: 1rem;
}

a {
    color: #111217;
    font-size: 2rem;
    font-weight: 800;
    line-height: 60px;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border: 10px solid #201C28;
    border-radius: 16px;
    background: linear-gradient(to right, #648EB5, #FFF5C4);
    padding: 1rem 2rem;
    width: 100%;
    text-decoration: none;
    align-self: center;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

a:hover {
    background: linear-gradient(to right, #A2E2FB, #F7F1F3);
    cursor: pointer;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

a:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.menu {
    margin: 2rem 0 0.5rem 0;
    animation: fadeIn 0.8s ease-out 0.3s both;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    gap: 0.5rem;
}

#errorText {
    display: none;
    color: #DE1A1A;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    text-align: center;
    text-shadow: 0 0 20px rgba(222, 26, 26, 0.5), 0 0 40px rgba(222, 26, 26, 0.3);
    margin-top: 0;
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(222, 26, 26, 0.1);
    border: 2px solid rgba(222, 26, 26, 0.3);
    animation: fadeInError 0.5s ease-out;
    line-height: 1.4;
}

@keyframes fadeInError {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@-webkit-keyframes flipInX {
    from {
        -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
        transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
        -webkit-animation-timing-function: ease-in;
        animation-timing-function: ease-in;
        opacity: 0;
    }
    40% {
        -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
        transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
        -webkit-animation-timing-function: ease-in;
        animation-timing-function: ease-in;
    }
    60% {
        -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
        transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
        opacity: 1;
    }
    80% {
        -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
        transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
    }
    to {
        -webkit-transform: perspective(400px);
        transform: perspective(400px);
    }
}

@keyframes flipInX {
    from {
        -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
        transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
        -webkit-animation-timing-function: ease-in;
        animation-timing-function: ease-in;
        opacity: 0;
    }
    40% {
        -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
        transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
        -webkit-animation-timing-function: ease-in;
        animation-timing-function: ease-in;
    }
    60% {
        -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
        transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
        opacity: 1;
    }
    80% {
        -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
        transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
    }
    to {
        -webkit-transform: perspective(400px);
        transform: perspective(400px);
    }
}

.flipInX {
    -webkit-backface-visibility: visible !important;
    backface-visibility: visible !important;
    -webkit-animation-name: flipInX;
    animation-name: flipInX;
}

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

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

.fadeIn {
    -webkit-animation-name: fadeIn;
    animation-name: fadeIn;
    -webkit-animation-duration: 0.8s;
    animation-duration: 0.8s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    img {
        width: 20rem;
        height: 6.4rem;
    }
    
    a {
        font-size: 1.5rem;
        padding: 0.8rem 1.5rem;
        line-height: 50px;
    }
    
    #errorText {
        font-size: 1.5rem;
        padding: 1rem;
    }
    
    .container {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    img {
        width: 15rem;
        height: 4.8rem;
    }
    
    a {
        font-size: 1.2rem;
        padding: 0.7rem 1rem;
        line-height: 40px;
    }
    
    #errorText {
        font-size: 1.2rem;
    }
}

@-webkit-keyframes fadeInDown {
    from {
        opacity: 0;
        -webkit-transform: translate3d(0, -100%, 0);
        transform: translate3d(0, -100%, 0);
    }
    to {
        opacity: 1;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -100%, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}
