/* STREAMING_CHUNK:Setting up base CSS variables and fonts... */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
--nexus-navy: #22233F;
--nexus-gold: #D3AE35;
--nexus-white: #ffffff;
--nexus-bg: #F5F5F7;
}

@keyframes nexusFadeSlideUp {
from { opacity: 0; transform: translateY(15px); }
to { opacity: 1; transform: translateY(0); }
}

@keyframes nexusImageReveal {
from { opacity: 0; filter: blur(8px); }
to { opacity: 1; filter: blur(0); }
}

/* STREAMING_CHUNK:Styling main app container... */
#nexus-app-container {
font-family: 'Inter', sans-serif;
background-color: var(--nexus-bg);
padding: 20px;
border-radius: 0 !important;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
max-width: 1200px;
margin: 0 auto;
position: relative;
overflow: hidden;
height: 80vh;
min-height: 600px;
letter-spacing: 0.015em;
}

.nexus-sidebar-title,
.nexus-viewer-title h2,
.nexus-item-title {
font-family: 'custom font', 'Inter', sans-serif !important;
letter-spacing: 0.03em;
}

/* STREAMING_CHUNK:Styling flex layout and sidebar... */
.nexus-layout {
display: flex;
gap: 20px;
height: 100%;
}

.nexus-sidebar {
width: 320px;
background-color: var(--nexus-navy);
color: white;
border-radius: 0 !important;
display: flex;
flex-direction: column;
box-shadow: 5px 0 15px rgba(0,0,0,0.1);
flex-shrink: 0;
}

.nexus-sidebar-header {
padding: 20px;
border-bottom: 1px solid rgba(255,255,255,0.1);
display: flex;
align-items: center;
gap: 10px;
}

.nexus-sidebar-title {
font-size: 18px;
font-weight: bold;
margin: 0;
line-height: 1.2;
color: white !important;
}

.nexus-plan-list {
flex: 1;
overflow-y: auto;
padding: 10px;
}

/* STREAMING_CHUNK:Styling list items and active state... */
.nexus-plan-item {
padding: 15px;
margin-bottom: 8px;
border-radius: 0 !important;
cursor: pointer;
background: rgba(255,255,255,0.05);
transition: background 0.3s ease, box-shadow 0.3s ease;
border: 1px solid transparent;
opacity: 0;
animation: nexusFadeSlideUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.nexus-plan-item:hover {
background: rgba(255,255,255,0.1);
}

.nexus-plan-item.active {
background: linear-gradient(135deg, var(--nexus-gold), #b39225);
color: var(--nexus-navy);
box-shadow: 0 4px 10px rgba(211, 174, 53, 0.3);
}

.nexus-item-title {
font-weight: bold;
font-size: 15px;
display: block;
color: inherit;
letter-spacing: 0.02em;
}

.nexus-item-sub {
font-size: 11px;
opacity: 0.8;
color: inherit;
display: block;
margin-top: 2px;
letter-spacing: 0.01em;
}

/* STREAMING_CHUNK:Styling image viewer and controls... */
.nexus-viewer {
flex: 1;
background: var(--nexus-white);
border-radius: 0 !important;
display: flex;
flex-direction: column;
overflow: hidden;
box-shadow: 0 10px 25px rgba(34, 35, 63, 0.1);
position: relative;
min-width: 0;
}

.nexus-viewer-header {
padding: 14px 18px;
border-bottom: 1px solid #eceef3;
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
align-items: center;
background: #ffffff;
z-index: 10;
}

.nexus-viewer-title {
flex: 1;
min-width: 0;
padding-right: 18px;
}

.nexus-viewer-title h2 {
margin: 0;
color: #31364b;
font-size: 18px;
font-weight: 500;
line-height: 1.15;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.nexus-badge {
display: inline-block;
background: #fbf2d8;
color: #d4a62e;
padding: 4px 8px 3px;
border-radius: 0 !important;
font-size: 10px;
font-weight: 700;
text-transform: uppercase;
margin-top: 8px;
letter-spacing: 0.04em;
}

.nexus-controls {
display: flex;
gap: 12px;
align-items: center;
flex-shrink: 0;
flex-wrap: wrap;
justify-content: flex-end;
}

.nexus-action-buttons,
.nexus-zoom-controls {
display: flex;
align-items: center;
gap: 8px;
}

.nexus-action-buttons {
gap: 6px;
}

.nexus-btn {
padding: 0 14px;
border: none;
border-radius: 0 !important;
cursor: pointer;
font-weight: 700;
font-size: 12px;
text-decoration: none;
transition: 0.2s;
white-space: nowrap;
letter-spacing: 0;
background-color: var(--nexus-navy);
color: var(--nexus-white) !important;
display: inline-flex;
align-items: center;
justify-content: center;
line-height: 1;
gap: 7px;
height: 39px;
box-shadow: none;
min-width: 116px;
}

.nexus-btn:visited,
.nexus-btn:focus,
.nexus-btn:active {
color: var(--nexus-white) !important;
text-decoration: none;
}

.nexus-btn:hover {
background-color: #15162b;
color: var(--nexus-white) !important;
text-decoration: none;
}

.nexus-btn-icon {
width: 14px;
height: 14px;
line-height: 1;
display: inline-flex;
align-items: center;
justify-content: center;
color: inherit;
}

.nexus-btn-icon svg {
width: 14px;
height: 14px;
display: block;
}

.nexus-btn-download {
background: #232542;
color: #d4af37 !important;
}

.nexus-btn-download:hover {
background: #1d1f37;
color: #d4af37 !important;
}

.nexus-btn-whatsapp {
background: #2bd160;
color: #ffffff !important;
}

.nexus-btn-whatsapp:hover {
background: #27c35a;
color: #ffffff !important;
}

.nexus-zoom-controls {
gap: 6px;
padding: 0;
background: transparent;
border: 0;
}

#nexus-zoom-display,
.nexus-zoom-btn {
height: 39px;
}

#nexus-zoom-display {
min-width: 46px;
text-align: center;
font-weight: 700;
color: #2d3142;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0 4px;
background: transparent;
border: 0;
font-size: 12px;
}

.nexus-zoom-btn {
min-width: 39px;
padding: 0;
border: 1px solid #d8dce4;
background: #ffffff;
color: #34384d;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 18px;
font-weight: 600;
cursor: pointer;
transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.nexus-zoom-btn:hover {
background: #f8f9fb;
border-color: #cfd5df;
}

/* STREAMING_CHUNK:Styling canvas and image bounds... */
.nexus-canvas {
flex: 1;
overflow: hidden;
position: relative;
background-color: #f9fafb;
cursor: grab;
width: 100%;
height: 100%;
background-image:
linear-gradient(rgba(34, 35, 63, 0.05) 1px, transparent 1px),
linear-gradient(90deg, rgba(34, 35, 63, 0.05) 1px, transparent 1px);
background-size: 40px 40px;
}

.nexus-canvas:active {
cursor: grabbing;
}

.nexus-canvas img {
max-width: 95%;
max-height: 95%;
object-fit: contain;
filter: drop-shadow(0 15px 25px rgba(0,0,0,0.1));
transform-origin: center center;
pointer-events: none;
user-select: none;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(1);
opacity: 0;
}

.nexus-canvas img.animate-reveal {
animation: nexusImageReveal 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* STREAMING_CHUNK:Adding mobile responsive styles... */
@media (max-width: 1024px) {
#nexus-app-container {
height: auto;
min-height: 0;
padding: 16px;
}

.nexus-layout {
gap: 16px;
}

.nexus-sidebar {
width: 280px;
}

.nexus-viewer-header {
flex-wrap: wrap;
align-items: flex-start;
gap: 12px;
}

.nexus-viewer-title {
width: 100%;
padding-right: 0;
}

.nexus-controls {
width: 100%;
justify-content: flex-start;
}
}

@media (max-width: 768px) {
#nexus-app-container {
height: auto;
padding: 12px;
min-height: auto;
}

.nexus-layout {
flex-direction: column;
height: auto;
gap: 15px;
}

.nexus-sidebar {
width: 100%;
height: auto;
max-height: none;
}

.nexus-viewer {
height: auto;
min-height: 70vh;
display: flex;
flex-direction: column;
}

.nexus-canvas {
flex: 1;
min-height: 420px;
}

.nexus-viewer-header {
flex-wrap: wrap;
gap: 10px;
padding: 14px;
}

.nexus-viewer-title {
width: 100%;
margin-bottom: 5px;
}

.nexus-controls {
width: 100%;
justify-content: flex-start;
align-items: stretch;
gap: 10px;
flex-direction: column;
}

.nexus-action-buttons,
.nexus-zoom-controls {
width: 100%;
flex-wrap: nowrap;
}

.nexus-action-buttons {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px;
}

.nexus-zoom-controls {
display: grid;
grid-template-columns: 39px minmax(52px, auto) 39px 39px;
justify-content: start;
gap: 6px;
}

.nexus-btn {
min-width: 0;
width: 100%;
}

.nexus-btn {
padding: 10px 12px;
font-size: 11px;
height: 38px;
}

.nexus-plan-list {
max-height: 320px;
}

.nexus-viewer-title h2 {
font-size: 18px;
white-space: normal;
overflow: visible;
text-overflow: unset;
}
}

@media (max-width: 480px) {
#nexus-app-container {
padding: 10px;
}

.nexus-sidebar-header {
padding: 16px;
}

.nexus-plan-item {
padding: 12px;
}

.nexus-item-title {
font-size: 14px;
}

.nexus-item-sub {
font-size: 10px;
}

.nexus-controls {
display: grid;
grid-template-columns: minmax(0, 1fr) 150px;
align-items: start;
gap: 8px;
}

.nexus-action-buttons,
.nexus-zoom-controls {
width: 100%;
}

.nexus-action-buttons {
grid-template-columns: 1fr;
gap: 6px;
}

.nexus-zoom-controls {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 6px;
}

.nexus-btn,
#nexus-zoom-display,
.nexus-zoom-btn {
width: 100%;
min-height: 40px;
min-width: 0;
}

.nexus-btn {
font-size: 10px;
padding: 0 8px;
justify-content: center;
gap: 5px;
}

.nexus-btn-icon,
.nexus-btn-icon svg {
width: 12px;
height: 12px;
}

.nexus-btn span:last-child {
overflow: hidden;
text-overflow: ellipsis;
}

#nexus-zoom-display {
background: #eef1f6;
border: 1px solid #d8dce4;
padding: 0;
font-size: 11px;
}

.nexus-canvas {
min-height: 320px;
}
}
