/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Floating background elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.element-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.element-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.element-3 {
    width: 60px;
    height: 60px;
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
}

.element-4 {
    width: 100px;
    height: 100px;
    top: 80%;
    right: 30%;
    animation-delay: 1s;
}

.element-5 {
    width: 40px;
    height: 40px;
    top: 40%;
    left: 60%;
    animation-delay: 3s;
}

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

/* Navigation */
.navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-brand i {
    font-size: 2rem;
    color: #ffd700;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #ffd700;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffd700;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Main error container */
.error-container {
    text-align: center;
    z-index: 10;
    max-width: 800px;
    width: 100%;
}

/* Error code */
.error-code {
    font-size: 12rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.digit {
    display: inline-block;
    animation: bounceIn 1s ease-out;
    transform-origin: center bottom;
}

.digit-1 { animation-delay: 0.1s; }
.digit-2 { animation-delay: 0.2s; }
.digit-3 { animation-delay: 0.3s; }

@keyframes bounceIn {
    0% {
        transform: scale(0.3) translateY(-100px);
        opacity: 0;
    }
    50% {
        transform: scale(1.05) translateY(10px);
    }
    70% {
        transform: scale(0.9) translateY(-5px);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Error message */
.error-message {
    margin-bottom: 40px;
}

.error-message h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 15px;
    font-weight: 600;
}

.error-message p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Astronaut illustration */
.error-illustration {
    margin-bottom: 40px;
    height: 200px;
    position: relative;
}

.astronaut {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    animation: astronaut-float 4s ease-in-out infinite;
}

@keyframes astronaut-float {
    0%, 100% {
        transform: translateY(0px) rotate(5deg);
    }
    50% {
        transform: translateY(-15px) rotate(-5deg);
    }
}

.astronaut-body {
    position: relative;
    width: 100%;
    height: 100%;
}

.helmet {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    border: 3px solid #333;
}

.body-suit {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 60px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
}

.arms {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
}

.legs {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
}

.floating-objects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.object {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffd700;
    border-radius: 50%;
    animation: object-float 3s ease-in-out infinite;
}

.obj-1 {
    top: 20px;
    left: 20px;
    animation-delay: 0s;
}

.obj-2 {
    top: 40px;
    right: 30px;
    animation-delay: 1s;
}

.obj-3 {
    bottom: 30px;
    left: 40px;
    animation-delay: 2s;
}

@keyframes object-float {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-10px) scale(1.2);
        opacity: 1;
    }
}

/* Action buttons */
.action-buttons {
    margin-bottom: 40px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Search section */
.search-section {
    margin-bottom: 40px;
}

.search-box {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: white;
    font-size: 1rem;
    outline: none;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-btn {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    font-size: 1.2rem;
}

.search-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

/* Responsive design */
@media (max-width: 768px) {
    .navigation {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .error-code {
        font-size: 8rem;
        gap: 5px;
    }
    
    .error-message h1 {
        font-size: 2rem;
    }
    
    .error-message p {
        font-size: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .search-box {
        max-width: 300px;
    }
    
    .astronaut {
        width: 100px;
        height: 100px;
    }
    
    .helmet {
        width: 50px;
        height: 50px;
    }
    
    .body-suit {
        width: 35px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .error-code {
        font-size: 6rem;
    }
    
    .error-message h1 {
        font-size: 1.5rem;
    }
    
    .navigation {
        padding: 10px 15px;
    }
    
    .nav-brand {
        font-size: 1.2rem;
    }
    
    .nav-brand i {
        font-size: 1.5rem;
    }
}

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

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.btn:focus,
.search-box input:focus,
.search-btn:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* Loading animation for buttons */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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