* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background-color: #1e293b;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
}

body.light-theme {
    background-color: #f8fafc;
    color: #0f172a;
}

.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #334155;
}

body.light-theme .app-container {
    background-color: #ffffff;
}

/* Top Header */
.top-header {
    background-color: #13253f;
    border-bottom: 1px solid #475569;
    padding: 8px 16px;
    height: 48px;
    display: flex;
    align-items: center;
}

body.light-theme .top-header {
    background-color: #e2e8f0;
    border-bottom-color: #cbd5e1;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.graphs-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.graphs-label {
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 400;
}

body.light-theme .graphs-label {
    color: #1f2937;
}

.graphs-select {
    background-color: #475569;
    color: #f1f5f9;
    border: 1px solid #64748b;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    min-width: 180px;
    outline: none;
}

body.light-theme .graphs-select {
    background-color: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
}

.load-button {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}

.header-buttons {
    display: flex;
    gap: 4px;
}

.header-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Layout */
.main-layout {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Graph Container */
.graph-container {
    flex: 1;
    background-color: #1e293b;
    position: relative;
    overflow: hidden;
}

body.light-theme .graph-container {
    background-color: #ffffff;
}

/* Cytoscape canvas */
#cy {
    width: 100%;
    height: 100%;
}

/* Graph overlay logo */
.graph-logo {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: inline-block;
    z-index: 10;
}

.graph-logo img {
    width: 60px;
    height: auto;
    display: block;
}




.tour-start-btn {
    position: absolute;
    bottom: 80%;
    left: 10%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 2.4rem;
    height: 3.5rem;
    border: none;
    border-radius: 9px;
    background-image: linear-gradient(92.88deg, #455EB5 9.16%, #5643CC 43.89%, #673FD7 64.72%);
    color: #ffffff;
    font-family: "Inter UI", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-shadow: rgba(0, 0, 0, 0.25) 0 3px 8px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 20;
}

.tour-start-btn:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 18px 30px rgba(80, 63, 205, 0.45);
}

@media (max-width: 640px) {
    .tour-start-btn {
        width: calc(100% - 48px);
        padding: 0 1.4rem;
    }
}











/* .tour-start-btn {
    
    position: absolute;
    bottom: 80%;
    left: 10%;
    transform: translateX(-50%);
    background-color: rgba(59, 130, 246, 0.85);
    color: #000408;
    border: none;
    border-radius: 0px;
    padding: 10px 28px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    transition: background-color 0.2s ease, transform 0.2s ease;
} */

/* .tour-start-btn:hover {
    background-color: rgba(37, 99, 235, 0.95);
} */

.tour-start-btn.hidden {
    display: none;
}

body.light-theme .tour-start-btn {
    background-image: linear-gradient(92.88deg, #2563EB 9.16%, #4F46E5 43.89%, #7C3AED 64.72%);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
}

.tour-highlight-overlay {
    position: fixed;
    pointer-events: none;
    z-index: 2500;
    opacity: 0;
    border-radius: 12px;
    box-sizing: border-box;
    outline: 3px solid #38bdf8;
    box-shadow: 0 0 0 8px rgba(56, 189, 248, 0.28);
    transition: opacity 0.2s ease;
}

.tour-highlight-overlay.active {
    opacity: 1;
}

body.light-theme .tour-highlight-overlay {
    box-shadow: 0 0 0 8px rgba(56, 189, 248, 0.35);
}

/* Product tour overlay */
.tour-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.tour-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.tour-overlay.with-hole {
    background: transparent;
    backdrop-filter: none;
}

.tour-overlay-segment {
    position: fixed;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    pointer-events: none;
    display: none;
}

.tour-bubble {
    position: fixed;
    max-width: 340px;
    background-color: rgba(15, 23, 42, 0.95);
    color: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.4);
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tour-bubble.active {
    opacity: 1;
    pointer-events: auto;
}

.tour-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.tour-text {
    margin-bottom: 12px;
}

.tour-description {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.tour-controls {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.tour-btn {
    flex: 1;
    background-color: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.tour-btn.secondary {
    background-color: rgba(148, 163, 184, 0.4);
    color: #e2e8f0;
}

.tour-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.tour-demo-link {
    display: none;
    width: 100%;
    margin-top: 10px;
    text-decoration: none;
    padding: 10px 0;
    border-radius: 8px;
    background-color: #0ea5e9;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease;
    justify-content: center;
    align-items: center;
}

.tour-demo-link:hover {
    background-color: #0284c7;
}

body.light-theme .tour-bubble {
    background-color: rgba(255, 255, 255, 0.98);
    color: #0f172a;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.15);
}

body.light-theme .tour-btn.secondary {
    background-color: rgba(226, 232, 240, 0.8);
    color: #1e293b;
}

body.light-theme .tour-btn {
    background-color: #2563eb;
}

/* Right Sidebar */
.right-sidebar {
    width: 280px;
    background-color: #13253f;
    border-left: 1px solid #475569;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

body.light-theme .right-sidebar {
    background-color: #f1f5f9;
    border-left-color: #cbd5e1;
}

/* Brand Header */
.brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.sidebar-logo {
    width: 100%;
    height: auto;
    display: block;
}

.brand-icon {
    flex-shrink: 0;
}

.brand-text {
    flex: 1;
}

.brand-title {
    font-size: 20px;
    font-weight: 700;
    color: #22d3ee;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 16px;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

body.light-theme .brand-subtitle {
    color: #1f2937;
}

/* Section Header */
.section-header {
    font-size: 16px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid #475569;
}

body.light-theme .section-header {
    color: #1f2937;
    border-bottom-color: #cbd5e1;
}

/* Sidebar Sections */
.sidebar-section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 12px;
    padding-bottom: 4px;
    border-bottom: 1px solid #475569;
}

body.light-theme .section-title {
    color: #1f2937;
    border-bottom-color: #cbd5e1;
}

/* Node List */
.node-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.node-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.node-indicator {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.node-indicator.green {
    background-color: #22c55e;
}

.node-indicator.orange {
    background-color: #f59e0b;
}

.node-indicator.cyan {
    background-color: #06b6d4;
}

.node-indicator.purple {
    background-color: #9333ea;
}

.node-text {
    color: #cbd5e1;
    font-size: 14px;
}

body.light-theme .node-text {
    color: #334155;
}

.subtypes-text {
    color: #94a3b8;
    font-size: 12px;
    font-style: italic;
}

body.light-theme .subtypes-text {
    color: #64748b;
}

/* Edge List */
.edge-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.edge-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.edge-line {
    width: 20px;
    height: 2px;
    flex-shrink: 0;
}

.edge-line.solid {
    background-color: #25f382;
}

.edge-line.solid2 {
    background-color: #3d5045;
}

.edge-line.dashed {
    background: repeating-linear-gradient(
        to right,
        #64748b 0px,
        #64748b 4px,
        transparent 4px,
        transparent 8px
    );
}

.edge-line.dotted {
    background: repeating-linear-gradient(
        to right,
        #64748b 0px,
        #64748b 2px,
        transparent 2px,
        transparent 4px
    );
}

.edge-line.purple-line {
    background-color: #9333ea;
}

.edge-text {
    color: #cbd5e1;
    font-size: 14px;
}

body.light-theme .edge-text {
    color: #475569;
}

/* Selection Info */
.selection-info {
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    margin-bottom: 4px;
    font-size: 14px;
}

.info-label {
    color: #94a3b8;
    min-width: 50px;
}

body.light-theme .info-label {
    color: #64748b;
}

.info-value {
    color: #f1f5f9;
    font-weight: 500;
}

body.light-theme .info-value {
    color: #1f2937;
}

/* JSON Block */
.json-block {
    background-color: #1e293b;
    border: 1px solid #475569;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 16px;
}

body.light-theme .json-block {
    background-color: #ffffff;
    border-color: #cbd5e1;
}

.json-content {
    color: #e2e8f0;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

body.light-theme .json-content {
    color: #334155;
}

/* Buttons */
.button-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.action-btn {
    flex: 1;
    background-color: #475569;
    color: #f1f5f9;
    border: 1px solid #64748b;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
}

body.light-theme .action-btn {
    background-color: #e2e8f0;
    color: #0f172a;
    border-color: #cbd5e1;
}

.action-btn:hover {
    background-color: #64748b;
}

body.light-theme .action-btn:hover {
    background-color: #cbd5e1;
}

.theme-btn {
    width: 100%;
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 8px;
}

/* Bottom Network Icon */
.bottom-network-icon {
    margin-top: auto;
    display: flex;
    justify-content: center;
    padding-top: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
    .right-sidebar {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }
    
    .right-sidebar {
        width: 100%;
        height: 300px;
    }
}
