/* =================================================================
   404 ERROR PAGE - ADDITIONAL STYLES
================================================================= */

/* 404 Background */
.error-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    background: radial-gradient(ellipse at center, rgba(255, 71, 87, 0.1) 0%, transparent 70%);
}

.blockchain-break {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.break-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ff4757;
    border-radius: 50%;
    opacity: 0.6;
    animation: breakFloat 15s infinite linear;
}

@keyframes breakFloat {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
        transform: scale(1);
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) rotate(360deg) scale(0);
        opacity: 0;
    }
}

.lost-coins {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.lost-coin {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.3;
    animation: coinSpin 20s infinite linear;
    pointer-events: none;
}

@keyframes coinSpin {
    0% {
        transform: translateY(100vh) rotateY(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) rotateY(720deg);
        opacity: 0;
    }
}

.error-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 71, 87, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 71, 87, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    animation: errorGridMove 25s infinite linear;
    z-index: 1;
}

@keyframes errorGridMove {
    0% { transform: translate(0, 0) skew(0deg); }
    50% { transform: translate(40px, 40px) skew(2deg); }
    100% { transform: translate(80px, 80px) skew(0deg); }
}

.glitch-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 98%, rgba(255, 71, 87, 0.1) 100%),
        linear-gradient(180deg, transparent 98%, rgba(86, 180, 211, 0.05) 100%);
    animation: glitchEffect 8s infinite;
    z-index: 3;
}

@keyframes glitchEffect {
    0%, 90%, 100% { transform: translate(0); }
    95% { transform: translate(2px, 1px) skew(0.5deg); }
    96% { transform: translate(-1px, -1px) skew(-0.5deg); }
    97% { transform: translate(1px, 2px) skew(0.3deg); }
}

/* Error Container */
.error-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding-top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Error Hero */
.error-hero {
    text-align: center;
    padding: 60px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.error-animation {
    margin-bottom: 50px;
}

/* Interactive 404 Display */
.error-code-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.error-digit {
    position: relative;
    width: 120px;
    height: 160px;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.error-digit:hover {
    transform: scale(1.1);
}

.digit-front,
.digit-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    font-weight: 800;
    border-radius: 20px;
    backface-visibility: hidden;
    transition: transform 0.6s ease;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 71, 87, 0.3);
}

.digit-front {
    color: #ff4757;
    text-shadow: 0 0 30px rgba(255, 71, 87, 0.5);
    z-index: 2;
}

.digit-back {
    color: #56b4d3;
    text-shadow: 0 0 30px rgba(86, 180, 211, 0.5);
    transform: rotateY(180deg);
    background: rgba(86, 180, 211, 0.1);
    border-color: rgba(86, 180, 211, 0.3);
}

.error-digit.flipped .digit-front {
    transform: rotateY(180deg);
}

.error-digit.flipped .digit-back {
    transform: rotateY(0deg);
}

.error-digit.glitch {
    animation: digitGlitch 3s infinite;
}

@keyframes digitGlitch {
    0%, 90%, 100% { transform: translate(0); }
    95% { transform: translate(3px, 2px) skew(1deg); }
    96% { transform: translate(-2px, -2px) skew(-1deg); }
    97% { transform: translate(2px, 3px) skew(0.5deg); }
}

/* Broken Blockchain Visualization */
.broken-blockchain {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.blockchain-segment {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: segmentFloat 4s ease-in-out infinite;
}

.blockchain-segment:nth-child(1) { animation-delay: 0s; }
.blockchain-segment:nth-child(2) { animation-delay: 0.5s; }
.blockchain-segment:nth-child(3) { animation-delay: 1s; }
.blockchain-segment:nth-child(4) { animation-delay: 1.5s; }

@keyframes segmentFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.block {
    width: 60px;
    height: 60px;
    background: rgba(86, 180, 211, 0.2);
    border: 2px solid rgba(86, 180, 211, 0.4);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.block.connected {
    background: rgba(0, 212, 170, 0.2);
    border-color: rgba(0, 212, 170, 0.4);
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.3);
}

.block.isolated {
    background: rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.4);
    animation: isolatedPulse 2s infinite;
}

@keyframes isolatedPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 107, 53, 0.3); }
    50% { box-shadow: 0 0 30px rgba(255, 107, 53, 0.6); }
}

.missing-block {
    background: rgba(255, 71, 87, 0.1);
    border: 2px dashed rgba(255, 71, 87, 0.4);
    opacity: 0.6;
    animation: missingPulse 1.5s infinite;
}

@keyframes missingPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.question-mark {
    font-size: 2rem;
    color: #ff4757;
    animation: questionBounce 2s infinite;
}

@keyframes questionBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

.chain-link {
    width: 30px;
    height: 4px;
    background: rgba(86, 180, 211, 0.6);
    border-radius: 2px;
    position: relative;
}

.chain-link.broken {
    background: linear-gradient(90deg, 
        rgba(86, 180, 211, 0.6) 0%, 
        rgba(86, 180, 211, 0.6) 40%, 
        transparent 40%, 
        transparent 60%, 
        rgba(255, 71, 87, 0.6) 60%, 
        rgba(255, 71, 87, 0.6) 100%);
    animation: brokenLink 2s infinite;
}

@keyframes brokenLink {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* Error Content */
.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.title-line {
    color: var(--text-primary);
}

.title-highlight {
    background: linear-gradient(135deg, #ff4757 0%, #ff6b35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: errorGlow 3s ease-in-out infinite;
}

@keyframes errorGlow {
    0%, 100% { 
        background: linear-gradient(135deg, #ff4757 0%, #ff6b35 100%);
        -webkit-background-clip: text;
        background-clip: text;
    }
    50% { 
        background: linear-gradient(135deg, #ff6b35 0%, #ff4757 100%);
        -webkit-background-clip: text;
        background-clip: text;
    }
}

.error-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Easter Egg Game */
.easter-egg-game {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.easter-egg-game.show {
    opacity: 1;
    visibility: visible;
}

.game-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    height: 70%;
    background: var(--bg-primary);
    border: 1px solid rgba(86, 180, 211, 0.3);
    border-radius: 20px;
    overflow: hidden;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--primary-gradient);
    color: white;
}

.game-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.game-score {
    font-weight: 600;
}

.game-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.game-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.game-area {
    height: calc(100% - 80px);
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.game-instructions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-primary);
}

.start-game-btn {
    margin-top: 20px;
    padding: 12px 24px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.start-game-btn:hover {
    transform: translateY(-2px);
}

.falling-coin {
    position: absolute;
    font-size: 2rem;
    cursor: pointer;
    animation: fall 4s linear;
    user-select: none;
}

@keyframes fall {
    0% { transform: translateY(-50px) rotate(0deg); }
    100% { transform: translateY(calc(100vh + 50px)) rotate(360deg); }
}

/* Report Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--bg-primary);
    border: 1px solid rgba(86, 180, 211, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: rgba(255, 107, 53, 0.1);
    border-bottom: 1px solid rgba(255, 107, 53, 0.2);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
}

.modal-body {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-select,
.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-select:focus,
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #56b4d3;
    box-shadow: 0 0 0 3px rgba(86, 180, 211, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.form-actions .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .error-container {
        padding-top: 80px;
    }
    
    .error-digit {
        width: 80px;
        height: 120px;
    }
    
    .digit-front,
    .digit-back {
        font-size: 5rem;
    }
    
    .broken-blockchain {
        gap: 5px;
    }
    
    .block {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .chain-link {
        width: 20px;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .quick-nav-grid {
        grid-template-columns: 1fr;
    }
    
    .fact-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .fact-icon {
        font-size: 2.5rem;
    }
    
    .game-container {
        width: 95%;
        height: 80%;
    }
}

@media (max-width: 480px) {
    .error-hero {
        padding: 40px 15px;
    }
    
    .error-code-container {
        gap: 10px;
    }
    
    .error-digit {
        width: 60px;
        height: 100px;
    }
    
    .digit-front,
    .digit-back {
        font-size: 3.5rem;
    }
    
    .error-title {
        font-size: 1.8rem;
    }
    
    .nav-card {
        padding: 20px;
        gap: 15px;
    }
    
    .nav-icon {
        font-size: 2rem;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}