/* Background color classes */
.bg-dark   { background: #0f172a; }
.bg-red    { background: #7f1d1d; }
.bg-orange { background: #9a3412; }
.bg-yellow { background: #78350f; }
.bg-amber  { background: #92400e; }
.bg-pink   { background: #831843; }
.bg-purple { background: #581c87; }
.bg-fuchsia{ background: #701a75; }
.bg-gray   { background: #1f2937; }
.bg-teal   { background: #134e4a; }
.bg-green  { background: #14532d; }
.bg-blue   { background: #1e3a8a; }
.bg-rose   { background: #881337; }

.text-white   { color: #fff; }
.text-red     { color: #f87171; }
.text-orange  { color: #fb923c; }
.text-yellow  { color: #facc15; }
.text-amber   { color: #f59e0b; }
.text-pink    { color: #ec4899; }
.text-purple  { color: #a78bfa; }
.text-fuchsia { color: #c026d3; }
.text-gray    { color: #9ca3af; }
.text-teal    { color: #14b8a6; }
.text-green   { color: #22c55e; }
.text-blue    { color: #3b82f6; }
.text-rose    { color: #f43f5e; }

.error-btn.retry.text-white   { background: #ffffff; color: #1f2937; }
.error-btn.retry.text-red     { background: #f87171; color: #fff; }
.error-btn.retry.text-orange  { background: #fb923c; color: #fff; }
.error-btn.retry.text-yellow  { background: #facc15; color: #1f2937; }
.error-btn.retry.text-amber   { background: #f59e0b; color: #1f2937; }
.error-btn.retry.text-pink    { background: #ec4899; color: #fff; }
.error-btn.retry.text-purple  { background: #a78bfa; color: #fff; }
.error-btn.retry.text-fuchsia { background: #c026d3; color: #fff; }
.error-btn.retry.text-gray    { background: #9ca3af; color: #1f2937; }
.error-btn.retry.text-teal    { background: #14b8a6; color: #fff; }
.error-btn.retry.text-green   { background: #22c55e; color: #fff; }
.error-btn.retry.text-blue    { background: #3b82f6; color: #fff; }
.error-btn.retry.text-rose    { background: #f43f5e; color: #fff; }


/* Keep wrapper centered */
.error-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #f8fafc;
    font-family: "Inter", sans-serif;
    text-align: center;
}

.error-container {
    background: rgba(0,0,0,0.4);
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.error-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    color: #facc15; /* accent yellow */
}

.error-code {
    font-size: 4rem;
    margin: 0;
}

.error-message {
    font-size: 1.5rem;
    margin: 10px 0;
    font-weight: bold;
}

.error-hint {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.error-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #facc15;
    color: #1f2937;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.error-btn:hover {
    background: #fde047;
}


.error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.error-btn.retry {
    background: #3b82f6; /* blue for retry */
    color: #fff;
}

.error-btn.retry:hover {
    background: #2563eb;
}



/* Retry progress bar */
.retry-container {
    margin-top: 15px;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.retry-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

/* Retry progress bar dynamic gradient - initial color will be overridden by JS */
.retry-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 1s linear, background-color 1s linear;
}


.retry-countdown {
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    display: inline-block;
}


/* Distinct styling for fallback/unknown errors */
.fallback-error .error-container {
    border: 2px solid #f87171; /* red border */
    background: rgba(248, 113, 113, 0.1); /* light red transparent */
    box-shadow: 0 0 20px rgba(248, 113, 113, 0.5);
}

.fallback-error .error-icon {
    color: #f87171; /* red accent */
}

.fallback-error .error-code {
    color: #b91c1c; /* darker red */
}

