/* Menu Styles - Extracted from menu.php for CSP compliance */
.dropdown-container {
    position: absolute;
    top: 10px;
    right: 50px;
    z-index: 10200; /* Above title panel (9999) and canvas (10100) */
    width: 250px;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-radius: 8px;
}
.dropdown-select {
    width: 100%;
    padding: 10px 15px;
    background: linear-gradient(145deg, #333, #222);
    color: #fff;
    border: 2px solid #444;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}
.dropdown-select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3);
}
.dropdown-select option {
    background-color: #000;
    color: #FFF;
    padding: 10px;
}
.dropdown-select optgroup {
    background-color: #111;
    color: #d4af37;
    font-weight: bold;
    font-style: normal;
}
.dropdown-select optgroup option {
    background-color: #222;
    color: #ff6b6b;
    padding: 8px 15px;
    font-weight: normal;
}
.dropdown-select optgroup option:hover {
    background-color: #333;
}

/* Quantum Error Portal - Streamlined Modern Design */
.error-pages-menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.97), rgba(15, 15, 30, 0.97));
    border-left: 1px solid rgba(212, 175, 55, 0.3);
    z-index: 19000;
    transition: right 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(15px);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.error-pages-menu.active {
    right: 0;
}

.error-header {
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.98), rgba(15, 15, 30, 0.95));
    padding: 25px 20px 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.error-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: rgba(220, 20, 60, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.3);
}

.error-close:hover {
    background: rgba(220, 20, 60, 1);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.5);
}

.error-title {
    color: #d4af37;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-align: center;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.error-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin: 0;
    text-align: center;
    font-style: italic;
}

.error-nav {
    padding: 15px 10px 25px;
}

.error-menu-item {
    display: flex;
    align-items: center;
    padding: 18px 15px;
    margin: 8px 0;
    background: linear-gradient(135deg, rgba(25, 25, 35, 0.9), rgba(30, 30, 40, 0.8));
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 12px;
    text-decoration: none;
    color: white;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    animation: portalOpen 0.6s ease-out;
}

.error-menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.6s ease;
}

.error-menu-item:hover::before {
    left: 100%;
}

.error-menu-item:hover {
    transform: translateX(-5px) scale(1.02);
    border-color: rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, rgba(35, 35, 45, 0.95), rgba(40, 40, 50, 0.9));
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.error-menu-item .code {
    font-size: 24px;
    font-weight: 900;
    color: #d4af37;
    margin-right: 15px;
    min-width: 50px;
    text-align: center;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
    transition: all 0.3s ease;
}

.error-menu-item:hover .code {
    transform: scale(1.1);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.8);
}

.error-menu-item .info h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
    transition: color 0.3s ease;
}

.error-menu-item .info p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.error-menu-item:hover .info h3 {
    color: #d4af37;
}

.error-menu-item:hover .info p {
    color: rgba(255, 255, 255, 0.9);
}

.error-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    backdrop-filter: blur(2px);
}

.error-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

@keyframes portalOpen {
    0% {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* CSP-compliant classes for error menu */
.menu-open {
    overflow: hidden !important;
}

.menu-item-enter {
    opacity: 0;
    transform: translateX(50px);
}

.menu-item-active {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.quantum-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #d4af37;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    z-index: 10001;
}

@keyframes quantumFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
}