@import url(font-awesome.min.css);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=latin,latin-ext);

/* CSS Variables for JARVIS Cards */
:root {
    --bg: #020806;
    --accent: #1cb495;
    --accent-rgb: 28, 180, 149;
}

/* Reset */

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 98%;
    font: inherit;
    vertical-align: baseline;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
    display: block;
}

body {
    line-height: 1;
}

ol, ul {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

blockquote:before, blockquote:after, q:before, q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

body {
    -webkit-text-size-adjust: none;
}

/* Box Model */

*, *:before, *:after {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* Basic */

@-ms-viewport {
    width: device-width;
}

body {
    -ms-overflow-style: scrollbar;
    font-family: 'Open Sans', sans-serif;
}

html, body {
    height: 100%;
    overflow-x: hidden;
    width: 100%;
}

    @media screen and (max-height: 640px) {

        html, body {
            height: auto;
            min-height: 100%;
        }

    }

body {
    display: -moz-flex;
    display: -webkit-flex;
    display: -ms-flex;
    display: flex;
    /*flex-direction: row | row-reverse | column | column-reverse;*/
    -moz-flex-direction: column;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    /*justify-content: flex-start | flex-end | center | space-between | space-around;*/
    -moz-justify-content: flex-start;
    -webkit-justify-content: flex-start;
    -ms-justify-content: flex-start;
    justify-content: flex-start;
    background-color: var(--bg, #000);
    background-image:
        radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), 0.05) 0%, transparent 60%),
        linear-gradient(rgba(var(--accent-rgb), 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--accent-rgb), 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 30px 30px, 30px 30px;
    background-position: center center;

    padding: 6em 4em 4em 4em;
}

@-webkit-keyframes slide {
    from {  }
    to {  }
    0%   {background-position: 0; opacity:0;}
    50%  {opacity:0.5;}
    100% {background-position: -1280px; opacity:0;}
}

body > img,
body > header,
body > footer{
    position: relative;
    z-index: 2;
}
body > canvas {
z-index: 0;
}
body.is-loading *, body.is-loading *:before, body.is-loading *:after {
    -moz-animation: none !important;
    -webkit-animation: none !important;
    -ms-animation: none !important;
    animation: none !important;
    -moz-transition: none !important;
    -webkit-transition: none !important;
    -ms-transition: none !important;
    transition: none !important;
}

/* WebGL Canvas */
canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Control Panel Overlay */
#control-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 300px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(28, 180, 149, 0.25);
    border-radius: 14px;
    padding: 18px;
    z-index: 10000;
    color: #e0e0e0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#control-panel::-webkit-scrollbar {
    width: 6px;
}

#control-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

#control-panel::-webkit-scrollbar-thumb {
    background: rgba(28, 180, 149, 0.3);
    border-radius: 3px;
}

#control-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(28, 180, 149, 0.5);
}

#control-panel.collapsed {
    transform: translateX(calc(-100% - 40px));
    opacity: 0;
    pointer-events: none;
}

/* Panel Toggle Button (always visible) */
#panel-toggle-btn {
    position: fixed;
    bottom: 50vh;
    left: 2em;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(28, 180, 149, 0.3);
    border-radius: 10px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #1cb495;
    font-size: 19.50px;
    cursor: pointer;
    z-index: 10000001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#panel-toggle-btn:hover {
    background: rgba(28, 180, 149, 0.15);
    border-color: #1cb495;
    box-shadow: 0 4px 16px rgba(28, 180, 149, 0.2);
}

#panel-toggle-btn .toggle-icon {
    transition: transform 0.3s ease;
}

#panel-toggle-btn.panel-open {
    left: 336px; /* 300px panel width + 20px margin + 16px offset */
}

#panel-toggle-btn.panel-open .toggle-icon {
    transform: rotate(90deg);
}

/* Auto-Cycle Button */
#auto-cycle-btn {
    position: fixed;
    bottom: 8em;
    right: 20px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(28, 180, 149, 0.3);
    border-radius: 10px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #1cb495;
    font-size: 19.50px;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#auto-cycle-btn:hover {
    background: rgba(28, 180, 149, 0.15);
    border-color: #1cb495;
    box-shadow: 0 4px 16px rgba(28, 180, 149, 0.2);
}

#auto-cycle-btn.cycling {
    animation: pulse-glow 1s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(28, 180, 149, 0.2);
    }
    50% {
        box-shadow: 0 4px 20px rgba(28, 180, 149, 0.5);
    }
}

/* Floating Auto-Cycle Button (duplicate control) */
#auto-cycle-floating-btn {
    position: fixed;
    bottom: 8em;
    right: 20px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(28, 180, 149, 0.3);
    border-radius: 10px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #1cb495;
    font-size: 19.50px;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

#auto-cycle-floating-btn:hover {
    background: rgba(28, 180, 149, 0.15);
    border-color: #1cb495;
    box-shadow: 0 4px 16px rgba(28, 180, 149, 0.2);
}

#auto-cycle-floating-btn.cycling {
    animation: pulse-glow 1s ease-in-out infinite;
}

/* Clear History Floating Button */
#clear-history-floating-btn {
    position: fixed;
    bottom: 8em;
    right: 75px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(28, 180, 149, 0.3);
    border-radius: 10px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #1cb495;
    font-size: 19.50px;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

#clear-history-floating-btn:hover {
    background: rgba(28, 180, 149, 0.15);
    border-color: #1cb495;
    box-shadow: 0 4px 16px rgba(28, 180, 149, 0.2);
}

@media screen and (max-width: 768px) {
    #auto-cycle-floating-btn {
        bottom: 75px;
        width: 40px;
        height: 40px;
    }

    #clear-history-floating-btn {
        bottom: 75px;
        right: 65px;
        width: 40px;
        height: 40px;
    }
}

/* Panel Header */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(28, 180, 149, 0.15);
}

.panel-header h2 {
    font-size: 14.62px;
    font-weight: 600;
    color: #1cb495;
    letter-spacing: 0.5px;
}

/* Control Sections */
.control-section {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.control-section:last-of-type {
    margin-bottom: 14px;
}

.section-title {
    font-size: 9.75px;
    font-weight: 600;
    color: rgba(28, 180, 149, 0.7);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 12px;
}

/* Control Group */
.control-group {
    margin-bottom: 14px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10.73px;
    font-weight: 500;
    color: #a0a0a0;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.control-group label span {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    color: #1cb495;
    font-weight: 400;
    font-size: 10.73px;
}

/* Range Sliders */
input[type="range"] {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

input[type="range"]:hover {
    background: rgba(255, 255, 255, 0.12);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #1cb495;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 6px rgba(28, 180, 149, 0.4);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 10px rgba(28, 180, 149, 0.6);
}

input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.05);
}

input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #1cb495;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Color Picker */
input[type="color"] {
    width: 100%;
    height: 32px;
    border: 1px solid rgba(28, 180, 149, 0.25);
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    padding: 2px;
    transition: border-color 0.2s ease;
}

input[type="color"]:hover {
    border-color: rgba(28, 180, 149, 0.5);
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1cb495;
    cursor: pointer;
    border-radius: 3px;
}

.checkbox-wrapper span {
    font-size: 11.70px;
    color: #b0b0b0;
    user-select: none;
}

/* Shader Controls Container */
#shader-controls {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stage Transition Buttons */
.stage-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.stage-btn {
    flex: 1;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(28, 180, 149, 0.25);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 10.73px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.stage-btn:hover:not(:disabled) {
    background: rgba(28, 180, 149, 0.1);
    border-color: rgba(28, 180, 149, 0.4);
    color: rgba(255, 255, 255, 0.85);
}

.stage-btn.active {
    background: linear-gradient(135deg, rgba(28, 180, 149, 0.25), rgba(28, 180, 149, 0.15));
    border-color: #1cb495;
    color: #1cb495;
    box-shadow: 0 2px 12px rgba(28, 180, 149, 0.25);
}

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

.stage-btn:active:not(:disabled) {
    transform: scale(0.96);
}


/* Type */

body, input, select, textarea {
    color: rgba(255, 255, 255, 0.75);
    font-family: "Open Sans", sans-serif;
    font-size: 15.60pt;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.65em;
}

a {
    -moz-transition: border-bottom-color 0.2s ease, color 0.2s ease;
    -webkit-transition: border-bottom-color 0.2s ease, color 0.2s ease;
    -ms-transition: border-bottom-color 0.2s ease, color 0.2s ease;
    transition: border-bottom-color 0.2s ease, color 0.2s ease;
    border-bottom: dotted 1px rgba(255, 255, 255, 0.25);
    color: #1cb495;
    text-decoration: none;
}

a:hover {
    border-bottom-color: transparent;
    color: #1cb495 !important;
    text-decoration: none;
}

strong, b {
    color: #dfdfdf;
    font-weight: 700;
}

em, i {
    font-style: italic;
}

p {
    margin: 0 0 2em 0;
}

h1, h2, h3, h4, h5, h6 {
    color: #d0d0d0;
    font-weight: 700;
    line-height: 1em;
    margin: 0 0 1em 0;
}

h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    color: inherit;
    text-decoration: none;
}

h1 {
    font-size: 4.88em;
    line-height: 1.25em;
}

h2 {
    font-size: 1.70em;
    line-height: 1.5em;
}

h3 {
    font-size: 1.32em;
    line-height: 1.5em;
}

h4 {
    font-size: 1.07em;
    line-height: 1.5em;
}

h5 {
    font-size: 0.88em;
    line-height: 1.5em;
}

h6 {
    font-size: 0.68em;
    line-height: 1.5em;
}

sub {
    font-size: 0.78em;
    position: relative;
    top: 0.5em;
}

sup {
    font-size: 0.78em;
    position: relative;
    top: -0.5em;
}

blockquote {
    border-left: solid 8px rgba(255, 255, 255, 0.35);
    /* font-style: italic; */
    margin: 0 0 2em 0;
    padding: 0.5em 0 0.5em 2em;
}

code {
    background: rgba(255, 255, 255, 0.125);
    border-radius: 6px;
    border: solid 2px rgba(255, 255, 255, 0.35);
    font-family: "Courier New", monospace;
    font-size: 0.88em;
    margin: 0 0.25em;
    padding: 0.25em 0.65em;
}

pre {
    -webkit-overflow-scrolling: touch;
    font-family: "Courier New", monospace;
    font-size: 0.88em;
    margin: 0 0 2em 0;
}

pre code {
    display: block;
    line-height: 1.75em;
    padding: 1em 1.5em;
    overflow-x: auto;
}

hr {
    border: 0;
    border-bottom: solid 2px rgba(255, 255, 255, 0.35);
    margin: 2em 0;
}

hr.major {
    margin: 3em 0;
}

/* Section/Article */

section.special, article.special {
    text-align: center;
}

header p {
    color: rgba(255, 255, 255, 0.5);
    position: relative;
    margin: 0 0 1.5em 0;
}

header h2 + p {
    font-size: 1.22em;
    margin-top: -1em;
    line-height: 1.5em;
}

header h3 + p {
    font-size: 1.07em;
    margin-top: -0.8em;
    line-height: 1.5em;
}

header h4 + p,
header h5 + p,
header h6 + p {
    font-size: 0.88em;
    margin-top: -0.6em;
    line-height: 1.5em;
}

/* Icon */

.icon {
    text-decoration: none;
    border-bottom: none;
    position: relative;
}

.icon:before {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    font-family: FontAwesome;
    font-style: normal;
    font-weight: normal;
    text-transform: none !important;
}

.icon > .label {
    display: none;
}

/* List */

ol {
    list-style: decimal;
    margin: 0 0 2em 0;
    padding-left: 1.25em;
}

    ol li {
        padding-left: 0.25em;
    }

ul {
    list-style: disc;
    margin: 0 0 2em 0;
    padding-left: 1em;
}

ul li {
    padding-left: 0.5em;
}

ul.icons {
    cursor: default;
    list-style: none;
    padding-left: 0;
}

ul.icons li {
    display: inline-block;
    padding: 0 1em 0 0;
}

ul.icons li:last-child {
    padding-right: 0;
}

ul.icons li .icon:before {
    font-size: 1.22em;
}

ul.icons li a {
    color: inherit;
}

/* Form */

form {
    margin: 0 0 2em 0;
}

form .message {
    text-decoration: none;
    -moz-transition: opacity 0.2s ease-in-out, -moz-transform 0.2s ease-in-out;
    -webkit-transition: opacity 0.2s ease-in-out, -webkit-transform 0.2s ease-in-out;
    -ms-transition: opacity 0.2s ease-in-out, -ms-transform 0.2s ease-in-out;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    -moz-transform: scale(1.05);
    -webkit-transform: scale(1.05);
    -ms-transform: scale(1.05);
    transform: scale(1.05);
    height: 2.75em;
    line-height: 2.75em;
    opacity: 0;
}

form .message:before {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    font-family: FontAwesome;
    font-style: normal;
    font-weight: normal;
    text-transform: none !important;
}

form .message:before {
    margin-right: 0.5em;
}

form .message.visible {
    -moz-transform: scale(1);
    -webkit-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1);
    opacity: 1;
}

form .message.success {
    color: #1cb495;
}

form .message.success:before {
    content: '\f00c';
}

form .message.failure {
    color: #ff2361;
}

form .message.failure:before {
    content: '\f119';
}

label {
    color: #fff;
    display: block;
    font-size: 0.88em;
    font-weight: 700;
    margin: 0 0 1em 0;
}

@-moz-keyframes focus {
    0% {
        -moz-transform: scale(1);
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        transform: scale(1);
    }

    50% {
        -moz-transform: scale(1.025);
        -webkit-transform: scale(1.025);
        -ms-transform: scale(1.025);
        transform: scale(1.025);
    }

    100% {
        -moz-transform: scale(1);
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        transform: scale(1);
    }
}

@-webkit-keyframes focus {
    0% {
        -moz-transform: scale(1);
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        transform: scale(1);
    }

    50% {
        -moz-transform: scale(1.025);
        -webkit-transform: scale(1.025);
        -ms-transform: scale(1.025);
        transform: scale(1.025);
    }

    100% {
        -moz-transform: scale(1);
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        transform: scale(1);
    }
}

@-ms-keyframes focus {
    0% {
        -moz-transform: scale(1);
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        transform: scale(1);
    }

    50% {
        -moz-transform: scale(1.025);
        -webkit-transform: scale(1.025);
        -ms-transform: scale(1.025);
        transform: scale(1.025);
    }

    100% {
        -moz-transform: scale(1);
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        transform: scale(1);
    }
}

@keyframes focus {
    0% {
        -moz-transform: scale(1);
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        transform: scale(1);
    }

    50% {
        -moz-transform: scale(1.025);
        -webkit-transform: scale(1.025);
        -ms-transform: scale(1.025);
        transform: scale(1.025);
    }

    100% {
        -moz-transform: scale(1);
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        transform: scale(1);
    }
}

/* input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
    -moz-appearance: none;
    -webkit-appearance: none;
    -ms-appearance: none;
    appearance: none;
    -moz-transform: scale(1);
    -webkit-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1);
    -moz-transition: border-color 0.2s ease, background-color 0.2s ease;
    -webkit-transition: border-color 0.2s ease, background-color 0.2s ease;
    -ms-transition: border-color 0.2s ease, background-color 0.2s ease;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    background-color: transparent;
    border-radius: 6px;
    border: none;
    border: solid 2px rgba(0, 0, 0, 0.35);
    color: inherit;
    display: block;
    outline: 0;
    padding: 0 1em;
    text-decoration: none;
    width: 100%;
    font-style: italic;
}
input[type="text"]:invalid,
input[type="password"]:invalid,
input[type="email"]:invalid,
select:invalid,
textarea:invalid {
    box-shadow: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    -moz-animation: focus 0.1s;
    -webkit-animation: focus 0.1s;
    -ms-animation: focus 0.1s;
    animation: focus 0.1s;
    background-color: rgba(255, 255, 255, 0.125);
    border-color: #1cb495;
} */

.select-wrapper {
    text-decoration: none;
    display: block;
    position: relative;
}

.select-wrapper:before {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    font-family: FontAwesome;
    font-style: normal;
    font-weight: normal;
    text-transform: none !important;
}

.select-wrapper:before {
    color: rgba(255, 255, 255, 0.35);
    content: '\f078';
    display: block;
    height: 2.75em;
    line-height: 2.75em;
    pointer-events: none;
    position: absolute;
    right: 0;
    text-align: center;
    top: 0;
    width: 2.75em;
}

.select-wrapper select::-ms-expand {
    display: none;
}
/*
input[type="text"],
input[type="password"],
input[type="email"],
select {
    height: 2.75em;
}

textarea {
    padding: 0.75em 1em;
}

input[type="checkbox"],
input[type="radio"] {
    -moz-appearance: none;
    -webkit-appearance: none;
    -ms-appearance: none;
    appearance: none;
    display: block;
    float: left;
    margin-right: -2em;
    opacity: 0;
    width: 1em;
    z-index: -1;
}

input[type="checkbox"] + label,
input[type="radio"] + label {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    display: inline-block;
    font-size: 0.98em;
    font-weight: 400;
    padding-left: 2.4em;
    padding-right: 0.75em;
    position: relative;
}

input[type="checkbox"] + label:before,
input[type="radio"] + label:before {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    font-family: FontAwesome;
    font-style: normal;
    font-weight: normal;
    text-transform: none !important;
}

input[type="checkbox"] + label:before,
input[type="radio"] + label:before {
    background: rgba(255, 255, 255, 0.125);
    border-radius: 6px;
    border: solid 2px rgba(255, 255, 255, 0.35);
    content: '';
    display: inline-block;
    height: 1.65em;
    left: 0;
    line-height: 1.58125em;
    position: absolute;
    text-align: center;
    top: 0;
    width: 1.65em;
}

input[type="checkbox"]:checked + label:before,
input[type="radio"]:checked + label:before {
    background: #1cb495;
    border-color: #1cb495;
    color: #ffffff;
    content: '\f00c';
}

input[type="checkbox"]:focus + label:before,
input[type="radio"]:focus + label:before {
    border-color: #1cb495;
    box-shadow: 0 0 0 2px #1cb495;
}

input[type="checkbox"] + label:before {
    border-radius: 6px;
}

input[type="radio"] + label:before {
    border-radius: 100%;
}

::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1.0;
}

:-moz-placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1.0;
}

::-moz-placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1.0;
}

:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1.0;
}

.formerize-placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1.0;
} */

/* Button */

input[type="submit"],
input[type="reset"],
input[type="button"],
button,
.button {
    -moz-appearance: none;
    -webkit-appearance: none;
    -ms-appearance: none;
    appearance: none;
    -moz-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, opacity 0.2s ease-in-out;
    -webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, opacity 0.2s ease-in-out;
    -ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, opacity 0.2s ease-in-out;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, opacity 0.2s ease-in-out;
    background-color: #1cb495;
    border-radius: 6px;
    border: 0;
    color: #ffffff !important;
    cursor: pointer;
    display: inline-block;
    font-weight: 700;
    height: 2.75em;
    line-height: 2.75em;
    padding: 0 1.125em;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    opacity: 0.75;
}

input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
button:hover,
.button:hover {
    background-color: #1fcaa7;
    opacity: 0.95;
}

input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active,
button:active,
.button:active {
    background-color: #199e83;
}

input[type="submit"].disabled, input[type="submit"]:disabled,
input[type="reset"].disabled,
input[type="reset"]:disabled,
input[type="button"].disabled,
input[type="button"]:disabled,
button.disabled,
button:disabled,
.button.disabled,
.button:disabled {
    opacity: 0.5;
}

/* Logo */
img.logo {
    position: fixed;
    top: 50%;
    left: 50%;
    max-width: 50%;
    -moz-transform: translateX(-18%) translateY(-50%);
    -webkit-transform: translateX(-18%) translateY(-50%);
    -ms-transform: translateX(-18%) translateY(-50%);
    transform: translateX(-18%) translateY(-50%);
}
/* CSS3D Renderer overlay */
/* CSS3D renderer removed - header now rendered via canvas texture mesh */

/* Header in 3D scene — now rendered via canvas texture, hidden from DOM */
#header {
    display: none;
    /* Remove layout assumptions for document flow */
    padding: 0;
    white-space: nowrap; /* prevent wrapping in 3D space */
    background: transparent;
    opacity: 1;          /* opacity controlled by canvas material, not CSS */
}

#header h1 {
    font-size: 7.31em;
    min-height: 4em;
    margin: 0 0 0.55em 0;
    color:rgba(0,0,0,.35);
    display: none;
}

#header p {
    font-size: 1.32em;
    line-height: 1.45em;
    color: #1cb495;
    opacity: .85;
    text-align: right;
}
#header strong {
    font-size: 1.00em;
}

#header a {
    color: inherit;
}

@media screen and (max-width: 736px) {
    #header {
        padding-left: 0em;
    }
    #header h1 {
        font-size: 5.85rem;
    }
    #header p {
        font-size: 0.98em;
    }
}

@media screen and (max-width: 480px) {
    #header {
        margin: 0 0 1em 0;
    }

    #header h1 {
        font-size: 2.92rem;
    }
}

/* Button */
button.action-btn {
    width: 100%;
    padding: 11px 18px;
    background: linear-gradient(135deg, rgba(28, 180, 149, 0.15), rgba(28, 180, 149, 0.08));
    border: 1px solid rgba(28, 180, 149, 0.3);
    border-radius: 8px;
    color: #1cb495;
    font-size: 10.73px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 6px;
}

button.action-btn:hover {
    background: linear-gradient(135deg, rgba(28, 180, 149, 0.25), rgba(28, 180, 149, 0.12));
    border-color: rgba(28, 180, 149, 0.5);
    box-shadow: 0 4px 16px rgba(28, 180, 149, 0.2);
}

button.action-btn:active {
    transform: scale(0.98);
}

/* Mobile Toggle Button */
#mobile-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(28, 180, 149, 0.3);
    border-radius: 10px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(10px);
    color: #1cb495;
    font-size: 19.50px;
    cursor: pointer;
    z-index: 101;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#mobile-toggle:hover {
    background: rgba(28, 180, 149, 0.1);
    border-color: #1cb495;
}

/* Info Text */
.info-text {
    position: fixed;
    bottom: 16px;
    left: 16px;
    font-size: 9.75px;
    color: rgba(160, 160, 160, 0.5);
    z-index: 50;
    letter-spacing: 0.3px;
}

.info-text a {
    color: rgba(28, 180, 149, 0.5);
    text-decoration: none;
    transition: color 0.2s ease;
}

.info-text a:hover {
    color: #1cb495;
}


/* Footer */

#footer {
    -moz-transition: opacity 0.5s ease-in-out;
    -webkit-transition: opacity 0.5s ease-in-out;
    -ms-transition: opacity 0.5s ease-in-out;
    transition: opacity 0.5s ease-in-out;
    position: fixed;
width: 100%;
right: 0;
    bottom: 0;
    left: 0;
    color: rgba(255, 255, 255, 0.5);
padding: 1em 2em 0em;
    opacity: 0.5;
    z-index: 10005;
}

#footer .icons {
    margin: 0 0 0.5em 0;
    float: right;
}

#footer .copyright {
    font-size: 0.78em;
    list-style: none;
    padding: 0;
    float:left;
    cursor: help!important;
}

#footer .copyright li {
    border-left: solid 1px rgba(255, 255, 255, 0.25);
    display: inline-block;
    line-height: 1em;
    margin: 0 0 0 0.75em;
    padding: 0 0 0 0.75em;
    cursor: help!important;
}

#footer .copyright li:first-child {
    border-left: 0;
    margin-left: 0;
    padding-left: 0;
}

#footer .copyright a {
    color: inherit;
    cursor: help;
    transition: all 0.3s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
}

#footer .copyright a:hover {
    color: #1cb495;
    text-decoration: underline;
}

/* Question mark arrow indicator on hover */
#footer .copyright a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s ease;
    font-size: 0.9em;
}

#footer .copyright a:hover::after {
    content: ' ↗';
    opacity: 1;
    transform: translateX(0);
}

#footer:hover {
    opacity: 1;
}

#footer > :last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 480px) {
    #control-panel {
        top: 60px;
        left: 0;
        width: 100%;
        max-width: none;
        max-height: 70vh;
        border-radius: 0 0 14px 14px;
        padding: 14px 18px 18px;
    }

    #control-panel.collapsed {
        transform: translateY(-100%);
    }

    #panel-toggle-btn {
        top: auto;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
    }

    #panel-toggle-btn.panel-open {
        left: 50%;
        transform: translateX(-50%);
    }

    #mobile-toggle {
        display: none;
    }

    .info-text {
        bottom: 10px;
        left: 10px;
        right: 10px;
        text-align: center;
    }

    .section-title {
        font-size: 8.77px;
    }

    .control-group label {
        font-size: 9.75px;
    }

    /* Mobile nav: top-right, vertical stack */
    .connectome-nav {
        top: 12px;
        left: auto;
        right: 12px;
        width: auto;
        justify-content: flex-end;
    }

    .nav-container {
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-start;
        gap: 0.25rem;
        padding: 0;
    }

    .nav-link {
        display: block;
        width: 100%;
        text-align: right;
        font-size: 0.78rem;
        padding: 6px 8px;
    }
}

@media screen and (max-width: 480px) {
    html, body {
        min-width: 320px;
    }
}
@media screen and (max-width: 1680px) {
    body {
        padding: 0 3.5em 3.5em 3.5em;
    }
}

@media screen and (max-width: 736px) {
    body {
        padding: 0 2em 2em 2em;
    }
}

@media screen and (max-width: 360px) {
    body {
        padding: 0 1.25em 1.25em 1.25em;
    }
}

@media screen and (max-width: 1680px) {
    body, input, select, textarea {
        font-size: 11.70pt;
    }
}

@media screen and (max-width: 1280px) {
    body, input, select, textarea {
        font-size: 10.73pt;
    }
}

@media screen and (max-width: 980px) {
    body, input, select, textarea {
        /*font-size: 11.70pt;*/
    }
}

@media screen and (max-width: 736px) {
    body, input, select, textarea {
        font-size: 11.70pt;
    }
}

@media screen and (max-width: 480px) {
    body, input, select, textarea {
        font-size: 11.70pt;
    }
}

@media screen and (max-width: 980px) {
    header br {
        /*display: none;*/
    }
}

@media screen and (max-width: 736px) {
    header br {
        display: inline;
    }
}

@media screen and (max-width: 480px) {
    header br {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    input[type="submit"],
    input[type="reset"],
    input[type="button"],
    button,
    .button {
        padding: 0;
    }
}

@media screen and (max-width: 1680px) {
    #footer {
    }
}

@media screen and (max-width: 736px) {
    #footer {
    }
}

@media screen and (max-width: 360px) {
    #footer {
    }
}

@media screen and (max-height: 640px) {
}

/* High DPI adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    input[type="range"] {
        height: 3px;
    }

    input[type="range"]::-webkit-slider-thumb {
        width: 12px;
        height: 12px;
    }
}

/* GCP Status Indicator */
#gcp-status-indicator {
    position: fixed;
    bottom: 7em;
    right: 20px;
    padding: 8px 12px;
    font-size: 10.73px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    border: 1px solid rgba(28, 180, 149, 0.3);
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #a0a0a0;
    z-index: 99;
    transition: all 0.3s ease;
    cursor: help;
}

#gcp-status-indicator.status-clear {
    color: #1cb495;
    border-color: rgba(28, 180, 149, 0.5);
    box-shadow: 0 2px 8px rgba(28, 180, 149, 0.15);
}

#gcp-status-indicator.status-active {
    color: #ff6b5b;
    border-color: rgba(255, 107, 91, 0.5);
    box-shadow: 0 2px 8px rgba(255, 107, 91, 0.2);
    animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

#gcp-status-indicator:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28, 180, 149, 0.25);
}

/* Connectome Top Navigation */
.connectome-nav {
    position: fixed;
    top: 24px;
    left: 80px;
    right: 1em;
    height: auto;
    background: transparent;
    z-index: 10010;
    display: flex;
    align-items: flex-end;
    justify-content: end;
    animation: navFadeIn 1.2s ease-out forwards;
    opacity: 0;
}

.nav-container {
    display: flex;
    align-items: flex-end;
    justify-content: end;
    gap: 0;
    padding: 0 1rem;
    flex-wrap: wrap;
}

.nav-link {
    font-size: 0.98rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    border: none;
    padding: 2px 12px;
    transition: color 0.2s ease;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.5);
}

.nav-link:active {
    color: rgba(255, 255, 255, 0.5);
}

/* Active navigation link state */
.nav-link.active {
    color: #1cb495;
    background: rgba(0, 0, 0, 0.3);
}
.nav-link:before {
    display: none;
    position: absolute;
    margin-left: calc(-100% + (-4em));
    content: '!#/usr/bin/env';
    /* animation: navFadeIn 1.2s ease-out forwards; */
    /* color: rgba(28, 180, 149, 0)!important; */
    /* opacity: 0; */
}
.nav-link.active:before {
    /* display: block; */
    /* color: rgba(28, 180, 149, .5)!important; */
    /* opacity: 1; */
}

/* Adjust body padding to account for fixed nav */
body {
    padding-top: 0 !important;
}

/* C Signet Standalone Viewer */
#csignet-viewer {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 80px;
    height: 80px;
    overflow: hidden;
    /* border: 1px solid rgba(28, 180, 149, 0.3); */
    /* border-radius: 4px; */
    background-color: transparent;
    /* box-shadow: 0 0 20px rgba(28, 180, 149, 0.1); */
    z-index: 10001;
}

#csignet-viewer canvas {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 3px;
}

@media screen and (max-width: 768px) {
    #csignet-viewer {
        width: 240px;
        height: 240px;
        bottom: 15px;
        right: 15px;
    }
}

@media screen and (max-width: 480px) {
    #csignet-viewer {
        width: 160px;
        height: 160px;
        bottom: 10px;
        right: 10px;
    }
}

/* ========================================
   JARVIS CARD STYLES - EXACT from standalone.html
   ======================================== */

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes scanline {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Grid */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Card */
.card {
    position: relative;
    overflow: hidden;
    background: rgba(2, 8, 6, 0.8);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 340px;
    cursor: crosshair;
    backdrop-filter: blur(4px);
    transition:
        border-color 0.5s ease,
        box-shadow 0.5s ease;
}

.card:hover {
    border-color: var(--accent);
    box-shadow:
        0 0 30px rgba(var(--accent-rgb), 0.3),
        inset 0 0 20px rgba(var(--accent-rgb), 0.1);
}

.corner {
    position: absolute;
    width: 1.5rem;
    height: 1.5rem;
    border-color: rgba(var(--accent-rgb), 0.5);
    border-style: solid;
    transition:
        width 0.3s ease,
        height 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
    pointer-events: none;
}

.card:hover .corner {
    width: 2rem;
    height: 2rem;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.8);
}

.corner--tl {
    top: 0;
    left: 0;
    border-width: 2px 0 0 2px;
}
.corner--tr {
    top: 0;
    right: 0;
    border-width: 2px 2px 0 0;
}
.corner--bl {
    bottom: 0;
    left: 0;
    border-width: 0 0 2px 2px;
}
.corner--br {
    bottom: 0;
    right: 0;
    border-width: 0 2px 2px 0;
}

.scanline {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(var(--accent-rgb), 0.1),
        transparent
    );
    transform: translateY(-100%);
    pointer-events: none;
    opacity: 0;
}

.card:hover .scanline {
    opacity: 1;
    animation: scanline 2.5s linear infinite;
}

.hud {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.card:hover .hud {
    opacity: 0.3;
}

.hud-ring {
    position: absolute;
    border-radius: 9999px;
    border: 1px dashed var(--accent);
}

.hud-ring--1 {
    width: 8rem;
    height: 8rem;
    animation: spin 10s linear infinite;
}

.hud-ring--2 {
    width: 10rem;
    height: 10rem;
    border-style: dotted;
    border-color: rgba(var(--accent-rgb), 0.5);
    animation: spin 15s linear infinite reverse;
}

.hud-line-h,
.hud-line-v {
    position: absolute;
    background: rgba(var(--accent-rgb), 0.2);
}

.hud-line-h {
    width: 100%;
    height: 1px;
}

.hud-line-v {
    height: 100%;
    width: 1px;
}

.card-inner {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.2);
}

.protocol-label {
    font-size: 10px;
    color: rgba(var(--accent-rgb), 0.6);
    letter-spacing: 0.3em;
    margin-bottom: 0.25rem;
}

.card-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--accent);
    text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.8);
    transition: animation 0.3s;
}

.card:hover .card-title {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.card-id-block {
    font-size: 10px;
    color: rgba(var(--accent-rgb), 0.7);
    letter-spacing: 0.1em;
    text-align: right;
}

.card-version {
    margin-top: 0.25rem;
    color: rgba(var(--accent-rgb), 0.5);
}

.card-body {
    flex-grow: 1;
    margin-bottom: 2rem;
}

.svc-row {
    font-size: 0.875rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(var(--accent-rgb), 0.1);
    padding: 0.5rem;
    border: 1px solid rgba(var(--accent-rgb), 0.2);
}

.svc-dot {
    width: 0.5rem;
    height: 0.5rem;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(var(--accent-rgb), 1);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    flex-shrink: 0;
}

.metrics {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(var(--accent-rgb), 0.3);
    position: relative;
}

.metrics::before,
.metrics::after {
    content: "";
    position: absolute;
    left: -5px;
    width: 0.5rem;
    height: 0.5rem;
    background: rgba(var(--accent-rgb), 0.5);
}

.metrics::before {
    top: 0;
}

.metrics::after {
    bottom: 0;
}

.metric {
    font-size: 0.75rem;
    color: rgba(var(--accent-rgb), 0.7);
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.metric + .metric {
    margin-top: 0.5rem;
}

.card:hover .metric {
    color: var(--accent);
}

.metric-chevron {
    color: rgba(var(--accent-rgb), 0.4);
}

/* CTA */
.cta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 0;
    border: 1px solid rgba(var(--accent-rgb), 0.5);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.cta:hover {
    background: rgba(var(--accent-rgb), 0.2);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.4);
}

.cta-shimmer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(var(--accent-rgb), 0.3),
        transparent
    );
    transform: translateX(-100%);
}

.cta:hover .cta-shimmer {
    animation: shimmer 2s infinite;
}

.cta-inner {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--accent);
}

.cta-line {
    width: 3rem;
    height: 1px;
    background: rgba(var(--accent-rgb), 0.5);
    transition: width 0.3s ease;
}

.cta:hover .cta-line {
    width: 4rem;
}

.cta-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-icon {
    width: 1.5rem;
    height: 1.5rem;
    transition: transform 0.3s ease;
}

.cta:hover .cta-icon {
    transform: scale(1.1);
}

.cta-arrow {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1rem;
    height: 1rem;
    margin-left: -0.5rem;
    margin-top: -0.5rem;
    opacity: 0;
    transition:
        opacity 0.5s ease,
        transform 0.5s ease;
}

.cta:hover .cta-arrow {
    opacity: 1;
    transform: translate(0.5rem, -1.5rem);
}

/* ========================================
   ARTICLE CONTENT OVERLAYS - After Dark Theme
   ======================================== */

.content-article {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
    overflow-x: visible;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-article.active {
    opacity: 1;
    visibility: visible;
}

.content-article.fade-out {
    animation: articleFadeOut 0.2s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

@keyframes articleFadeOut {
    from {
        opacity: 1;
        visibility: visible;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes articleFadeIn {
    from {
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.content-article.active .article-wrapper {
    animation: articleFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Article Wrapper */
.article-wrapper {
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 3rem 3rem;
    background: linear-gradient(135deg, rgba(12, 12, 12, 0.25), rgba(8, 8, 8, 0.48));
    /* border: 1px solid rgba(28, 180, 149, 0.25); */
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95),
                inset 0 1px 0 rgba(28, 180, 149, 0.1);
    position: relative;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Article Header */
.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(28, 180, 149, 0.2);
}

.article-header h1 {
    font-size: 2.44em;
    font-weight: 700;
    color: #1cb495;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 0.5rem 0;
    font-family: 'Courier New', 'Menlo', monospace;
    text-shadow: 0 0 20px rgba(28, 180, 149, 0.3);
    line-height: 1.2;
}

.article-header h1::before {
    content: '> ';
    opacity: 0.5;
    color: rgba(28, 180, 149, 0.6);
}

.article-header h1::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1cb495, transparent);
    margin-top: 0.5rem;
}

.article-subtitle {
    font-size: 0.92rem;
    color: rgba(28, 180, 149, 0.7);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
    font-weight: 400;
}

.article-subtitle::before {
    content: '# ';
    opacity: 0.5;
}

/* Article Content - After Dark Typography */
.article-content {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.92rem;
    line-height: 1.8;
    color: #c0c0c0;
    letter-spacing: 0.3px;
}

.article-content p {
    margin: 0 0 1.5rem 0;
    color: #d0d0d0;
}

.article-content p:first-child {
    color: #e0e0e0;
    font-weight: 500;
}

.article-content blockquote {
    border-left: 3px solid rgba(28, 180, 149, 0.4);
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: rgba(28, 180, 149, 0.9);
    /* font-style: italic; */
    background: rgba(28, 180, 149, 0.05);
    padding: 1rem 1rem 1rem 1.5rem;
    border-radius: 4px;
}

.article-content blockquote p {
    margin: 0;
    color: inherit;
}

.article-content blockquote::before {
    content: '>';
    color: rgba(28, 180, 149, 0.5);
    font-weight: 700;
    margin-right: 0.5rem;
    margin-left: -0.2rem;
}

/* Close Button */
.close-article-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    background: rgba(28, 180, 149, 0.1);
    border: 1px solid rgba(28, 180, 149, 0.3);
    border-radius: 6px;
    color: #1cb495;
    font-size: 23.40px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.close-article-btn:hover {
    background: rgba(28, 180, 149, 0.2);
    border-color: #1cb495;
    box-shadow: 0 4px 12px rgba(28, 180, 149, 0.2);
    transform: scale(1.1);
}

.close-article-btn:active {
    transform: scale(0.95);
}

/* Article-specific styling */
.cntm-article .article-header h1 {
    color: #1cb495;
}

.cntm-article .article-header h1::before {
    content: '>> ';
}

.sre-article .article-header h1 {
    color: #26c4a1;
}

.sre-article .article-header h1::before {
    content: '>>> ';
}

.sec-article .article-header h1 {
    color: #1cb495;
}

.sec-article .article-header h1::before {
    content: '> ';
}

.dev-article .article-header h1 {
    color: #1dcdb0;
}

.dev-article .article-header h1::before {
    content: '~ ';
}

.ops-article .article-header h1 {
    color: #1db490;
}

.ops-article .article-header h1::before {
    content: '$ ';
}

.about-article .article-header h1 {
    color: #1cb495;
}

.about-article .article-header h1::before {
    /* content: '◆ '; */
    content: ' ';
    /* content: url(../../favicon.ico) / "CNTM"; */
    background-image: url(../../favicon.ico);
    opacity: 0.7;
    width: 1em;
    height: 1em;
    display: none;
    background-size: contain;
    position: absolute;
    transform: translateX(-110%);
}

/* Article Wrapper Scrollbar */
.article-wrapper::-webkit-scrollbar {
    width: 8px;
}

.article-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.article-wrapper::-webkit-scrollbar-thumb {
    background: rgba(28, 180, 149, 0.2);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.article-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(28, 180, 149, 0.4);
}

/* Responsive */
@media screen and (max-width: 768px) {
    .content-article {
        padding: 1rem;
    }

    .article-wrapper {
        padding: 2rem 1.5rem;
        border-radius: 6px;
    }

    .article-header h1 {
        font-size: 1.75em;
        letter-spacing: 1px;
    }

    .article-content {
        font-size: 0.88rem;
    }

    .close-article-btn {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
        font-size: 19.50px;
    }

}

@media screen and (max-width: 480px) {
    .content-article {
        padding: 0.5rem;
    }

    .article-wrapper {
        padding: 1.5rem 1rem;
        max-height: 90vh;
    }

    .article-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .article-header h1 {
        font-size: 1.46em;
        letter-spacing: 0.5px;
        margin-bottom: 0.25rem;
    }

    .article-subtitle {
        font-size: 0.83rem;
        letter-spacing: 0.5px;
    }

    .article-content {
        font-size: 0.83rem;
        line-height: 1.6;
    }

    .article-content p {
        margin-bottom: 1rem;
    }

    .article-content blockquote {
        margin: 1.5rem 0;
        padding: 0.75rem 0.75rem 0.75rem 1rem;
    }

    .close-article-btn {
        width: 32px;
        height: 32px;
        font-size: 17.55px;
    }
}

/* Hidden UI Elements - Revealed on C Signet Click */
#panel-toggle-btn.hidden,
#gcp-status-indicator.hidden,
#auto-cycle-floating-btn.hidden,
#clear-history-floating-btn.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

/* Reveal animation for hidden elements */
#panel-toggle-btn.reveal,
#gcp-status-indicator.reveal,
#auto-cycle-floating-btn.reveal,
#clear-history-floating-btn.reveal {
    animation: revealButton 0.4s ease-out forwards;
}

@keyframes revealButton {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
    .pause-button {
        bottom: 1em;
    }
}
/* Navigation fade-in animation */
@keyframes navFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Pause Button - Organic Minimal Sci-Fi UI */
.pause-button {
    position: fixed;
    bottom: .5em;
    right: calc(50vw - 56px);
    transform: translateX(-50%) translateY(0%);
    width: 56px;
    height: 56px;
    /* border: 1px solid rgba(28, 180, 149, 0.35); */
    background: transparent;
    border-radius: 50%;
    z-index: 100005;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    opacity: 0.75;
}

/* Active state - running animation (subtle presence) */
.pause-button:not(.paused) {
    opacity: 1;
    border-color: rgba(28, 180, 149, 0.55);
}

/* Paused state - faded background */
.pause-button.paused {
    opacity: 0.2;
    border-color: rgba(28, 180, 149, 0.15);
}

/* Gravity icon animates only when running */
.pause-button:not(.paused) .gravity-icon {
    animation: gravityOrbit 24s linear infinite;
}

@keyframes gravityOrbit {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.pause-button:hover:not(.paused) {
    opacity: 1;
    border-color: rgba(28, 180, 149, 0.75);
    transform: translateX(-50%) translateY(-30%) scale(1.1);

}

.pause-button:hover.paused {
    opacity: 0.3;
    border-color: rgba(28, 180, 149, 0.25);
    transform: translateX(-50%) translateY(-30%) scale(1.1);
}

.pause-button:active {
    transform: translateX(-50%) scale(0.95);
}

.pause-icon-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gravity-Spin Icon */
.gravity-icon {
    width: 24px;
    height: 24px;
    color: #1cb495;
}

#pipboy-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    max-width: 100vw;
    background: rgba(0,0,0,0);
    color: rgba(28, 180, 149, 1); /* Classic Pip-Boy Green */
    font-family: 'Courier New', Courier, monospace;
    padding: 20px;
    z-index: 99999999999;
    overflow-y: auto;
    text-shadow: 0 0 5px #1aff80;
    display: none; /* Hidden by default */
}

/* CRT Scanline Effect */
.crt-scanline {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    /* background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), */
                /* linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06)); */
    /* background-size: 100% 4px, 3px 100%; */
    pointer-events: none;
}

.pipboy-toggle {
    position: fixed;
    bottom: 0; left: 50vw;
    z-index: 100000000000000000;
}
/* Syntax Highlighting Colors */
.hl-tag { color: rgba(28, 180, 149, 0.9); font-weight: bold; } /* Tags */
.hl-attr { color: rgba(28, 180, 149, 0.7); } /* Attributes */
.hl-str { color: rgba(28, 180, 149, 1); } /* Strings */
.hl-comm { color: rgba(28, 180, 149, 1); } /* Comments */
github-md {
    posiiton: relative;
    z-index:99999999999999999999999999999999;
}
#source-code-display {
    overflow: hidden;
}
