:root {
    --dark-bg: #121222;
    --card-bg: rgba(30, 30, 40, 0.3);
    --border-color: rgba(255, 255, 255, 0.05);
    --primary: #673ab7;
    --secondary: #3f51b5;
    --error: #f44336;
    --error-light: #ffcdd2;
    --text-color: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.dashboard-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.error-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(103, 58, 183, 0.05), rgba(63, 81, 181, 0.05));
    z-index: -1;
    overflow: hidden;
}

.error-bg::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><circle cx="30" cy="30" r="28" fill="none" stroke="%23673ab710" stroke-width="0.5"/></svg>'),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80"><polygon points="40,5 55,30 40,55 25,30" fill="none" stroke="%233f51b510" stroke-width="0.5"/></svg>');
    animation: moveBg 60s linear infinite;
}

@keyframes moveBg {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(-200px) rotate(10deg);
    }
}

.error-card {
    background: rgba(24, 24, 48, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transform: translateY(0);
    transition: all 0.5s ease;
    animation: errorCardAppear 0.5s ease forwards;
}

@keyframes errorCardAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.error-header {
    background: linear-gradient(135deg, rgba(103, 58, 183, 0.7), rgba(63, 81, 181, 0.7));
    padding: 30px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.error-code {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    font-family: 'Orbitron', sans-serif;
    font-size: 42px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.15);
    letter-spacing: 2px;
}

.error-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1;
}

.error-icon {
    width: 60px;
    height: 60px;
    background: rgba(244, 67, 54, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.4);
    position: relative;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.6);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(244, 67, 54, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0);
    }
}

.error-icon::before {
    content: "⚠️";
    font-size: 30px;
}

.error-title-container {
    text-align: left;
}

.error-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.error-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.error-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.error-message {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
    max-width: 100%;
}

.error-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.error-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    padding: 12px 25px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    white-space: nowrap;
}

.error-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    box-shadow: 0 5px 15px rgba(103, 58, 183, 0.3);
}

.error-btn:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.15);
}

.error-btn.primary:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 8px 20px rgba(103, 58, 183, 0.4);
}

.error-details {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
}

.error-details-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.error-trace {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
    font-family: monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    white-space: pre-wrap;
    overflow-x: auto;
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.1);
}

.error-trace::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.error-trace::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.error-trace::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.error-footer {
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .error-header {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .error-code {
        position: static;
        transform: none;
        margin-top: 10px;
        font-size: 32px;
    }

    .error-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .error-body {
        padding: 20px;
    }

    .error-actions {
        flex-direction: column;
        width: 100%;
    }

    .error-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .error-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .error-title-container {
        text-align: center;
        width: 100%;
    }

    .error-icon {
        margin: 0 auto;
    }

    .error-code {
        font-size: 24px;
        text-align: center;
        width: 100%;
    }
}