/* ==========================================================================
   ShieldCache Error Pages - SpeedIT Solutions
   ========================================================================== */

:root {
    --primary: #0066cc;
    --primary-light: #3388dd;
    --accent: #00aaff;
    --primary-glow: rgba(0, 102, 204, 0.3);
    
    --bg-dark: #0a0e14;
    --bg-card: #101620;
    
    --text-primary: #ffffff;
    --text-secondary: #a8b4c4;
    --text-muted: #5a6a7a;
    
    --border: rgba(255, 255, 255, 0.08);
    
    --error-red: #ff4757;
    --error-orange: #ffa502;
    --error-blue: #3742fa;
    --error-purple: #8854d0;
    
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow-x: hidden;
}

/* Background */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 102, 204, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 102, 204, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.bg-glow--top {
    top: -250px;
    right: -150px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
}

.bg-glow--bottom {
    bottom: -250px;
    left: -150px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
}

/* Error Container */
.error-container {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 600px;
    width: 100%;
}

/* Error Icon - fixed position, no layout shift */
.error-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    display: block;
    height: 60px;
    line-height: 60px;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Error Code */
.error-code {
    font-size: clamp(5rem, 18vw, 9rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
    margin-bottom: 16px;
    display: block;
}

.error-code--403 {
    background: linear-gradient(135deg, var(--error-red) 0%, var(--error-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-code--404 {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-code--429 {
    background: linear-gradient(135deg, var(--error-orange) 0%, #ff6348 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-code--500 {
    background: linear-gradient(135deg, var(--error-purple) 0%, var(--error-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Error Title */
.error-title {
    font-size: clamp(1.4rem, 4vw, 1.75rem);
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

/* Error Description */
.error-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* Error Card */
.error-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 36px;
    text-align: left;
}

.error-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.error-card__icon {
    width: 40px;
    height: 40px;
    background: rgba(0, 102, 204, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.error-card__title {
    font-size: 0.95rem;
    font-weight: 600;
}

.error-card__subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.error-card__content {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.9;
}

.error-card__content .highlight {
    color: var(--accent);
    font-family: var(--font-mono);
}

.error-card__content .muted {
    color: var(--text-muted);
}

/* Buttons */
.buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn--primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn--secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn--secondary:hover {
    border-color: var(--primary);
    color: var(--accent);
}

/* Shield Badge */
.shield-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(0, 102, 204, 0.1);
    border: 1px solid rgba(0, 102, 204, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--accent);
    margin-top: 40px;
}

.shield-badge a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.shield-badge a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    margin-top: 48px;
    text-align: center;
    z-index: 1;
    position: relative;
}

.footer__links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.footer__links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer__links a:hover {
    color: var(--accent);
}

.footer__copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 640px) {
    body {
        padding: 20px;
        padding-top: 40px;
        justify-content: flex-start;
    }
    
    .error-icon {
        font-size: 2.5rem;
        height: 45px;
        line-height: 45px;
    }
    
    .error-code {
        font-size: 4.5rem;
    }
    
    .error-description {
        font-size: 0.95rem;
    }
    
    .error-card {
        padding: 20px;
    }
    
    .error-card__content {
        font-size: 0.85rem;
    }
    
    .buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .shield-badge {
        margin-top: 32px;
        font-size: 0.8rem;
        padding: 8px 16px;
    }
    
    .footer {
        margin-top: 40px;
    }
    
    .footer__links {
        gap: 16px;
    }
    
    .footer__copyright {
        font-size: 0.75rem;
    }
}
