/* 404 Page Styles */
.error-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0e1a 0%, #141a2d 100%);
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
}

/* Floating 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%;
    filter: blur(60px);
    opacity: 0.4;
    animation: float 20s infinite linear;
}

.element-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle at center, rgba(124, 92, 255, 0.3) 0%, transparent 70%);
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.element-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at center, rgba(1, 209, 251, 0.3) 0%, transparent 70%);
    bottom: 15%;
    right: 10%;
    animation-delay: -5s;
    animation-direction: reverse;
}

.element-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle at center, rgba(255, 71, 87, 0.2) 0%, transparent 70%);
    top: 40%;
    left: 15%;
    animation-delay: -10s;
}

.element-4 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at center, rgba(255, 107, 129, 0.2) 0%, transparent 70%);
    bottom: 30%;
    right: 20%;
    animation-delay: -15s;
}

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

/* Error Content */
.error-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* 404 Number */
.error-number-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    perspective: 1000px;
}

.error-number {
    font-size: 180px;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 50%, #7c5cff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: numberAppear 1s ease-out forwards;
    opacity: 0;
    transform: translateY(50px) rotateX(-90deg);
    text-shadow: 0 10px 30px rgba(255, 107, 107, 0.2);
    position: relative;
}

.error-number:nth-child(1) { animation-delay: 0.2s; }
.error-number:nth-child(2) { animation-delay: 0.4s; }
.error-number:nth-child(3) { animation-delay: 0.6s; }

@keyframes numberAppear {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

/* Error Message */
.error-message-container {
    margin-bottom: 50px;
}

.error-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideUp 0.8s ease-out 0.8s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.error-description {
    font-size: 20px;
    color: #94a3b8;
    margin-bottom: 10px;
    line-height: 1.6;
    animation: slideUp 0.8s ease-out 1s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.error-suggestion {
    font-size: 16px;
    color: #64748b;
    animation: slideUp 0.8s ease-out 1.2s forwards;
    opacity: 0;
    transform: translateY(30px);
}

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

/* Search Bar */
.error-search {
    max-width: 600px;
    margin: 0 auto 50px;
    animation: slideUp 0.8s ease-out 1.4s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.search-form {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 18px 24px;
    padding-right: 70px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-input:focus {
    outline: none;
    border-color: #7c5cff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 0 0 4px rgba(124, 92, 255, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #7c5cff 0%, #01d1fb 100%);
    border: none;
    border-radius: 12px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 5px 20px rgba(124, 92, 255, 0.3);
}

/* Action Buttons */
.error-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
    animation: slideUp 0.8s ease-out 1.6s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.error-action-btn {
    padding: 18px 32px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    justify-content: center;
}

.error-action-btn svg {
    flex-shrink: 0;
}

/* Quick Links */
.quick-links {
    animation: slideUp 0.8s ease-out 1.8s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.quick-links-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 40px;
    color: white;
    text-align: center;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.link-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 32px;
    text-decoration: none;
    transition: all 0.4s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7c5cff, #01d1fb);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.link-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(124, 92, 255, 0.3);
    transform: translateY(-8px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(124, 92, 255, 0.1);
}

.link-card:hover::before {
    transform: scaleX(1);
}

.link-icon {
    width: 64px;
    height: 64px;
    background: rgba(124, 92, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.link-icon svg {
    stroke: #7c5cff;
}

.link-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: white;
}

.link-desc {
    font-size: 15px;
    color: #94a3b8;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .error-number {
        font-size: 150px;
    }
    
    .error-title {
        font-size: 40px;
    }
    
    .links-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .error-page {
        padding: 100px 0 60px;
    }
    
    .error-number-container {
        gap: 10px;
    }
    
    .error-number {
        font-size: 100px;
    }
    
    .error-title {
        font-size: 32px;
    }
    
    .error-description {
        font-size: 18px;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .error-action-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .link-card {
        padding: 24px;
    }
    
    .floating-element {
        filter: blur(40px);
    }
    
    .element-1, .element-2, .element-3, .element-4 {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .error-number {
        font-size: 80px;
    }
    
    .error-title {
        font-size: 28px;
    }
    
    .error-description {
        font-size: 16px;
    }
    
    .search-input {
        padding: 16px 20px;
        padding-right: 60px;
        font-size: 14px;
    }
    
    .search-btn {
        width: 44px;
        height: 44px;
    }
    
    .error-action-btn {
        padding: 16px 24px;
        font-size: 15px;
    }
    
    .link-card {
        padding: 20px;
    }
    
    .link-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 20px;
    }
    
    .link-title {
        font-size: 20px;
    }
}

/* Glow Effect on Hover */
@keyframes glow {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(124, 92, 255, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(124, 92, 255, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

.btn-primary:hover {
    animation: glow 2s infinite;
}

/* Footer adjustments for 404 */
.error-page + .footer {
    margin-top: 0;
    position: relative;
    z-index: 2;
}