.oracle-graph-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    background:
        radial-gradient(circle at 20% 18%, rgba(88, 188, 255, 0.15), transparent 30%),
        radial-gradient(circle at 82% 22%, rgba(136, 111, 255, 0.15), transparent 30%),
        radial-gradient(circle at 50% 100%, rgba(94, 255, 206, 0.12), transparent 40%),
        linear-gradient(180deg, #091221 0%, #060c17 50%, #03070d 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 0 20px rgba(0, 0, 0, 0.5), 0 24px 50px rgba(0, 0, 0, 0.4);
}

.oracle-graph-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(138, 198, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(138, 198, 255, 0.05) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(circle at center, rgba(0,0,0,0.95), rgba(0,0,0,0.45) 72%, transparent 100%);
    pointer-events: none;
    opacity: 0.45;
}

.oracle-graph-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), transparent 22%),
        radial-gradient(circle at center, transparent 58%, rgba(0,0,0,0.32) 100%);
    pointer-events: none;
}

.oracle-graph-wrapper canvas {
    display: block;
}

.oracle-graph-toolbar {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 20;
}

.oracle-graph-toggle-btn {
    appearance: none;
    border: 1px solid rgba(118, 177, 238, 0.18);
    background: rgba(7, 14, 26, 0.7);
    color: rgba(233, 242, 252, 0.82);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    user-select: none;
}

.oracle-graph-toggle-btn:hover {
    background: rgba(92, 170, 255, 0.14);
    border-color: rgba(132, 212, 255, 0.34);
    color: #fff;
}

.oracle-graph-toggle-btn.active {
    background: linear-gradient(135deg, rgba(63, 145, 255, 0.28), rgba(66, 226, 196, 0.18));
    border-color: rgba(142, 225, 255, 0.42);
    box-shadow: 0 0 12px rgba(92, 170, 255, 0.2), inset 0 1px 0 rgba(255,255,255,0.05);
    color: #fff;
}

.oracle-graph-side-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 360px;
    max-width: 45%;
    height: 100%;
    background: rgba(8, 10, 20, 0.94);
    border-right: 1px solid rgba(143, 156, 255, 0.15);
    backdrop-filter: blur(16px);
    z-index: 30;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.oracle-graph-side-panel.open {
    transform: translateX(0);
}

.oracle-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(143, 156, 255, 0.1);
    flex-shrink: 0;
}

.oracle-panel-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: relative;
    padding: 20px 20px 16px;
}

.oracle-panel-card-header .oracle-panel-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.oracle-panel-profile-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.oracle-panel-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.oracle-panel-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.oracle-panel-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 1px solid;
}

.oracle-panel-avatar-fallback .oracle-panel-icon-image {
    width: 24px;
    height: 24px;
}

.oracle-panel-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.oracle-panel-icon-image {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

.oracle-panel-header-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.oracle-panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.oracle-panel-subtitle {
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(143, 156, 255, 0.5);
    margin-top: 2px;
}

.oracle-panel-close {
    appearance: none;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(143, 156, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.oracle-panel-close:hover {
    background: rgba(255, 80, 80, 0.15);
    border-color: rgba(255, 80, 80, 0.3);
    color: #ff6b6b;
}

.oracle-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(143, 156, 255, 0.2) transparent;
}

.oracle-panel-body::-webkit-scrollbar {
    width: 5px;
}

.oracle-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.oracle-panel-body::-webkit-scrollbar-thumb {
    background: rgba(143, 156, 255, 0.2);
    border-radius: 4px;
}

.oracle-panel-section {
    margin-bottom: 16px;
}

.oracle-panel-section-label {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(143, 156, 255, 0.45);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(143, 156, 255, 0.08);
}

.oracle-panel-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.oracle-panel-field:last-child {
    border-bottom: none;
}

.oracle-panel-field-key {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.oracle-panel-field-value {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.5;
    word-break: break-word;
}

.oracle-panel-field-value.multiline {
    white-space: normal;
}

.oracle-panel-field-value a {
    color: #8f9cff;
    text-decoration: none;
    transition: color 0.2s;
}

.oracle-panel-field-value a:hover {
    color: #b0baff;
    text-decoration: underline;
}

.oracle-panel-connection-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.oracle-panel-connection-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid transparent;
}

.oracle-panel-connection-item:hover {
    background: rgba(143, 156, 255, 0.06);
    border-color: rgba(143, 156, 255, 0.1);
}

.oracle-panel-conn-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.oracle-panel-conn-icon .oracle-panel-icon-image {
    width: 14px;
    height: 14px;
}

.oracle-panel-image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.oracle-panel-image-item {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(143, 156, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    aspect-ratio: 1 / 1;
}

.oracle-panel-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.oracle-panel-conn-label {
    flex: 1;
    min-width: 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.82);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oracle-panel-conn-type {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.oracle-panel-conn-arrow {
    color: rgba(143, 156, 255, 0.3);
    font-size: 10px;
    flex-shrink: 0;
}

.oracle-panel-empty {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.78rem;
}

.oracle-graph-node-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: rgba(176, 222, 255, 0.46);
    z-index: 15;
    background: rgba(7, 13, 24, 0.72);
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgba(128, 190, 255, 0.12);
    backdrop-filter: blur(10px);
    pointer-events: none;
}

.oracle-report-graph-section:fullscreen .oracle-graph-wrapper {
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    flex: 1 1 auto;
    border-radius: 0;
}

.oracle-report-graph-section:fullscreen .oracle-graph-side-panel {
    max-width: 400px;
}

@media (max-width: 768px) {
    .oracle-graph-side-panel {
        width: 100%;
        max-width: 100%;
    }

    .oracle-graph-toolbar {
        top: 8px;
        right: 8px;
        gap: 4px;
    }

    .oracle-graph-toggle-btn {
        padding: 5px 10px;
        font-size: 0.58rem;
    }
}
