@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css');

:root {
    --primary-accent: rgb(118, 185, 0);
    --nvidia-green: rgb(118, 185, 0);
    --card-radius: 10px;
    --bg-body: rgb(244, 246, 249);
    --bg-surface: rgb(255, 255, 255);
    --bg-elevated: rgb(248, 250, 252);
    --text-main: rgb(17, 24, 39);
    --text-muted: rgb(107, 114, 128);
    --border-color: rgb(226, 232, 240);
}

[data-theme="dark"] {
    --bg-body: rgb(11, 14, 20);
    --bg-surface: rgb(21, 25, 33);
    --bg-elevated: rgb(30, 36, 48);
    --text-main: rgb(243, 244, 246);
    --text-muted: rgb(156, 163, 175);
    --border-color: rgb(42, 50, 65);
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.bg-surface {
    background-color: var(--bg-surface) !important;
    color: var(--text-main) !important;
    border-radius: var(--card-radius);
}

.border {
    border-color: var(--border-color) !important;
}

.text-nvidia {
    color: var(--primary-accent) !important;
}

.bg-nvidia {
    background-color: var(--primary-accent) !important;
    color: rgb(255, 255, 255) !important;
}

.border-nvidia {
    border-color: var(--primary-accent) !important;
}

.btn-nvidia {
    background-color: var(--primary-accent);
    color: rgb(255, 255, 255);
    font-weight: 600;
    border: 1px solid var(--primary-accent);
    border-radius: calc(var(--card-radius) * 0.75);
    transition: all 0.18s ease;
}

.btn-nvidia:hover,
.btn-nvidia:focus {
    background-color: rgb(93, 148, 0);
    border-color: rgb(93, 148, 0);
    color: rgb(255, 255, 255);
    transform: translateY(-1px);
}

.btn-outline-nvidia {
    color: var(--primary-accent);
    border: 1px solid var(--primary-accent);
    background: transparent;
    font-weight: 600;
}

.btn-outline-nvidia:hover {
    background-color: var(--primary-accent);
    color: rgb(255, 255, 255);
}

.text-muted {
    color: var(--text-muted) !important;
}

.form-control,
.form-select {
    background-color: var(--bg-surface);
    color: var(--text-main);
    border-color: var(--border-color);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--bg-surface);
    color: var(--text-main);
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 0.2rem rgba(118, 185, 0, 0.2);
}

.table {
    color: var(--text-main);
    border-color: var(--border-color);
}

.nividax-header-wrap {
    background: rgb(15, 19, 26);
    color: rgb(255, 255, 255);
    border-bottom: 2px solid var(--primary-accent);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.nividax-topbar {
    background: rgb(8, 10, 15);
    font-size: 0.75rem;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nividax-topbar a {
    color: rgb(209, 213, 219);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s;
}

.nividax-topbar a:hover {
    color: var(--primary-accent);
}

.nividax-mainbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
}

.nividax-brand-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: rgb(255, 255, 255);
    flex-shrink: 0;
    padding-top: 2px;
}

.nividax-search-wrap {
    flex: 1 1 auto;
    max-width: 470px;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.search-history-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding-left: 2px;
    font-size: 0.7rem;
    line-height: 1.2;
}

.search-kw-link {
    color: rgb(186, 230, 253);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 0.15s ease;
    white-space: nowrap;
}

.search-kw-link:hover {
    color: var(--primary-accent);
}

.search-kw-clear {
    color: rgb(156, 163, 175);
    text-decoration: none;
    font-size: 0.66rem;
    cursor: pointer;
}

.search-kw-clear:hover {
    color: rgb(248, 113, 113);
}

.nividax-actions-box {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    flex-shrink: 0;
    padding-top: 3px;
}

.nividax-logo-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-accent), rgb(59, 102, 0));
    color: rgb(255, 255, 255);
    font-weight: 900;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.header-xu-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(118, 185, 0, 0.16);
    border: 1px solid var(--primary-accent);
    color: rgb(217, 249, 157);
    font-weight: 700;
    font-size: 0.78rem;
    text-decoration: none;
    white-space: nowrap;
}

.header-xu-pill:hover {
    background: rgba(118, 185, 0, 0.28);
    color: rgb(255, 255, 255);
}

.btn-checkin-sparkle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    border: 1px solid rgb(250, 204, 21);
    background: linear-gradient(135deg, rgb(245, 158, 11), rgb(234, 179, 8));
    color: rgb(17, 24, 39);
    cursor: pointer;
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.7);
    animation: checkinPulseGlow 1.6s infinite ease-in-out;
    white-space: nowrap;
}

.btn-checkin-sparkle .sparkle-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgb(220, 38, 38);
}

.btn-checkin-done {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgb(55, 65, 81);
    background: rgb(31, 41, 55);
    color: rgb(156, 163, 175);
    cursor: pointer;
    white-space: nowrap;
}

@keyframes checkinPulseGlow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(250, 204, 21, 0.5);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 0 16px rgba(250, 204, 21, 0.9);
    }
}

.nividax-catbar {
    background: rgb(20, 25, 35);
    padding: 5px 0;
    font-size: 0.78rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nividax-catbar a {
    color: rgb(229, 231, 235);
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 5px;
    white-space: nowrap;
    transition: all 0.15s;
}

.nividax-catbar a:hover {
    background: rgba(118, 185, 0, 0.18);
    color: var(--primary-accent);
}

@media (max-width: 991px) {
    .nividax-mainbar {
        flex-wrap: wrap;
    }
    .nividax-search-wrap {
        order: 3;
        max-width: 100%;
        width: 100%;
    }
}

.nividax-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 13, 22, 0.72);
    backdrop-filter: blur(4px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.nividax-modal-overlay.d-none {
    display: none !important;
}

.nividax-modal-card {
    width: min(440px, 95vw);
    background: var(--bg-surface);
    color: var(--text-main);
    border: 2px solid var(--primary-accent);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    animation: modalPopIn 0.2s ease-out;
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.nividax-toast-container {
    position: fixed;
    top: 76px;
    right: 20px;
    z-index: 21000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nividax-toast-item {
    min-width: 260px;
    max-width: 380px;
    background: var(--bg-surface);
    color: var(--text-main);
    border-left: 5px solid var(--primary-accent);
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    font-size: 0.85rem;
    font-weight: 600;
}

.store-chat-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9990;
    background: linear-gradient(135deg, var(--primary-accent), rgb(77, 124, 15));
    color: rgb(255, 255, 255);
    border: 2px solid rgb(255, 255, 255);
    border-radius: 999px;
    padding: 9px 18px;
    font-weight: 700;
    font-size: 0.86rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.store-chat-drawer {
    position: fixed;
    bottom: 74px;
    right: 20px;
    width: min(370px, calc(100vw - 32px));
    height: 450px;
    background: var(--bg-surface);
    color: var(--text-main);
    border: 2px solid var(--primary-accent);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    z-index: 9995;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.skeleton-box {
    background: linear-gradient(90deg, rgba(128,128,128,0.12) 25%, rgba(128,128,128,0.24) 50%, rgba(128,128,128,0.12) 75%);
    background-size: 200% 100%;
    animation: skelShimmer 1.4s infinite;
    border-radius: 8px;
}

@keyframes skelShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
