/* 404 Error Page CSS for Omkar Kumar Sharma's Portfolio
   Created: July 10, 2025
   Civil Engineering-themed 404 page with construction animations
*/

/* Main Error Section Styling */
.error-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow: hidden;
    will-change: transform;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Particle Background */
.error-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
    z-index: 0;
    background-image: 
        radial-gradient(#2c5aa0 1px, transparent 1px),
        radial-gradient(#34495e 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    animation: particleFloat 60s linear infinite;
    will-change: background-position;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

@keyframes particleFloat {
    0% {
        background-position: 0 0, 25px 25px;
    }
    100% {
        background-position: 1000px 500px, 1025px 525px;
    }
}

/* Error Content */
.error-content {
    position: relative;
    z-index: 10;
    padding: 3rem;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-width: 1000px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
    transform: translate3d(0, 0, 0);
}

.error-content:hover {
    transform: translate3d(0, -5px, 0);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
}

/* 404 Number Styling */
.error-number-wrapper {
    position: relative;
    margin-bottom: 2rem;
    display: inline-block;
}

.error-number {
    font-size: 12rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #2c5aa0, #3498db);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 5px 5px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    letter-spacing: -5px;
    margin-bottom: 2rem;
    animation: pulse 3s ease-in-out infinite;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.error-number:hover {
    transform: translate3d(0, -3px, 0) scale(1.02);
    text-shadow: 8px 8px 0 rgba(0, 0, 0, 0.15);
}

@keyframes pulse {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(0, 0, 0) scale(1.05);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

/* Blueprint Effect */
.error-blueprint {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0.2;
    pointer-events: none;
    overflow: hidden;
}

.blueprint-lines {
    position: absolute;
    width: 120%;
    height: 120%;
    top: -10%;
    left: -10%;
    background-image: 
        linear-gradient(0deg, #2c5aa0 1px, transparent 1px),
        linear-gradient(90deg, #2c5aa0 1px, transparent 1px);
    background-size: 20px 20px;
    animation: rotateBlueprint 30s linear infinite;
}

.blueprint-circle {
    position: absolute;
    width: 300px;
    height: 300px;
    border: 2px dashed #2c5aa0;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.blueprint-grid {
    position: absolute;
    width: 400px;
    height: 200px;
    border: 2px dashed #2c5aa0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes rotateBlueprint {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Error Text Styling */
.error-title {
    font-size: 3.5rem;
    color: #34495e;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: titleGlow 2s ease-in-out infinite alternate;
    will-change: text-shadow;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.error-title:hover {
    transform: translate3d(0, -2px, 0);
    text-shadow: 2px 2px 25px rgba(44, 90, 160, 0.4);
}

.error-description {
    font-size: 1.25rem;
    color: #5d6d7e;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    transition: all 0.3s ease;
}

.error-description:hover {
    color: #34495e;
}

@keyframes titleGlow {
    from { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); }
    to { text-shadow: 2px 2px 20px rgba(44, 90, 160, 0.3); }
}

/* Construction Animation Scene */
.error-animation {
    height: 180px;
    margin: 2rem auto;
    position: relative;
    max-width: 500px;
}

.construction-scene {
    position: relative;
    height: 100%;
    width: 100%;
}

/* Crane Animation */
.crane {
    position: absolute;
    right: 30%;
    bottom: 0;
    height: 150px;
    width: 120px;
}

.crane-arm {
    position: absolute;
    top: 20px;
    left: 50%;
    width: 150px;
    height: 10px;
    background-color: #e74c3c;
    transform-origin: left center;
    transform: rotate(-10deg);
    animation: craneArm 8s ease-in-out infinite;
}

.crane-weight {
    position: absolute;
    top: 10px;
    right: -20px;
    width: 30px;
    height: 30px;
    background-color: #7f8c8d;
    border-radius: 5px;
    animation: craneWeight 8s ease-in-out infinite;
}

.crane-cabin {
    position: absolute;
    bottom: 10px;
    left: 40%;
    width: 40px;
    height: 50px;
    background-color: #f39c12;
    border-radius: 5px 5px 0 0;
}

.crane-cable {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 2px;
    height: 80px;
    background-color: #7f8c8d;
    animation: craneCable 8s ease-in-out infinite;
}

@keyframes craneArm {
    0%, 100% {
        transform: rotate(-10deg) translate3d(0, 0, 0);
    }
    50% {
        transform: rotate(10deg) translate3d(0, 0, 0);
    }
}

@keyframes craneWeight {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -20px, 0);
    }
}

@keyframes craneCable {
    0%, 100% {
        height: 80px;
        top: 20px;
        transform: translate3d(0, 0, 0);
    }
    50% {
        height: 100px;
        top: 0;
        transform: translate3d(0, 0, 0);
    }
}

/* Hard Hat Animation */
.hard-hat {
    position: absolute;
    left: 25%;
    bottom: 30px;
    font-size: 3rem;
    color: #f39c12;
    animation: bounce 2s ease infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -20px, 0);
    }
}

/* Blueprint Roll Animation */
.blueprint-roll {
    position: absolute;
    left: 55%;
    bottom: 10px;
    width: 40px;
    height: 40px;
    background-color: #3498db;
    border-radius: 20px;
    overflow: hidden;
    transform: rotate(-30deg);
}

.blueprint-paper {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100px;
    background-color: #ecf0f1;
    animation: unroll 6s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes unroll {
    0%, 100% {
        transform: rotate(0deg) translateX(-50%);
    }
    50% {
        transform: rotate(360deg) translateX(-50%);
    }
}

/* Action Buttons */
.error-actions {
    margin: 2rem 0;
}

.error-actions .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    will-change: transform, box-shadow;
    transform: translate3d(0, 0, 0);
    position: relative;
    overflow: hidden;
}

.error-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.error-actions .btn:hover::before {
    left: 100%;
}

.error-actions .btn:hover {
    transform: translate3d(0, -5px, 0);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.error-actions .btn-primary {
    background: linear-gradient(135deg, #2c5aa0, #3498db);
    border: none;
}

.error-actions .btn-outline-primary {
    color: #2c5aa0;
    border-color: #2c5aa0;
}

.error-actions .btn-outline-primary:hover {
    background-color: #2c5aa0;
    color: white;
}

/* Suggestions Section */
.error-suggestions {
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.suggestion-title {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.suggestion-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.suggestion-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #34495e;
    transition: all 0.3s ease;
    width: 200px;
    padding: 1.5rem;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(236, 240, 241, 0.7), rgba(255, 255, 255, 0.9));
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.suggestion-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(44, 90, 160, 0.1), transparent);
    transition: left 0.5s;
}

.suggestion-link:hover::before {
    left: 100%;
}

.suggestion-link:hover {
    transform: translateY(-10px) scale(1.05);
    color: #2c5aa0;
    background: linear-gradient(135deg, rgba(44, 90, 160, 0.1), rgba(255, 255, 255, 1));
    border-color: #2c5aa0;
    box-shadow: 0 15px 40px rgba(44, 90, 160, 0.2);
}

.suggestion-link i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.suggestion-link:hover i {
    transform: scale(1.2) rotate(10deg);
}

.suggestion-link span {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.suggestion-link small {
    font-size: 0.75rem;
    color: #7f8c8d;
    text-align: center;
}

/* Fun Statistics Section */
.error-stats {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 2rem;
    border: 2px dashed #2c5aa0;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: #2c5aa0;
    line-height: 1;
    animation: numberCount 2s ease-out;
}

.stat-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
}

@keyframes numberCount {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

/* Funny Quotes Section */
.funny-quotes {
    margin: 2rem 0;
}

.quote-bubble {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    padding: 1.5rem;
    border-left: 5px solid #2c5aa0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 1rem auto;
    max-width: 600px;
    position: relative;
    animation: quoteFloat 4s ease-in-out infinite;
}

.quote-bubble::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid #f8f9fa;
}

.quote-text {
    font-size: 1.2rem;
    color: #34495e;
    font-style: italic;
    display: block;
    margin-bottom: 0.5rem;
}

.quote-author {
    color: #7f8c8d;
    font-weight: 500;
}

@keyframes quoteFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Worker Speech Bubble */
.worker-speech {
    position: absolute;
    top: -50px;
    right: 10%;
    z-index: 10;
}

.speech-bubble {
    background: #fff;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
    color: #34495e;
    position: relative;
    animation: speechBounce 3s ease-in-out infinite;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid #fff;
}

@keyframes speechBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Floating Tools Animation */
.floating-tools {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.floating-tools i {
    position: absolute;
    font-size: 1.5rem;
    color: #34495e;
    animation-duration: 8s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.tool-1 {
    top: 20%;
    left: 15%;
    animation-name: toolFloat1;
    animation-delay: 0s;
}

.tool-2 {
    top: 60%;
    right: 20%;
    animation-name: toolFloat2;
    animation-delay: 2s;
}

.tool-3 {
    bottom: 30%;
    left: 70%;
    animation-name: toolFloat3;
    animation-delay: 4s;
}

@keyframes toolFloat1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes toolFloat2 {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    50% { transform: translateX(20px) rotate(-180deg); }
}

@keyframes toolFloat3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-15px, -15px) rotate(360deg); }
}

/* Pulse Button Animation */
.pulse-btn {
    animation: pulseButton 2s ease-in-out infinite;
    will-change: transform, box-shadow;
}

@keyframes pulseButton {
    0% { 
        transform: translate3d(0, 0, 0) scale(1); 
        box-shadow: 0 0 0 0 rgba(44, 90, 160, 0.7); 
    }
    70% { 
        transform: translate3d(0, 0, 0) scale(1.05); 
        box-shadow: 0 0 0 10px rgba(44, 90, 160, 0); 
    }
    100% { 
        transform: translate3d(0, 0, 0) scale(1); 
        box-shadow: 0 0 0 0 rgba(44, 90, 160, 0); 
    }
}

/* Error Code Badge */
.error-code {
    animation: errorCodeBlink 3s infinite;
}

@keyframes errorCodeBlink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.7; }
}

/* Interactive Elements */
.clickable-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.traffic-cone {
    position: absolute;
    font-size: 2.5rem;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
    animation: coneWobble 3s ease-in-out infinite;
    user-select: none;
}

.cone-1 {
    bottom: 20%;
    left: 15%;
    animation-delay: 0s;
}

.cone-2 {
    bottom: 25%;
    right: 20%;
    animation-delay: 1.5s;
}

.construction-worker {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
    animation: workerWave 4s ease-in-out infinite;
    user-select: none;
}

@keyframes coneWobble {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

@keyframes workerWave {
    0%, 100% { transform: translateX(-50%) scale(1); }
    25% { transform: translateX(-50%) scale(1.1) rotate(-5deg); }
    75% { transform: translateX(-50%) scale(1.1) rotate(5deg); }
}

.clickable-elements [data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
}

/* Flying Items Animation */
.flying-items {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.flying-item {
    position: absolute;
    font-size: 2rem;
    animation: flyAcross 8s linear infinite;
    opacity: 0;
}

.item-1 {
    top: 20%;
    animation-delay: 0s;
}

.item-2 {
    top: 40%;
    animation-delay: 2s;
}

.item-3 {
    top: 60%;
    animation-delay: 4s;
}

.item-4 {
    top: 80%;
    animation-delay: 6s;
}

@keyframes flyAcross {
    0% {
        left: -10%;
        opacity: 0;
        transform: rotate(0deg);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: 110%;
        opacity: 0;
        transform: rotate(360deg);
    }
}

/* Construction Facts */
.construction-facts {
    border: 2px dashed #ffc107;
}

.fact-content {
    text-align: center;
}

#currentFact {
    font-style: italic;
    color: #6c757d;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Progress Bar Animation */
.construction-progress {
    text-align: center;
}

.progress-text {
    font-size: 0.9rem;
    font-weight: bold;
}

/* Animated Counters */
.animated-counter .stat-number {
    transition: all 0.5s ease;
}

/* Easter Eggs */
.easter-eggs {
    text-align: center;
}

.easter-egg {
    display: inline-block;
    padding: 15px;
    margin: 0 10px;
    border-radius: 15px;
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border: 2px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.easter-egg:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.egg-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.easter-egg small {
    display: block;
    color: #6c757d;
    font-size: 0.7rem;
}

/* Message Generator */
.message-generator {
    border: 2px dashed #0dcaf0;
}

.generated-message {
    font-style: italic;
    color: #495057;
    border-left: 4px solid #0dcaf0;
    min-height: 60px;
    display: flex;
    align-items: center;
    animation: messageTypewriter 2s ease-in-out;
}

@keyframes messageTypewriter {
    0% { width: 0; overflow: hidden; }
    50% { width: 0; overflow: hidden; }
    100% { width: 100%; overflow: visible; }
}

/* Special Effects */
.matrix-effect {
    background: #000 !important;
    color: #0f0 !important;
    font-family: 'Courier New', monospace !important;
}

.disco-mode {
    animation: discoColors 0.5s infinite !important;
}

@keyframes discoColors {
    0% { background: #ff0080; }
    25% { background: #0080ff; }
    50% { background: #80ff00; }
    75% { background: #ff8000; }
    100% { background: #ff0080; }
}

.zero-gravity {
    animation: float 3s ease-in-out infinite !important;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .error-number {
        font-size: 8rem;
    }

    .error-title {
        font-size: 2.5rem;
    }

    .error-content {
        padding: 2rem;
    }
}

@media (max-width: 767.98px) {
    .error-number {
        font-size: 6rem;
    }

    .error-title {
        font-size: 2rem;
    }

    .error-description {
        font-size: 1.1rem;
    }

    .error-actions .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }

    .suggestion-links {
        flex-direction: column;
    }

    .suggestion-link {
        width: 100%;
    }
    
    .crane {
        right: 20%;
    }
}

@media (max-width: 575.98px) {
    .error-number {
        font-size: 5rem;
    }
    
    .error-content {
        padding: 1.5rem;
    }
    
    .error-animation {
        height: 120px;
    }
    
    .crane {
        transform: scale(0.7);
        right: 10%;
    }
    
    .hard-hat {
        transform: scale(0.7);
        left: 15%;
    }
    
    .blueprint-roll {
        transform: scale(0.7) rotate(-30deg);
        left: 60%;
    }
}

@media (max-width: 768px) {
    .error-title {
        font-size: 2.5rem;
    }
    
    .quote-text {
        font-size: 1rem;
    }
    
    .suggestion-link {
        width: 150px;
        padding: 1rem;
    }
    
    .worker-speech {
        right: 5%;
        top: -40px;
    }
    
    .speech-bubble {
        font-size: 0.8rem;
        padding: 0.75rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .error-title {
        font-size: 2rem;
    }
    
    .suggestion-links {
        gap: 1rem;
    }
    
    .suggestion-link {
        width: 130px;
        padding: 0.75rem;
    }
    
    .error-stats {
        padding: 1rem;
    }
    
    .flying-item {
        font-size: 1.2rem;
    }
    
    .traffic-cone {
        font-size: 1.5rem;
    }
    
    .construction-worker {
        font-size: 2rem;
    }
    
    .easter-egg {
        min-width: 60px;
        padding: 10px;
        margin: 0 5px 10px;
    }
    
    .egg-icon {
        font-size: 1.5rem;
    }
    
    .construction-facts,
    .construction-facts,
    .message-generator {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
    }
}
