/* ==================== DROPDOWN NAVIGATION ==================== */
.nav-dropdown {
    position: relative;
}
.nav-dropdown-toggle {
    cursor: pointer;
    user-select: none;
}
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 1000;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5), 0 0 20px rgba(0,255,65,0.05);
    backdrop-filter: blur(20px);
}
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    font-family: var(--font-mono);
    transition: all 0.2s ease;
    white-space: nowrap;
}
.dropdown-item:hover {
    color: var(--green);
    background: rgba(0,255,65,0.05);
    padding-left: 24px;
}
.dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--green);
    opacity: 0.7;
}
.dropdown-item:hover i {
    opacity: 1;
}

/* ==================== NAV ACTIVE STATE ==================== */
.nav-link.active {
    color: var(--green) !important;
    position: relative;
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--green);
    border-radius: 1px;
    box-shadow: 0 0 8px var(--green-glow);
}

/* ==================== MOBILE DROPDOWN ==================== */
@media (max-width: 768px) {
    .nav-dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        background: rgba(0,255,65,0.03);
        border: none;
        border-left: 2px solid var(--green);
        border-radius: 0;
        margin: 5px 0 5px 15px;
        padding: 5px 0;
        box-shadow: none;
        display: none;
    }
    .nav-dropdown-menu::before {
        display: none;
    }
    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown.active .nav-dropdown-menu {
        display: block;
        transform: none;
    }
    .dropdown-item {
        padding: 8px 15px;
        font-size: 12px;
    }
}

/* ==================== SEARCH BAR (NAV) ==================== */
.nav-search {
    position: relative;
    margin-left: 10px;
}
.nav-search input {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px 6px 32px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 12px;
    width: 160px;
    transition: all 0.3s ease;
    outline: none;
}
.nav-search input:focus {
    border-color: var(--green);
    width: 220px;
    box-shadow: 0 0 15px rgba(0,255,65,0.1);
}
.nav-search i {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 12px;
    pointer-events: none;
}

/* ==================== NOTIFICATION BADGE ==================== */
.cart-badge {
    background: var(--red, #ff0040);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    margin-left: 4px;
    min-width: 16px;
    text-align: center;
    display: inline-block;
    line-height: 14px;
}
.cart-badge:empty {
    display: none;
}

/* ==================== SCROLL ANIMATIONS ==================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}
.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ==================== GLITCH EFFECT ==================== */
@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}
.glitch-hover:hover {
    animation: glitch 0.3s ease;
}

/* ==================== TYPING EFFECT ==================== */
@keyframes blink-caret {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--green); }
}
.typing-cursor::after {
    content: '█';
    color: var(--green);
    animation: blink-caret 0.8s step-end infinite;
    font-weight: 400;
}

/* ==================== PULSE GLOW ==================== */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(0,255,65,0.2); }
    50% { box-shadow: 0 0 20px rgba(0,255,65,0.4), 0 0 40px rgba(0,255,65,0.1); }
}
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ==================== MATRIX RAIN BG ==================== */
@keyframes matrix-fall {
    0% { transform: translateY(-100%); opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

/* ==================== SKELETON LOADING ==================== */
@keyframes skeleton-pulse {
    0%, 100% { background-position: -200% 0; }
    50% { background-position: 200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--surface) 25%, rgba(0,255,65,0.05) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 4px;
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--green);
    border-radius: 8px;
    padding: 14px 20px;
    min-width: 280px;
    max-width: 400px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 13px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 12px;
}
.toast.show {
    transform: translateX(0);
}
.toast.toast-error {
    border-left-color: var(--red, #ff0040);
}
.toast.toast-warning {
    border-left-color: #ffcc00;
}
.toast-icon {
    font-size: 18px;
    color: var(--green);
}
.toast-error .toast-icon { color: var(--red, #ff0040); }
.toast-warning .toast-icon { color: #ffcc00; }
.toast-close {
    margin-left: auto;
    cursor: pointer;
    color: var(--text-dim);
    padding: 4px;
}
.toast-close:hover { color: var(--text-bright); }

/* ==================== IMPROVED BUTTONS ==================== */
.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--green);
    color: var(--green);
    padding: 10px 24px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-outline:hover {
    background: rgba(0,255,65,0.1);
    box-shadow: 0 0 20px rgba(0,255,65,0.2);
    transform: translateY(-1px);
}
.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}
.btn-lg {
    padding: 14px 32px;
    font-size: 15px;
}
.btn-danger {
    background: rgba(255,0,64,0.15);
    border-color: var(--red, #ff0040);
    color: var(--red, #ff0040);
}
.btn-danger:hover {
    background: rgba(255,0,64,0.25);
    box-shadow: 0 0 20px rgba(255,0,64,0.2);
}

/* ==================== IMPROVED TABLES ==================== */
.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 13px;
}
.data-table th {
    background: rgba(0,255,65,0.05);
    color: var(--green);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0,255,65,0.05);
    color: var(--text);
}
.data-table tr:hover td {
    background: rgba(0,255,65,0.03);
}
.data-table tr:last-child td {
    border-bottom: none;
}

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}
.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}
.modal-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--green);
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--red, #ff0040); }

/* ==================== TAGS / BADGES ==================== */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tag-green { background: rgba(0,255,65,0.15); color: var(--green); }
.tag-red { background: rgba(255,0,64,0.15); color: var(--red, #ff0040); }
.tag-blue { background: rgba(0,204,255,0.15); color: #00ccff; }
.tag-yellow { background: rgba(255,204,0,0.15); color: #ffcc00; }
.tag-purple { background: rgba(128,0,255,0.15); color: #8000ff; }
.tag-orange { background: rgba(255,102,0,0.15); color: #ff6600; }

/* ==================== PROGRESS BAR ==================== */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green), #00ccff);
    border-radius: 3px;
    transition: width 0.6s ease;
    position: relative;
}
.progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    animation: progress-shine 1.5s ease-in-out infinite;
}
@keyframes progress-shine {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}
.empty-state i {
    font-size: 48px;
    color: var(--green);
    opacity: 0.3;
    margin-bottom: 20px;
}
.empty-state h3 {
    color: var(--text-bright);
    margin-bottom: 10px;
}
.empty-state p {
    max-width: 400px;
    margin: 0 auto 20px;
    line-height: 1.6;
}