:root {
    --top-height: 40px;
    --bottom-height: 50px;
    --crosshair-size: 100px;
    --crosshair-secondary-size: 150px;
    --portal-scale: 1;
}

#windows-left { order: 0; }
#navigation-window { order: 1; }
#windows-right { order: 2; }

body {
    margin: 0;
    overflow-x: hidden;
    overflow-y: hidden;
}

.container {
    box-sizing: border-box;
    min-height: 100dvh;
    width: 100%;
}

.windows-container {
    display: grid;
    grid: 100vh / 1fr 2.2fr 1fr;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    box-sizing: border-box;
    overflow: hidden;
}

.base-window {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--cosmic-purple);
    color: var(--toxic-green);
    margin: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    font-size: 0.9em;
    background-color: rgba(5, 2, 10, 0.85);
    backdrop-filter: blur(10px);
}

.base-window h1 {
    font-family: "Silkscreen", monospace;
    text-align: left;
    margin: 0;
    font-size: 1em;
}

.windows-column .base-window {
    border-radius: 0;
}

.window-title {
    background: linear-gradient(180deg, var(--cosmic-purple) 0%, rgba(100, 10, 150, 0.8) 100%);
    display: flex;
    align-items: center;
    padding: 4px 8px;
    height: 24px;
}

.window-title h1 {
    flex-grow: 1;
    color: white;
    text-shadow: 0px 0px 5px var(--cosmic-purple);
}

.window-content {
    padding: 10px;
    box-sizing: border-box;
}

.windows-column {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    position: relative;
    justify-content: flex-start;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 15px 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--cosmic-purple) var(--deep-void);
}

/* Custom Thematic Scrollbars */
.windows-column::-webkit-scrollbar {
    width: 10px;
}
.windows-column::-webkit-scrollbar-track {
    background: var(--deep-void);
    border-left: 1px solid var(--cosmic-purple);
}
.windows-column::-webkit-scrollbar-thumb {
    background: var(--cosmic-purple);
    border: 1px solid var(--toxic-green);
}
.windows-column::-webkit-scrollbar-thumb:hover {
    background: var(--toxic-green);
}

.windows-content {
    display: flex;
    flex-direction: column;
    gap: 1em;
    width: 100%;
    height: auto;
}

.view-all {
    border-top: 1px solid var(--cosmic-purple);
    background-color: black;
    padding: 6px 0px;
    box-sizing: border-box;
    height: fit-content;
    text-align: center;
}

.view-all p {
    margin: 0;
    color: var(--toxic-green);
    font-family: "Silkscreen", monospace;
}

.view-all:hover {
    background-color: var(--cosmic-purple);
}

.view-all:hover p {
    color: white;
    text-shadow: 0 0 5px white;
}

/* NAVIGATION TOP */
#navigation-top {
    display: flex;
    justify-content: center;
    height: var(--top-height);
    border: 1px solid var(--cosmic-purple);
    border-bottom: none;
    position: relative;
    background: linear-gradient(180deg, rgb(5, 2, 10) 0%, rgba(80, 5, 110, 0.3) 100%);
    box-sizing: border-box;
}

#navigation-title {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

#navigation-title h1 {
    font-family: "Cinzel", serif;
    font-size: 1.1em;
    color: var(--toxic-green);
    text-shadow: 0px 0px 8px var(--toxic-green);
    margin: 0;
}

#top-nav {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 8px;
    align-items: center;
    height: 100%;
    margin-right: 15px;
}

.top-nav-link {
    display: block;
    color: var(--toxic-green);
    font-family: "Silkscreen", monospace;
    font-size: 0.8em;
}

/* PORTALS AREA */
#navigation-window {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100% - 1px);
    box-sizing: border-box;
}

#portals-window {
    width: 100%;
    height: 100%;
    position: relative;
    background: black;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0px 0px 40px inset rgba(80, 5, 110, 0.4);
}

.portals-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.portal {
    position: absolute;
    box-sizing: border-box;
}

.portal-indicator {
    position: relative;
    z-index: 90;
    width: 50%;
    height: 50%;
}

.portal-indicator-right {
    float: right;
}

.portal-name {
    color: var(--toxic-green);
    border: 1px solid var(--cosmic-purple);
    padding: 4px 8px;
    position: absolute;
    margin: 0;
    background-color: var(--deep-void);
    z-index: 100;
    font-family: 'Silkscreen', monospace;
    font-size: 0.8em;
    white-space: nowrap;
    box-shadow: 0 0 5px rgba(80, 5, 110, 0.5);
}

.portal-line {
    color: var(--cosmic-purple);
    border-top: 1px dashed var(--cosmic-purple);
    width: 180%;
    transform-origin: 0% 0%;
    transform: rotate(45deg);
    position: absolute;
    z-index: 0;
    top: 0%;
}

.portal-indicator-right .portal-line {
    transform-origin: 100% 0%;
    right: 0%;
    transform: rotate(-45deg);
}

.portal-indicator-right .portal-name {
    right: 0%;
}

.portal-node {
    border-radius: 100%;
    border: 2px solid var(--cosmic-purple);
    background-color: black;
    z-index: 99;
    position: absolute;
    width: calc(100% - 2em);
    aspect-ratio: 1;
    transition: transform 0.5s, box-shadow 0.5s;
    box-shadow: 0 0 10px rgba(80, 5, 110, 0.3);
}

.portal-node-right {
    bottom: 0%;
    right: 0%;
}

.portal-node-left {
    bottom: 0%;
    left: 0%;
}

.portal-link:hover .portal-name {
    border-color: var(--toxic-green);
    background-color: var(--toxic-green);
    color: black;
    box-shadow: 0 0 10px var(--toxic-green);
}

.portal-link:hover .portal-node {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--toxic-green);
    border-color: var(--toxic-green);
}

/* CROSSHAIR MOUSE */
.portal-crosshair, .portal-crosshair-secondary {
    position: absolute;
    box-sizing: border-box;
    transform: translate(-50%, -50%);
    z-index: 0;
    border-radius: 100%;
    pointer-events: none;
}

.portal-crosshair {
    width: var(--crosshair-size);
    height: var(--crosshair-size);
    border: 1px solid var(--toxic-green);
    background-color: rgba(57, 255, 20, 0.05);
    mix-blend-mode: screen;
}

.portal-crosshair-secondary {
    width: var(--crosshair-secondary-size);
    height: var(--crosshair-secondary-size);
    border: 1px dashed var(--cosmic-purple);
    background-color: rgba(80, 5, 110, 0.03);
    mix-blend-mode: screen;
}

/* DIAGNOSTICS */
#diagnostics-window {
    border-top: none;
    font-size: 0.8em;
    background: rgba(5, 2, 10, 0.9);
}

.diagnostics-content {
    display: flex;
    justify-content: space-around;
    padding: 6px;
}

.diagnostics-content p {
    margin: 0;
    color: #a090a0;
}

.diagnostics-title {
    font-weight: bold;
    color: var(--toxic-green);
}

/* DIALS (Cosmic Rings background) */
.dial-large-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.25;
}

.dial-large {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px dashed var(--cosmic-purple);
    border-radius: 100%;
    animation: spin 180s linear infinite;
}

.dial-1 { width: 90%; height: 90%; border-color: rgba(80, 5, 110, 0.3); }
.dial-2 { width: 70%; height: 70%; border-color: rgba(25, 110, 8, 0.2); animation-direction: reverse; animation-duration: 120s; }
.dial-3 { width: 50%; height: 50%; border-color: rgba(80, 5, 110, 0.4); animation-duration: 90s; }

/* WIDGET SPECIFICS */
#quote {
    color: #e0d0f0;
    font-style: italic;
    text-align: center;
    line-height: 1.4;
}

#changelog-list {
    width: 100%;
    border-collapse: collapse;
}

#changelog-list td {
    padding: 6px 4px;
    font-size: 0.85em;
    border-bottom: 1px dashed rgba(80, 5, 110, 0.2);
}

.changelog-date {
    color: var(--cosmic-purple);
    width: 80px;
}

.changelog-content {
    color: var(--toxic-green);
}

/* LATEST COGNITION (BLOG ENTRY CARD) */
.lg-entry {
    background: rgba(80, 5, 110, 0.05);
    border: 1px solid var(--cosmic-purple);
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s;
}

.lg-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(80, 5, 110, 0.3);
}

.lg-entry-header-content {
    padding: 10px;
}

.lg-entry-date {
    font-size: 0.75em;
    color: var(--cosmic-purple);
}

.lg-entry-title {
    font-family: "Silkscreen", monospace;
    font-size: 1.1em;
    margin: 6px 0;
    color: var(--toxic-green);
}

.lg-entry-tags {
    font-size: 0.8em;
    color: #a0a0c0;
}

/* STAMPS & BADGES */
#artifacts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.badge-item {
    border: 1px solid var(--cosmic-purple);
    padding: 2px;
    background: #000;
}

/* RESPONSIVENESS */
@media screen and (max-width: 1024px) {
    .windows-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        overflow-y: auto;
    }
    #navigation-window { grid-row: 1; }
    #windows-left { grid-row: 2; }
    #windows-right { grid-row: 3; }
    #portals-window { height: 75dvh; }
}
