/* Error Page Enhancements - 24px Styling */

/* Error Numbers - 24px and Bright */
.error-code,
.glitch,
[class*="error-code"],
.error-number,
[class*="code"] {
    font-size: 24px !important;
    font-weight: 900 !important;
    color: #ff0088 !important;
    text-shadow: 
        0 0 10px #ff0088,
        0 0 20px #ff0088,
        0 0 30px #ff0088 !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    text-align: center !important;
    line-height: 1.2 !important;
    margin: 0.5rem 0 !important;
    display: inline-block !important;
    padding: 0.25rem 0.5rem !important;
    border: 2px solid #ff0088 !important;
    border-radius: 8px !important;
    background-color: rgba(255, 0, 136, 0.1) !important;
    animation: errorGlow 2s ease-in-out infinite alternate !important;
}

/* PQ Crypta Branding - 24px with Complementing Colors */
.pq-crypta-title,
.quantum-title,
[class*="pq-crypta"],
[class*="title"]:not(.poem-title):not(.menu-title):not(.dropdown-title):not(.error-title):not(.subtitle):not(.quantum-dropdown-title):not(.quantum-dropdown-subtitle) {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #00ffff !important;
    text-shadow: 
        0 0 8px #00ffff,
        0 0 16px #00ffff,
        0 0 24px #00ffff !important;
    text-align: center !important;
    margin: 1rem 0 !important;
    padding: 0.5rem 1rem !important;
    border: 2px solid #00ffff !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, 
        rgba(0, 255, 255, 0.05), 
        rgba(0, 255, 255, 0.15)) !important;
    backdrop-filter: blur(5px) !important;
    animation: cryptaGlow 3s ease-in-out infinite alternate !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}

/* Override the 24px rule specifically for dropdown menu headers - highest specificity */
div.quantum-dropdown-title,
.quantum-dropdown .quantum-dropdown-title,
[class*="quantum-dropdown-title"] {
    font-size: 8px !important;
    font-weight: normal !important;
    color: #00ffff !important;
    text-shadow: 0 0 2px #00ffff !important;
    text-align: center !important;
    margin: 2px 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    backdrop-filter: none !important;
    animation: none !important;
    letter-spacing: 0.5px !important;
    text-transform: none !important;
    transform: none !important;
    box-shadow: none !important;
}

.quantum-dropdown-subtitle {
    font-size: 6px !important;
    color: #88ccff !important;
    opacity: 0.7 !important;
    margin: 2px 0 !important;
}

/* Glowing Animations */
@keyframes errorGlow {
    0%, 100% { 
        box-shadow: 
            0 0 10px #ff0088,
            0 0 20px #ff0088,
            0 0 30px #ff0088,
            inset 0 0 10px rgba(255, 0, 136, 0.1);
        transform: scale(1);
    }
    50% { 
        box-shadow: 
            0 0 15px #ff0088,
            0 0 30px #ff0088,
            0 0 45px #ff0088,
            inset 0 0 15px rgba(255, 0, 136, 0.2);
        transform: scale(1.05);
    }
}

@keyframes cryptaGlow {
    0%, 100% { 
        box-shadow: 
            0 0 8px #00ffff,
            0 0 16px #00ffff,
            0 0 24px #00ffff,
            inset 0 0 8px rgba(0, 255, 255, 0.1);
        transform: scale(1);
        border-color: #00ffff;
    }
    50% { 
        box-shadow: 
            0 0 12px #00ffff,
            0 0 24px #00ffff,
            0 0 36px #00ffff,
            inset 0 0 12px rgba(0, 255, 255, 0.2);
        transform: scale(1.02);
        border-color: #44ffff;
    }
}

/* Specific adjustments for different pages */

/* 400 Page - Syntax Error */
.error-pages-400 .error-code {
    color: #ff6b6b !important;
    border-color: #ff6b6b !important;
    text-shadow: 
        0 0 10px #ff6b6b,
        0 0 20px #ff6b6b,
        0 0 30px #ff6b6b !important;
    background-color: rgba(255, 107, 107, 0.1) !important;
}

.error-pages-400 .pq-crypta-title {
    color: #4ecdc4 !important;
    border-color: #4ecdc4 !important;
    text-shadow: 
        0 0 5px #4ecdc4,
        0 0 10px #4ecdc4 !important;
    background: linear-gradient(135deg, 
        rgba(78, 205, 196, 0.05), 
        rgba(78, 205, 196, 0.15)) !important;
    filter: none !important;
    -webkit-text-fill-color: #4ecdc4 !important;
    background-clip: border-box !important;
    -webkit-background-clip: border-box !important;
}

/* Make poem container size to content on 400 page */
.error-pages-400 .poem-container {
    max-width: none !important;
    width: auto !important;
    padding: 40px !important;
    margin: 0 50px !important;
    min-height: auto !important;
}

/* 401 Page - Authentication */
.error-pages-401 .error-code,
.error-pages-401 .error-text {
    color: #ff8c42 !important;
    border-color: #ff8c42 !important;
    text-shadow: 
        0 0 10px #ff8c42,
        0 0 20px #ff8c42,
        0 0 30px #ff8c42 !important;
    background-color: rgba(255, 140, 66, 0.1) !important;
}

.error-pages-401 .pq-crypta-title {
    color: #00b894 !important;
    border-color: #00b894 !important;
    text-shadow: 
        0 0 8px #00b894,
        0 0 16px #00b894,
        0 0 24px #00b894 !important;
    background: linear-gradient(135deg, 
        rgba(0, 184, 148, 0.05), 
        rgba(0, 184, 148, 0.15)) !important;
}

/* Center 401 overlay on page */
.error-pages-401 #overlay {
    padding: 40px !important;
    margin: 0 auto !important;
    width: auto !important;
    min-width: auto !important;
    min-height: auto !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 403 Page - Forbidden */
.error-pages-403 .error-code {
    color: #ff6b9d !important;
    border-color: #ff6b9d !important;
    text-shadow: 
        0 0 10px #ff6b9d,
        0 0 20px #ff6b9d,
        0 0 30px #ff6b9d !important;
    background-color: rgba(255, 107, 157, 0.1) !important;
}

.error-pages-403 .pq-crypta-title {
    color: #00cec9 !important;
    border-color: #00cec9 !important;
    text-shadow: 
        0 0 8px #00cec9,
        0 0 16px #00cec9,
        0 0 24px #00cec9 !important;
    background: linear-gradient(135deg, 
        rgba(0, 206, 201, 0.05), 
        rgba(0, 206, 201, 0.15)) !important;
}

/* Center 403 ui-overlay on page */
.error-pages-403 .ui-overlay {
    padding: 50px !important;
    margin: 0 auto !important;
    width: auto !important;
    min-width: auto !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.error-pages-403 .security-panel {
    padding: 30px !important;
    min-height: auto !important;
}

/* 404 Page - Not Found */
.error-pages-404 .error-code {
    color: #c44569 !important;
    border-color: #c44569 !important;
    text-shadow: 
        0 0 10px #c44569,
        0 0 20px #c44569,
        0 0 30px #c44569 !important;
    background-color: rgba(196, 69, 105, 0.1) !important;
}

.error-pages-404 .pq-crypta-title {
    color: #6c5ce7 !important;
    border-color: #6c5ce7 !important;
    text-shadow: 
        0 0 8px #6c5ce7,
        0 0 16px #6c5ce7,
        0 0 24px #6c5ce7 !important;
    background: linear-gradient(135deg, 
        rgba(108, 92, 231, 0.05), 
        rgba(108, 92, 231, 0.15)) !important;
}

/* Center 404 ui-overlay on page */
.error-pages-404 .ui-overlay {
    padding: 50px !important;
    margin: 0 auto !important;
    width: auto !important;
    min-width: auto !important;
    min-height: auto !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 500 Page - Server Error */
.error-pages-500 .error-code,
.error-pages-500 .glitch {
    color: #e17055 !important;
    border-color: #e17055 !important;
    text-shadow: 
        0 0 10px #e17055,
        0 0 20px #e17055,
        0 0 30px #e17055 !important;
    background-color: rgba(225, 112, 85, 0.1) !important;
}

.error-pages-500 .pq-crypta-title {
    color: #74b9ff !important;
    border-color: #74b9ff !important;
    text-shadow: 
        0 0 8px #74b9ff,
        0 0 16px #74b9ff,
        0 0 24px #74b9ff !important;
    background: linear-gradient(135deg, 
        rgba(116, 185, 255, 0.05), 
        rgba(116, 185, 255, 0.15)) !important;
}

/* Fix 500 page text visibility */
.error-pages-500 .subtitle {
    color: #00ffff !important;
    text-shadow: 0 0 10px #00ffff !important;
}

.error-pages-500 .error-details {
    color: #ffff00 !important;
    text-shadow: 0 0 8px #ffff00 !important;
}

.error-pages-500 .retry-btn {
    background: linear-gradient(45deg, #e17055, #74b9ff) !important;
    color: white !important;
    border: 2px solid #74b9ff !important;
    text-shadow: none !important;
}

/* Center 500 page #ui on page */
.error-pages-500 #ui {
    padding: 50px !important;
    margin: 0 auto !important;
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 502 Page - Bad Gateway */
.error-pages-502 .error-code {
    color: #00b894 !important;
    border-color: #00b894 !important;
    text-shadow: 
        0 0 10px #00b894,
        0 0 20px #00b894,
        0 0 30px #00b894 !important;
    background-color: rgba(0, 184, 148, 0.1) !important;
}

.error-pages-502 .pq-crypta-title {
    color: #fd79a8 !important;
    border-color: #fd79a8 !important;
    text-shadow: 
        0 0 8px #fd79a8,
        0 0 16px #fd79a8,
        0 0 24px #fd79a8 !important;
    background: linear-gradient(135deg, 
        rgba(253, 121, 168, 0.05), 
        rgba(253, 121, 168, 0.15)) !important;
}

/* Center 502 ui-overlay on page */
.error-pages-502 #ui-overlay {
    padding: 50px !important;
    margin: 0 auto !important;
    width: auto !important;
    min-width: auto !important;
    min-height: auto !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.error-pages-502 .status-panel {
    padding: 30px !important;
    min-height: auto !important;
}

/* 503 Page - Service Unavailable */
.error-pages-503 .error-code {
    color: #00cec9 !important;
    border-color: #00cec9 !important;
    text-shadow: 
        0 0 10px #00cec9,
        0 0 20px #00cec9,
        0 0 30px #00cec9 !important;
    background-color: rgba(0, 206, 201, 0.1) !important;
}

.error-pages-503 .pq-crypta-title {
    color: #fdcb6e !important;
    border-color: #fdcb6e !important;
    text-shadow: 
        0 0 8px #fdcb6e,
        0 0 16px #fdcb6e,
        0 0 24px #fdcb6e !important;
    background: linear-gradient(135deg, 
        rgba(253, 203, 110, 0.05), 
        rgba(253, 203, 110, 0.15)) !important;
}

/* Center 503 ui-overlay on page */
.error-pages-503 .ui-overlay {
    padding: 50px !important;
    margin: 0 auto !important;
    width: auto !important;
    min-width: auto !important;
    min-height: auto !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* NoReferer Page */
.error-pages-noreferer .error-code {
    color: #fdcb6e !important;
    border-color: #fdcb6e !important;
    text-shadow: 
        0 0 10px #fdcb6e,
        0 0 20px #fdcb6e,
        0 0 30px #fdcb6e !important;
    background-color: rgba(253, 203, 110, 0.1) !important;
}

.error-pages-noreferer .pq-crypta-title {
    color: #a29bfe !important;
    border-color: #a29bfe !important;
    text-shadow: 
        0 0 8px #a29bfe,
        0 0 16px #a29bfe,
        0 0 24px #a29bfe !important;
    background: linear-gradient(135deg, 
        rgba(162, 155, 254, 0.05), 
        rgba(162, 155, 254, 0.15)) !important;
}

/* Center NoReferer info-panel on page - 60% screen width with reduced vertical margins */
.error-pages-noreferer .info-panel {
    padding: 25px 50px !important;
    margin: 0 auto !important;
    width: 60vw !important;
    max-width: 60vw !important;
    min-width: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

/* Make NoReferer error code box twice as wide with vertical centering */
.error-pages-noreferer .error-code {
    min-width: 400px !important;
    padding: 0.5rem 4rem !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Center text vertically in Initialize Connection button */
.error-pages-noreferer .home-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Make Lost in Digital Space title half its size */
.error-pages-noreferer .title {
    font-size: 50% !important;
    transform: scale(0.5) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .error-code,
    .glitch,
    [class*="error-code"],
    .error-number,
    [class*="code"] {
        font-size: 20px !important;
        padding: 0.2rem 0.4rem !important;
    }
    
    .pq-crypta-title,
    .quantum-title,
    [class*="pq-crypta"],
    [class*="title"]:not(.poem-title):not(.menu-title):not(.dropdown-title):not(.error-title):not(.subtitle) {
        font-size: 20px !important;
        padding: 0.4rem 0.8rem !important;
        margin: 0.8rem 0 !important;
    }
}

@media (max-width: 480px) {
    .error-code,
    .glitch,
    [class*="error-code"],
    .error-number,
    [class*="code"] {
        font-size: 18px !important;
        padding: 0.15rem 0.3rem !important;
    }
    
    .pq-crypta-title,
    .quantum-title,
    [class*="pq-crypta"],
    [class*="title"]:not(.poem-title):not(.menu-title):not(.dropdown-title):not(.error-title):not(.subtitle) {
        font-size: 18px !important;
        padding: 0.3rem 0.6rem !important;
        margin: 0.6rem 0 !important;
        letter-spacing: 0.5px !important;
    }
}