/* =========================================================
   UPCR ADVANCED EEG & BRAIN ATLAS
   Full-screen research console layout
   Sidebar removed from page flow
   Floating collapsible transparent top navigation
   Laptop-first / scalable for EEG overlays
========================================================= */

/* =========================================================
   UPCR ADVANCED EEG & BRAIN ATLAS
   FINAL CLEAN DESKTOP VERSION
========================================================= */

*{
  box-sizing:border-box;
  margin:0;
  padding:0;
  font-family:Arial, Helvetica, sans-serif;
}

html,
body{
  width:100%;
  min-height:100%;
  background:#020b14;
  color:#fff;
  overflow:hidden;
}

/* =========================================================
   MAIN PAGE
========================================================= */

body{
  background:
    radial-gradient(circle at 18% 12%, rgba(0,229,255,.16), transparent 34%),
    radial-gradient(circle at 86% 86%, rgba(255,120,160,.10), transparent 34%),
    linear-gradient(135deg,#020b14,#061b2e 55%,#020b14);
}

/* =========================================================
   MAIN LAYOUT
========================================================= */

.atlas-shell{
  width:100%;
  height:100vh;

  padding:18px;

  display:grid;
  grid-template-columns:minmax(0,1fr) 400px;
  gap:22px;

  align-items:start;
}

/* =========================================================
   REMOVE SIDEBAR
========================================================= */

.atlas-sidebar{
  display:none !important;
}

/* =========================================================
   CARD BASE
========================================================= */

.atlas-card{
  background:linear-gradient(180deg,rgba(255,255,255,.075),rgba(255,255,255,.025));
  border:1px solid rgba(255,255,255,.14);
  border-radius:28px;
  box-shadow:0 28px 90px rgba(0,0,0,.42);
  backdrop-filter:blur(18px);
  overflow:hidden;
}

/* =========================================================
   3D VIEWER
========================================================= */

.viewer-wrap{
  position:relative;

  height:calc(100vh - 36px);
  min-height:680px;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius:30px;
  overflow:hidden;

  background:
    radial-gradient(circle at center,rgba(0,229,255,.16),transparent 58%),
    radial-gradient(circle at bottom,rgba(255,120,160,.08),transparent 38%),
    linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.012));
}

.viewer-wrap::before{
  content:"";
  position:absolute;
  inset:20px;
  border-radius:24px;
  border:1px solid rgba(255,255,255,.05);
  pointer-events:none;
  z-index:2;
}

.viewer-wrap::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:1;

  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);

  background-size:42px 42px;
  opacity:.20;
}

#brainCanvas{
  width:100%;
  height:100%;
  display:block;
  position:relative;
  z-index:4;
}

/* =========================================================
   TOP TOOLBAR
========================================================= */

.viewer-overlay{
  position:absolute;
  top:22px;
  left:24px;
  right:160px;
  z-index:25;

  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.tool-btn{
  border:1px solid rgba(255,255,255,.16);
  background:rgba(0,0,0,.34);
  color:#fff;

  padding:10px 15px;
  border-radius:14px;

  font-size:13px;
  font-weight:800;

  cursor:pointer;
  transition:.25s ease;
  backdrop-filter:blur(14px);
}

.tool-btn:hover,
.tool-btn.active{
  background:#00e5ff;
  color:#061b2e;
  border-color:#00e5ff;
  box-shadow:0 0 22px rgba(0,229,255,.42);
}

/* =========================================================
   VIEW CONTROLS
========================================================= */

.view-controls{
  position:absolute;
  top:22px;
  right:24px;
  z-index:26;

  display:grid;
  gap:9px;
}

.view-controls .tool-btn{
  min-width:110px;
}

/* =========================================================
   BOTTOM EEG CONTROL PANEL
========================================================= */

.slice-panel{
  position:absolute;
  left:24px;
  right:24px;
  bottom:22px;
  z-index:25;

  display:grid;
  grid-template-columns:1fr 1fr;
  gap:22px;

  padding:16px 22px;
  border-radius:20px;

  background:rgba(0,0,0,.34);
  border:1px solid rgba(255,255,255,.10);
  backdrop-filter:blur(18px);
}

.slice-panel label{
  font-size:13px;
  color:#eefaff;
  font-weight:700;
}

.slice-panel input{
  width:100%;
  accent-color:#00e5ff;
  margin-top:9px;
}

/* =========================================================
   LOADING
========================================================= */

.viewer-loading{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  z-index:10;

  padding:14px 18px;
  border-radius:16px;

  background:rgba(0,0,0,.42);
  color:#d7eaf2;

  border:1px solid rgba(255,255,255,.12);
  backdrop-filter:blur(12px);

  font-weight:800;
  pointer-events:none;
}

.viewer-loading.hide{
  display:none;
}

/* =========================================================
   BRAIN LABELS
========================================================= */

.brain-label-layer{
  position:absolute;
  inset:0;
  z-index:12;
  pointer-events:none;
}

.brain-pin{
  position:absolute;
  pointer-events:auto;

  border:1px solid rgba(0,229,255,.65);
  background:rgba(0,0,0,.55);
  color:#fff;

  padding:7px 12px;
  border-radius:50px;

  font-size:12px;
  font-weight:800;

  cursor:pointer;
  box-shadow:0 0 20px rgba(0,229,255,.32);

  backdrop-filter:blur(12px);
  transition:.24s ease;
}

.brain-pin::before{
  content:"";
  position:absolute;
  width:9px;
  height:9px;
  border-radius:50%;
  background:#00e5ff;

  left:-8px;
  top:50%;

  transform:translateY(-50%);

  box-shadow:
    0 0 0 5px rgba(0,229,255,.16),
    0 0 16px #00e5ff;
}

.brain-pin:hover{
  background:#00e5ff;
  color:#061b2e;
  transform:scale(1.06);
}

/* =========================================================
   LABEL POSITIONS
========================================================= */

.pin-premotor{left:38%;top:31%}
.pin-prefrontal{left:19%;top:47%}
.pin-parietal{left:57%;top:35%}
.pin-temporal{left:42%;top:62%}
.pin-occipital{right:10%;top:51%}
.pin-cerebellum{right:24%;bottom:19%}

/* =========================================================
   RIGHT DETAIL PANEL
========================================================= */

.detail-panel{
  height:calc(100vh - 36px);
  min-height:680px;

  padding:26px;
}

.detail-scroll{
  max-height:calc(100vh - 90px);
  overflow:auto;
  padding-right:8px;
}

.detail-scroll::-webkit-scrollbar{
  width:6px;
}

.detail-scroll::-webkit-scrollbar-thumb{
  background:rgba(0,229,255,.45);
  border-radius:99px;
}

.detail-badge{
  display:inline-block;
  padding:9px 16px;
  border-radius:50px;

  background:rgba(0,229,255,.14);
  color:#00e5ff;

  font-size:12px;
  font-weight:800;

  margin-bottom:18px;
}

.detail-panel h2{
  font-size:36px;
  line-height:1.08;
  margin-bottom:12px;
}

.detail-subtitle{
  color:#9ff8ff;

  font-size:16px;
  line-height:1.5;
  font-weight:800;

  margin-bottom:18px;
}

.detail-panel p{
  color:#edfaff;

  font-size:15px;
  line-height:1.75;

  margin-bottom:20px;
}

.info-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;

  margin:20px 0 24px;
}

.mini-card{
  min-height:105px;

  background:rgba(255,255,255,.055);
  border:1px solid rgba(255,255,255,.11);

  border-radius:17px;
  padding:14px;
}

.mini-card strong{
  display:block;

  color:#00e5ff;
  font-size:11px;
  text-transform:uppercase;

  margin-bottom:8px;
}

.mini-card span{
  display:block;

  color:#fff;
  font-size:13px;
  line-height:1.45;
}

.detail-section{
  margin-top:20px;
}

.detail-section h3{
  color:#00e5ff;
  font-size:18px;
  margin-bottom:10px;
}

.detail-section ul{
  list-style:none;
  display:grid;
  gap:9px;
}

.detail-section li{
  color:#edfaff;

  font-size:14px;
  line-height:1.55;

  padding-left:17px;
  position:relative;
}

.detail-section li::before{
  content:"•";
  position:absolute;
  left:0;
  color:#00e5ff;
}

.atlas-note{
  margin-top:20px;

  padding:14px 16px;
  border-radius:15px;

  background:rgba(255,193,7,.10);
  color:#ffe9a6;

  font-size:13px;
  line-height:1.55;
}

/* =========================================================
   DESKTOP RECOMMENDATION
========================================================= */

.desktop-warning{
  display:none;
}

/* =========================================================
   MOBILE / TABLET BLOCK
========================================================= */

@media(max-width:1100px){

  body{
    overflow:hidden;
  }

  .atlas-shell{
    display:none !important;
  }

  .desktop-warning{
    position:fixed;
    inset:0;
    z-index:99999;

    display:flex;
    align-items:center;
    justify-content:center;

    padding:24px;

    background:
      radial-gradient(circle at top left, rgba(0,229,255,.18), transparent 34%),
      linear-gradient(135deg,#020b14,#061b2e);
  }

  .desktop-warning-box{
    width:100%;
    max-width:520px;

    padding:34px 28px;
    border-radius:28px;

    background:rgba(0,0,0,.45);
    border:1px solid rgba(255,255,255,.12);

    text-align:center;

    backdrop-filter:blur(18px);
    box-shadow:0 30px 80px rgba(0,0,0,.45);
  }

  .desktop-warning-box h2{
    font-size:30px;
    color:#00e5ff;
    margin-bottom:18px;
    line-height:1.1;
  }

  .desktop-warning-box p{
    color:#d7eaf2;
    font-size:15px;
    line-height:1.75;
    margin-bottom:16px;
  }

  .desktop-warning-note{
    color:#9ff8ff !important;
    font-weight:700;
  }
}




/* FLOAT SIDEBAR — DOES NOT TAKE SPACE */
.atlas-sidebar{
  position:fixed !important;
  top:22px;
  left:22px;
  z-index:9999;

  width:320px;
  max-height:calc(100vh - 44px);

  display:block !important;

  padding:16px;
  border-radius:22px;

  background:rgba(0,0,0,.42);
  border:1px solid rgba(255,255,255,.12);
  backdrop-filter:blur(18px);
  box-shadow:0 20px 60px rgba(0,0,0,.45);

  resize:both;
  overflow:auto;
}

/* MAIN LAYOUT ONLY VIEWER + DETAILS */
.atlas-shell{
  grid-template-columns:minmax(0,1fr) 400px !important;
}

/* OPTIONAL: collapse look */
.atlas-sidebar.collapsed{
  width:58px;
  height:58px;
  overflow:hidden;
  padding:10px;
}