/* 1. Import fonts directly into the CSS file */
/* This method is slower.  So we load through Html instead */
/* @import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;500;700&family=Orbitron:wght@400;500;700&family=Share+Tech+Mono&family=Inter:wght@300;400;700&family=IBM+Plex+Sans:wght@300;400&family=IBM+Plex+Mono&display=swap'); */

/* Custom CSS for (Enhanced HUD) aesthetic */
body {
    font-family: 'Inter', sans-serif;
    /* background: linear-gradient(135deg, #e0e6ed 0%, #f0f4f8 100%); Light, subtle gradient background */
    /* Uncomment this line to restore the image */
    /* background-image: url('Image.jpg'); */

    background-image:
        url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='43.3' height='50'%3E%3Cpolygon points='21.65,0 43.3,12.5 43.3,37.5 21.65,50 0,37.5 0,12.5' fill='none' stroke='rgba(0, 240, 255, .08)' stroke-width='1'/%3E%3C/svg%3E"),
        url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='43.3' height='50'%3E%3Cpolygon points='21.65,0 43.3,12.5 43.3,37.5 21.65,50 0,37.5 0,12.5' fill='none' stroke='rgba(0, 240, 255, .08)' stroke-width='1'/%3E%3C/svg%3E"),
        radial-gradient(circle at 50% 50%, #0d1b2e 0%, #020408 100%);

    background-repeat: repeat, repeat, no-repeat;

    background-position:
        0 0,
        21.65px 37.5px,
        center center;

    background-size: auto, auto, cover;

    background-attachment: fixed, fixed, fixed;

    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 1.5rem 1rem;
    /* Reduced body padding */
    box-sizing: border-box;
    color: #4a5568;
    /* Soft dark gray for main text */
    line-height: 1.7;
}

.container {
    background-color: rgba(255, 255, 255, 0.2);
    /* Slightly translucent white panel */
    padding: 1.8rem;
    /* Further reduced container padding */
    border-radius: 1.2rem;
    /* Consistent subtle curve */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15), inset 0 0 20px rgba(255, 255, 255, 0.8);
    /* Stronger soft outer shadow, subtle inner light */
    max-width: 40rem;
    /* Slightly reduced max-width to help with narrower viewports if needed */
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(220, 230, 240, 0.5);
    /* Very light, almost invisible border */
    position: relative;
    z-index: 2;
    /* Always sit above .vg-frame-container (z-index: 1) */
    overflow: hidden;
    /* Ensure elements don't spill */
    /* backdrop-filter: blur(5px); /* Subtle frosted glass effect */
}

/* Top Bar Element (like in image) */
.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2rem;
    /* Further reduced top-bar height */
    background: linear-gradient(90deg, rgba(90, 139, 232, 0.5) 0%, rgba(90, 139, 232, 0.2) 50%, rgba(90, 139, 232, 0.5) 100%);
    border-bottom: 1px solid rgba(90, 139, 232, 0.5);
    border-top-left-radius: 1.2rem;
    border-top-right-radius: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.2rem;
    /* Further reduced top-bar padding */
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.85rem;
    color: #5a8be8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: inset 0 0 10px rgba(90, 139, 232, 0.2);
    z-index: 3;
    /* Ensure it's on top of SVG */
}

.top-bar .system-status {
    display: flex;
    align-items: center;
}

.top-bar .system-status::before,
.top-bar .system-status.status-approved::before,
.top-bar .system-status.status-activation-required::before,
.top-bar .system-status.status-error::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    animation: blinking-indicator 1.5s infinite ease-in-out;
}

/* Default/Pending color (can be less prominent or a neutral color) */
.top-bar .system-status::before {
    background-color: #a0aec0;
    /* Gray for pending */
    box-shadow: 0 0 8px #a0aec0;
}

.top-bar .system-status.status-approved::before {
    background-color: #38a169;
    /* Green for approved/online */
    box-shadow: 0 0 8px #38a169;
}

.top-bar .system-status.status-activation-required::before {
    background-color: #dd6b20;
    /* Orange/Amber for activation required */
    box-shadow: 0 0 8px #dd6b20;
}

.top-bar .system-status.status-error::before {
    background-color: #e53e3e;
    /* Red for error */
    box-shadow: 0 0 8px #e53e3e;
}

/* Inner Panel Styling (for API, Course, Assignment, etc.) */
.inner-panel {
    background-color: rgba(240, 244, 248, 0.5);
    /* Slightly off-white, more opaque */
    /* backdrop-filter: blur(3px); /* Subtle frosted glass effect */
    padding: 1.2rem;
    /* Further reduced inner-panel padding */
    border-radius: 0.8rem;
    /* Consistent subtle curve */
    margin-bottom: 1rem;
    /* Further reduced inner-panel margin */
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.05), 0 5px 15px rgba(0, 0, 0, 0.05);
    /* Subtle inner shadow, soft outer shadow */
    border: 1px solid rgba(220, 230, 240, 0.6);
    position: relative;
    z-index: 2;
    /* Ensure panels are above base SVG */
}

h1 {
    font-family: 'Orbitron', sans-serif;
    /* Subtle sci-fi for main title */
    font-weight: 400;
    /* Light weight for elegance */
    font-size: 2rem;
    /* Further reduced h1 font size */
    color: #2d3748;
    /* Darker text for prominence */
    margin-bottom: 1.5rem;
    /* Further reduced h1 margin */
    text-align: center;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
    /* Above any background SVGs */
    padding-top: 0.8rem;
    /* Reduced padding-top for h1 */
}

p {
    font-family: 'Inter', sans-serif;
    color: #6a7689;
    /* Softer gray for general text */
    margin-bottom: 0.6rem;
    /* Further reduced p margin */
    font-weight: 300;
    font-size: 0.88rem;
    /* Slightly smaller p font size */
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.label {
    font-family: 'IBM Plex Sans', sans-serif;
    /* Slightly more technical for labels */
    font-weight: 400;
    color: #2d3748;
    /* Darker gray for labels */
    margin-bottom: 0.4rem;
    /* Further reduced label margin */
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.8rem;
    /* Further reduced label font size */
    position: relative;
    z-index: 1;
}

/* Input and Select Field Styling - Blending in, subtle glow on focus */
.input-field {
    padding: 0.7rem 0.9rem;
    /* Further reduced input padding */
    border: 1px solid #dae1e7;
    /* Very light gray border */
    border-radius: 0.6rem;
    /* Consistent subtle curve */
    width: 100%;
    box-sizing: border-box;
    background-color: #f8faff;
    /* Slightly off-white background */
    color: #2d3748;
    /* Dark text for input values */
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    /* Very subtle inset shadow */
    font-size: 0.9rem;
    /* Further reduced input font size */
    font-weight: 300;
    font-family: 'IBM Plex Sans', sans-serif;
    /* Input text uses technical font */
    text-transform: uppercase;
    /* Uppercase for consistency */
}

#apiKeyInput {
    filter: blur(5px);
    /* Initial blur */
}

#apiKeyInput:hover,
#apiKeyInput:focus {
    filter: none;
    /* Remove blur on hover/focus */
}

/* Override text-transform for specific input fields */
#apiKeyInput {
    text-transform: none;
}

.input-field:focus {
    border-color: #5a8be8;
    /* Soft blue border on focus */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 0 10px rgba(90, 139, 232, 0.4);
    /* Soft blue glow */
    background-color: #ffffff;
}

.input-field::placeholder {
    color: #a0a8b4;
    /* Light, elegant placeholder text */
    font-weight: 300;
    text-transform: none;
    /* Placeholder can be normal case */
}

/* Specific placeholder styling for grading instructions textarea */
#gradingInstructions::placeholder {
    color: #007c83;
    opacity: 1;
}

/* Custom Select Arrow - Subtle, integrated */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23A0A8B4" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    /* Muted arrow */
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.1em;
    padding-right: 2.5rem;
}

select option {
    background-color: #f8faff;
    /* Consistent background for options */
    color: #2d3748;
    /* Consistent text for options */
}

/* Button Styling - Invisible until hover, then soft glow */
.button-primary {
    display: block;
    /* Make <a> and <button> consistent */
    background-color: rgba(240, 244, 248, 0.5);
    /* Initially transparent */
    color: #5a8be8;
    /* Soft blue text */
    padding: 0.8rem 1.8rem;
    /* Further reduced button padding */
    border-radius: 0.8rem;
    /* Consistent subtle curve */
    font-weight: 500;
    /* Medium weight for elegance */
    transition: all 0.4s ease;
    cursor: pointer;
    border: 1px solid rgba(90, 139, 232, 0.3);
    /* Subtle initial border */
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 0 5px rgba(90, 139, 232, 0.1);
    /* Very soft initial glow */
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    /* Further reduced button font size */
    font-family: 'Orbitron', sans-serif;
    /* Button text in sci-fi font */
    text-align: center;
    /* Center text for <a> tags */
}

.button-primary:hover {
    background-color: rgba(90, 139, 232, 0.3);
    /* Very light blue background on hover */
    border-color: #5a8be8;
    /* Soft blue border on hover */
    box-shadow: 0 0 25px rgba(90, 139, 232, 0.6);
    /* Prominent soft blue glow */
    color: #2d3748;
    /* Darker text on hover */
    transform: translateY(-2px);
    /* Slight lift */
}

.button-primary:active {
    background-color: rgba(90, 139, 232, 0.2);
    /* Slightly darker blue on click */
    transform: translateY(0px);
    /* Reset lift */
    box-shadow: 0 0 10px rgba(90, 139, 232, 0.4);
    /* Smaller glow on click */
}

.button-primary:disabled {
    background-color: rgba(240, 244, 248, 0.5);
    /* Faded background when disabled */
    border-color: rgba(160, 168, 180, 0.3);
    color: #a0a8b4;
    /* Muted gray when disabled */
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.7;
}

/* New modifier class for the green report button */
.button-primary.button-green {
    background-color: rgba(46, 204, 112, 0.5);
    /* Brighter, transparent green */
    color: #10aa50;
    /* A vibrant, dark cyan/green text */
    border-color: rgba(46, 204, 113, 0.5);
    /* Brighter border */
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.3);
    /* Brighter initial glow */
}

.button-primary.button-green:hover {
    background-color: rgba(46, 204, 113, 0.4);
    /* More opaque on hover */
    border-color: #2ecc71;
    /* A solid, bright green border on hover */
    box-shadow: 0 0 25px rgba(46, 204, 113, 0.7);
    /* A more prominent glow */
    color: #00c91b;
    /* Keep text color consistent on hover */
}

/* Checkbox Styling - Minimalist and integrated */
.form-checkbox {
    height: 1.4rem;
    width: 1.4rem;
    border-radius: 0.4rem;
    /* Consistent subtle curve */
    background-color: #f8faff;
    /* Slightly off-white background */
    border: 1px solid #dae1e7;
    /* Light border */
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    /* Subtle inset shadow */
    z-index: 1;
}

.form-checkbox:checked {
    background-color: #5a8be8;
    /* Soft blue when checked */
    border-color: #5a8be8;
}

.form-checkbox:checked::after {
    content: '';
    display: block;
    width: 0.6em;
    height: 1em;
    border: solid #ffffff;
    /* White checkmark */
    border-width: 0 0.18em 0.18em 0;
    transform: rotate(45deg);
    position: absolute;
    top: 0.1em;
    left: 0.3em;
}

/* Checkbox Matrix Styling - Compact, Square, Cyan */
.matrix-checkbox {
    height: 0.8em;
    width: 0.8em;
    border-radius: 0;
    /* Sharp square corners */
    background-color: transparent;
    /* Empty interior when unchecked */
    border: 2px solid #00f2ff;
    /* Cyan border */
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: none;
    /* No inset shadow for maximum compactness */
    z-index: 1;
    flex-shrink: 0;
}

.matrix-checkbox:checked {
    background-color: #00f2ff;
    /* Cyan fill when checked */
    border-color: #00f2ff;
    /* Cyan border maintained */
}

.matrix-checkbox:checked::after {
    content: '';
    display: block;
    width: 0.8em;
    height: 0.8em;
    background: #00eeff;
    /* Darker cyan for checkmark contrast */
    border-radius: 0;
    /* Square checkmark */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Center the checkmark */
}

/* Status and Results Output - Seamless data display */
#statusMessage {
    color: #5a8be8;
    /* Soft blue for status messages */
    font-size: 0.9rem;
    /* Further reduced status message font size */
    text-align: center;
    margin-bottom: 1.2rem;
    /* Further reduced status message margin */
    font-weight: 400;
    letter-spacing: 0.02em;
    position: relative;
    z-index: 1;
}

#resultsOutput {
    background-color: rgba(240, 244, 248, 0.9);
    /* Even more opaque for clarity */
    padding: 1.2rem;
    /* Further reduced results padding */
    border-radius: 0.8rem;
    /* Consistent subtle curve */
    margin-top: 3rem;
    font-size: 0.9rem;
    color: #2d3748;
    /* Darker text for clarity in log */
    white-space: pre-wrap;
    max-height: 400px;
    /* Taller log area */
    overflow-y: auto;
    border: 1px solid rgba(210, 220, 230, 0.8);
    /* Slightly more visible border */
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.05);
    /* Very subtle inset shadow */
    scrollbar-width: thin;
    scrollbar-color: rgba(160, 168, 180, 0.7) rgba(240, 244, 248, 0.8);
    /* Muted thumb, light track */
    font-family: 'IBM Plex Sans', monospace;
    /* Monospace for log data */
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

#resultsOutput::-webkit-scrollbar {
    width: 10px;
}

#resultsOutput::-webkit-scrollbar-track {
    background: rgba(240, 244, 248, 0.8);
    border-radius: 8px;
}

#resultsOutput::-webkit-scrollbar-thumb {
    background-color: rgba(160, 168, 180, 0.7);
    /* Muted gray scrollbar */
    border-radius: 8px;
    border: 2px solid rgba(240, 244, 248, 0.8);
}

.results-header {
    font-family: 'Orbitron', sans-serif;
    /* Header in sci-fi font */
    font-weight: 500;
    color: #2d3748;
    /* Dark header for log */
    margin-bottom: 0.8rem;
    /* Further reduced results-header margin */
    border-bottom: 1px solid rgba(160, 168, 180, 0.4);
    /* Light separator line */
    padding-bottom: 0.5rem;
    /* Further reduced results-header padding */
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.85rem;
    /* Further reduced results-header font size */
}

#resultsOutput p {
    margin-bottom: 0.4rem;
    color: #4a5568;
    /* Default log color */
    font-family: 'IBM Plex Sans', monospace;
}

#resultsOutput .text-red-700 {
    color: #e53e3e;
}

/* Soft red for errors */
#resultsOutput .text-blue-700 {
    color: #5a8be8;
}

/* Soft blue for info */
#resultsOutput .text-green-700 {
    color: #38a169;
}

/* Soft green for success */


/* Loading Indicator - Subtle, elegant fade */
#loadingIndicator p {
    color: #5a8be8;
    /* Soft blue processing text */
    font-weight: 400;
    animation: fade-passengers 2s infinite ease-in-out;
    /* Smooth fading animation */
    font-family: 'Orbitron', sans-serif;
    /* Sci-fi font for loading */
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.95rem;
    /* Further reduced loading font size */
    position: relative;
    z-index: 1;
}

/* Deployment Error Hint - Neutral gray warning */
.deployment-error-hint {
    background-color: rgba(148, 163, 184, 0.342);
    /* Light gray background */
    color: #475569;
    /* Neutral gray text */
    padding: 1.2rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(100, 116, 139, 0.7);
    /* Gray border */
    margin-top: 2rem;
    text-align: center;
    font-weight: 500;
    display: none;
    box-shadow: 0 0 18px 4px rgba(100, 116, 139, 0.45);
    /* Gray glow */
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    position: relative;
    z-index: 1;
}

.deployment-error-hint a {
    color: #475569;
    /* Gray for link */
    text-decoration: underline;
}

/* KEYFRAME ANIMATIONS */
@keyframes fade-passengers {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@keyframes blinking-indicator {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 8px #38a169;
    }

    50% {
        opacity: 0.2;
        box-shadow: 0 0 2px #38a169;
    }
}

@keyframes panel-rumble-soft {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(1px, -1px); }
    60% { transform: translate(-1px, 0); }
    80% { transform: translate(1px, 1px); }
    100% { transform: translate(0, 0); }
}

.panel-rumble-soft {
    animation: panel-rumble-soft 320ms ease-out 1;
}

/* Removed @keyframes subtle-fade-background as the SVG is gone */
/* Removed .container svg.absolute.inset-0 styling as the SVG is gone */

/* Slider styling - Nest Foundation style with bright cyan track and thumb */
.nest-slider {
    -webkit-appearance: none;
    appearance: none;
    background: #00f2ff;
    height: 4px;
    border-radius: 2px;
    outline: none;
}

.nest-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00f2ff;
    border: 2px solid #00f2ff;
    box-shadow: 0 0 8px #00f2ff, 0 0 16px #00f2ff;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.nest-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00f2ff;
    border: 2px solid #00545a;
    box-shadow: 0 0 8px #00f2ff, 0 0 16px #00f2ff;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.nest-slider:hover::-webkit-slider-thumb,
.nest-slider:hover::-moz-range-thumb {
    transform: scale(1.1);
    box-shadow: 0 0 12px #00f2ff, 0 0 24px #00f2ff;
}

/* ============================================================
           WARP CORE BACKGROUND LAYER
           ============================================================ */
:root {
    --core-cyan: #00f2ff;
    --core-purple: #7000ff;
    --core-darkcyan: #00545a;
    --core-darkpurple: #2b0063;
}

/* Dark overlay that fades in during overdrive */
#vg-bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #020617;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    transition: none;
    /* JS drives this frame-by-frame */
}

#vg-fog-canvas,
#vg-wave-canvas,
#vg-lightning-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#vg-fog-canvas {
    mix-blend-mode: screen;
    opacity: 0.8;
    z-index: 5;
}

#vg-wave-canvas {
    mix-blend-mode: color-dodge;
    opacity: 0.5;
    z-index: 0;
}

#vg-lightning-canvas {
    mix-blend-mode: screen;
    z-index: 14;
    filter: contrast(1.2);
}


.vg-core-stage {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 450px;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    pointer-events: none;
}

.vg-core-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    pointer-events: none;
    will-change: transform;
}

.vg-ring-1 {
    width: 340px;
    height: 340px;
    border-top-color: var(--core-cyan);
    border-bottom-color: var(--core-cyan);
    opacity: 0.3;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.15);
}

.vg-ring-2 {
    width: 280px;
    height: 280px;
    border-left-color: var(--core-purple);
    border-right-color: var(--core-purple);
    opacity: 0.4;
    box-shadow: 0 0 15px rgba(112, 0, 255, 0.15);
}

.vg-ring-3 {
    width: 200px;
    height: 200px;
    border: 1px dashed var(--core-cyan);
    opacity: 0.5;
}

.vg-singularity-container {
    position: relative;
}

.vg-singularity {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    box-shadow:
        0 0 40px 10px var(--core-cyan),
        0 0 80px 30px var(--core-purple),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    animation: vg-pulse-core 2s ease-in-out infinite;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.vg-overdrive .vg-singularity {
    animation: vg-pulse-core 0.2s ease-in-out infinite;
    box-shadow:
        0 0 60px 20px #fff,
        0 0 120px 60px var(--core-cyan),
        0 0 200px 100px var(--core-purple);
}

@keyframes vg-pulse-core {

    0%,
    100% {
        transform: scale(1);
        filter: brightness(1) saturate(1);
    }

    50% {
        transform: scale(1.15);
        filter: brightness(1.4) saturate(1.5);
    }
}

/* Hexagonal frame wrapping the warp core */
.vg-frame-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1px;
    z-index: 1;
    background: linear-gradient(135deg, var(--core-darkcyan), transparent, var(--core-darkpurple));
    /* clip-path: polygon(0% 40px, 40px 0%, calc(100% - 40px) 0%, 100% 40px, 100% calc(100% - 40px), calc(100% - 40px) 100%, 40px 100%, 0% calc(100% - 40px)); */
    isolation: isolate;
    pointer-events: none;
}

.vg-frame-content {
    width: 100vw;
    height: 100vh;
    background: rgba(6, 10, 25, 0.8);
    backdrop-filter: blur(3px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ============================================================
           STAGE PANEL — from The Perfect UI
============================================================ */
.stage-panel-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 200;
    width: 325px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.stage-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-family: 'Rajdhani', sans-serif;
    pointer-events: none;
}

/* Left-side stage panel - mirror of right panel */
.stage-panel-left {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 200;
    width: 325px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-family: 'Rajdhani', sans-serif;
    pointer-events: none;
}

.stage-id-box {
    background: rgba(0, 242, 255, 0.07);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 0.5rem;
    padding: 0.4rem 0.7rem;
    position: relative;
}

.stage-id-box .stage-unit {
    font-size: 0.6rem;
    color: rgba(0, 242, 255, 0.6);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.1rem;
}

.stage-id-box .stage-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--core-cyan);
    text-shadow: 0 0 5px rgba(0, 242, 255, 0.7), 0 0 10px rgba(0, 242, 255, 0.5);
    letter-spacing: 0.08em;
    font-family: 'Orbitron', sans-serif;
}

.stage-id-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-top: 1px solid var(--core-cyan);
    border-right: 1px solid var(--core-cyan);
}

.stage-id-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border-bottom: 1px solid var(--core-cyan);
    border-left: 1px solid var(--core-cyan);
}

.stage-number-box {
    background: rgba(0, 242, 255, 0.05);
    border: 2px solid var(--core-cyan);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.15), inset 0 0 15px rgba(0, 242, 255, 0.05);
}

.stage-number-box .stage-num {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 0 5px rgba(0, 242, 255, 0.7), 0 0 10px rgba(0, 242, 255, 0.5);
    line-height: 1;
}

.stage-number-box .stage-name {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    color: rgba(0, 242, 255, 0.9);
    text-shadow: 0 0 5px rgba(0, 242, 255, 0.5);
    letter-spacing: 0.05em;
}

.stage-header-label {
    font-size: 0.6rem;
    color: rgba(0, 242, 255, 0.5);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(0, 242, 255, 0.2);
    padding-bottom: 0.2rem;
    margin-bottom: 0.3rem;
}

/* System list panel */
.stage-sys-list {
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 0.5rem;
    padding: 0.5rem 0.5rem 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: relative;
    overflow: hidden;
    /* keep overflow hidden for the hidden items */
    pointer-events: auto;
    /* enable clicking within the panel */
}

/* Hide every item that is NOT the active one */
.stage-sys-list .stage-sys-item:not(.active) {
    display: none;
}

/* When the list is hovered, reveal all items */
.stage-sys-list:hover .stage-sys-item {
    display: flex;
    /* restore flex layout for each item */
}

/* The active item keeps its highlight – no change needed */
.stage-sys-list .stage-sys-item.active {
    background: rgba(0, 242, 255, 0.1);
    border-color: rgba(0, 242, 255, 0.5);
}

/* Hide the footer when not hovering */
.stage-sys-list .stage-sys-footer {
    display: none;
}

/* Reveal the footer on hover */
.stage-sys-list:hover .stage-sys-footer {
    display: flex;
}

/* Left accent bar */
.stage-sys-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--core-cyan), transparent, var(--core-cyan));
    opacity: 0.5;
}

.stage-sys-item {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.4rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(0, 242, 255, 0.2);
    color: rgba(0, 242, 255, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stage-sys-item:hover {
    border-color: rgba(0, 242, 255, 0.4);
    background: rgba(0, 242, 255, 0.05);
    color: rgba(0, 242, 255, 0.8);
}

.stage-sys-item.active {
    border-color: rgba(0, 242, 255, 0.5);
    background: rgba(0, 242, 255, 0.1);
    color: var(--core-cyan);
}

.stage-sys-item .blink-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--core-cyan);
    animation: blinking-indicator 1.5s infinite ease-in-out;
    flex-shrink: 0;
}

.stage-sys-footer {
    margin-top: 0.2rem;
    border-top: 1px solid rgba(0, 242, 255, 0.2);
    padding-top: 0.3rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.55rem;
    color: rgba(0, 242, 255, 0.35);
    letter-spacing: 0.1em;
}

/* API Key Entry Section */
.stage-api-key-box {
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 0.5rem;
    padding: 0.5rem 0.5rem 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    pointer-events: auto;
}

.stage-api-key-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--core-cyan), transparent, var(--core-cyan));
    opacity: 0.5;
}

.stage-api-header {
    font-size: 0.55rem;
    color: rgba(0, 242, 255, 0.5);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding-bottom: 0.3rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid rgba(0, 242, 255, 0.2);
}

.grading-instructions-header {
    font-size: 0.9rem;
    color: #00f2ff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    border-bottom: 1px solid rgba(0, 242, 255, 0.3);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.grading-source-trigger {
    height: 100%;
    width: 168px;
    background: #00f2ff;
    color: #04131a;
    border-left: 1px solid rgba(0, 0, 0, 0.25);
    font-size: 12px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: filter 0.2s ease;
}

.grading-source-trigger:hover {
    filter: brightness(1.08);
}

.grading-source-option {
    width: 100%;
    text-align: left;
    padding: 0.65rem 0.8rem;
    font-size: 10px;
    font-family: inherit;
    letter-spacing: 0.15em;
    color: #00f2ff;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 242, 255, 0.15);
    cursor: pointer;
}

.grading-source-option:last-child {
    border-bottom: none;
}

.grading-source-option:hover {
    background: rgba(0, 242, 255, 0.16);
    color: #ffffff;
}

.top-menu-slot {
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
    will-change: transform, opacity;
}

#loggedInMenu.forms-top-mode #topCourseDropdownWrap {
    transform: translateX(-160%);
    opacity: 0;
    pointer-events: none;
}

#loggedInMenu.forms-top-mode #topAssignmentDropdownWrap {
    transform: translateX(-180%);
    opacity: 0;
    pointer-events: none;
}

.top-forms-picker-wrap {
    opacity: 0;
    transform: translateX(140%);
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

#loggedInMenu.forms-top-mode .top-forms-picker-wrap {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.top-forms-picker-button {
    height: 36px;
    padding: 0 1rem;
    border: 1px solid rgba(0, 242, 255, 0.45);
    border-radius: 0.35rem;
    background: rgba(0, 242, 255, 0.12);
    color: #00f2ff;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.top-forms-picker-button:hover {
    background: rgba(0, 242, 255, 0.2);
    border-color: rgba(0, 242, 255, 0.75);
    color: #ffffff;
}

.top-forms-columns-panel {
    display: none;
    margin-top: 0.6rem;
    max-height: 220px;
    overflow-y: auto;
    padding-bottom: 1.35rem;
}

.top-forms-columns-header {
    font-size: 0.72rem;
    margin-bottom: 0.4rem;
    padding-bottom: 0.35rem;
}

.top-selected-sheet-info {
    font-size: 0.62rem;
    color: rgba(0, 242, 255, 0.85);
    letter-spacing: 0.08em;
    margin-bottom: 0.45rem;
    text-transform: uppercase;
}

.top-headers-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 0.75rem;
}

.top-headers-list-item {
    display: flex;
    align-items: center;
    font-size: 0.6rem;
    color: rgba(0, 242, 255, 0.92);
    letter-spacing: 0.05em;
    border: 1px solid rgba(0, 242, 255, 0.2);
    background: rgba(0, 242, 255, 0.05);
    border-radius: 0.3rem;
    padding: 0.32rem 0.45rem;
    gap: 0.38rem;
}

.top-header-label {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.38rem;
    cursor: pointer;
}

.top-header-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: uppercase;
}

.stage-api-input-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.stage-api-input {
    flex: 1;
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 0.25rem;
    padding: 0.35rem 0.5rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.65rem;
    color: var(--core-cyan);
    letter-spacing: 0.05em;
    outline: none;
    transition: all 0.2s ease;
}

.stage-api-input::placeholder {
    color: rgba(0, 242, 255, 0.35);
}

.stage-api-input:focus {
    border-color: rgba(0, 242, 255, 0.5);
    background: rgba(0, 242, 255, 0.1);
    box-shadow: 0 0 8px rgba(0, 242, 255, 0.2);
}

.stage-api-link {
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 0.25rem;
    padding: 0.35rem 0.5rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--core-cyan);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.stage-api-link:hover {
    background: rgba(0, 242, 255, 0.2);
    border-color: rgba(0, 242, 255, 0.5);
    box-shadow: 0 0 8px rgba(0, 242, 255, 0.3);
}

.stage-api-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.4rem;
    padding-top: 0.3rem;
    border-top: 1px solid rgba(0, 242, 255, 0.15);
}

.stage-api-status .status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 242, 255, 0.3);
    flex-shrink: 0;
}

.stage-api-status.has-key .status-indicator {
    background: #38a169;
    box-shadow: 0 0 6px #38a169;
    animation: blinking-indicator 1.5s infinite ease-in-out;
}

.stage-api-status .status-text {
    font-size: 0.55rem;
    color: rgba(0, 242, 255, 0.4);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.stage-api-status.has-key .status-text {
    color: rgba(56, 161, 105, 0.8);
}

/* Collapse API key box: hide status and help when not hovering */
.stage-api-key-box .stage-api-status,
.stage-api-key-box .stage-api-help {
    display: none;
}

/* Reveal status and help on hover */
.stage-api-key-box:hover .stage-api-status,
.stage-api-key-box:hover .stage-api-help {
    display: block;
}

/* Hybrid styling for custom model box - combines stage-number-box visual with stage-api-key-box layout */
.stage-hybrid-box {
    background: rgba(0, 242, 255, 0.05);
    border: 2px solid var(--core-cyan);
    border-radius: 0.75rem;
    padding: 1rem 1rem 1rem 1rem;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.15), inset 0 0 15px rgba(0, 242, 255, 0.05);
    position: relative;
    overflow: hidden;
    pointer-events: auto;
}

.stage-hybrid-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--core-cyan), transparent, var(--core-cyan));
    opacity: 0.5;
}

/* Rotating Glowing Knobs */
.knob-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.knob-outer {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(30, 41, 59, 0.8);
    position: relative;
    cursor: ns-resize;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 242, 255, 0.1);
    user-select: none;
}

.knob-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 20px;
    background: var(--core-cyan);
    transform-origin: bottom center;
    transform: translate(-50%, -100%) rotate(0deg);
    box-shadow: 0 0 8px var(--core-cyan);
    border-radius: 2px;
    pointer-events: none;
}

.knob-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 1px solid transparent;
    border-top: 1px solid var(--core-cyan);
    opacity: 0.3;
    animation: knob-spin 4s linear infinite;
    pointer-events: none;
}

.knob-label {
    font-size: 8px;
    text-transform: uppercase;
    color: rgba(0, 242, 255, 0.5);
    font-weight: 600;
    letter-spacing: 0.1em;
    font-family: 'Rajdhani', sans-serif;
}

.knob-value {
    font-size: 10px;
    color: var(--core-cyan);
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
}

.knob-subvalue {
    font-size: 10px;
    color: rgba(0, 242, 255, 0.6);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    position: absolute;
    bottom: -34px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@keyframes knob-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Hidden cursor overlay for drag-lock effect */
.knob-cursor-hidden {
    cursor: none !important;
}

/* ============================================================
           IDENTITY TITLE BLOCK — top-left
           ============================================================ */
.identity-block {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 200;
    text-align: left;
    pointer-events: none;
    white-space: nowrap;
}

.identity-block .identity-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.7), 0 0 20px rgba(0, 242, 255, 0.4);
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.identity-block .identity-location {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(0, 242, 255, 0.85);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 0.2rem;
}

.identity-block .identity-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(0, 242, 255, 0.55);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 0.2rem;
}

.identity-top-links {
    position: fixed;
    top: 1.9rem;
    right: calc(325px + 2.75rem);
    z-index: 210;
    display: flex;
    align-items: center;
    gap: 3rem;
}

.identity-top-link {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    color: rgba(0, 242, 255, 0.78);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.identity-top-link:hover {
    color: #b5fdff;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.55);
}

@media (max-width: 920px) {
    .identity-top-links {
        top: 1rem;
        right: 1rem;
    }

    .identity-top-link {
        font-size: 0.64rem;
        letter-spacing: 0.05em;
    }
}

/* ============================================================
           DNA HELIX — Top Left Corner
           ============================================================ */
.dna-helix-container {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 200;
    width: 325px;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    perspective: 400px;
    padding: 0 5px;
    pointer-events: none;
}

.dna-pair {
    width: 2px;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate-dna 4s linear infinite;
}

.dna-pair::before,
.dna-pair::after {
    content: '';
    position: absolute;
    left: -2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.dna-pair::before {
    top: 0;
    background-color: #00f2ff;
    box-shadow: 0 0 6px #00f2ff, 0 0 12px rgba(0, 242, 255, 0.5);
}

.dna-pair::after {
    bottom: 0;
    background-color: #00545a;
    box-shadow: 0 0 6px #00545a, 0 0 12px rgba(0, 84, 90, 0.5);
}

.dna-line {
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 100%;
    background: linear-gradient(to bottom, #00f2ff, #00545a);
    opacity: 0.4;
}

@keyframes rotate-dna {
    0% {
        transform: rotateX(0deg);
    }

    100% {
        transform: rotateX(360deg);
    }
}

/* --- Sci-Fi Semi-Circle Control Panel Styles --- */
:root {
    --neon-cyan: #00f0ff;
    --bg-dark: #050b14;
}

/* Sci-fi Glow Effects */
.box-glow {
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15), inset 0 0 15px rgba(0, 240, 255, 0.05);
}

.text-glow {
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.7);
}

.font-mono-tech {
    font-family: 'Share Tech Mono', monospace;
}

/* Semi-Circle Console Styles */
.wedge-group {
    cursor: pointer;
}

.wedge-btn {
    fill: rgba(0, 240, 255, 0.05);
    stroke: rgba(0, 240, 255, 0.3);
    stroke-width: 1;
    transition: all 0.2s ease;
}

.wedge-text {
    fill: rgba(0, 240, 255, 0.6);
    font-size: 6px;
    font-family: 'IBM Plex Mono', monospace;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    transition: all 0.2s ease;
    letter-spacing: 1px;
}

.wedge-group:hover .wedge-btn {
    fill: rgba(0, 240, 255, 0.3);
    stroke: #00f0ff;
    stroke-width: 1.5;
}

.wedge-group:hover .wedge-text {
    fill: #ffffff;
    text-shadow: 0 0 5px #00f0ff;
}

/* Custom scrollbar for dropups if they ever get tall */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: rgba(5, 11, 20, 0.9);
}

::-webkit-scrollbar-thumb {
    background: #00f0ff;
}

/* DATA STREAM PANEL - Waveform Diagnostics Style (Updated to match AwesomeUI.html) */
.datastream-panel {
    width: 100%;
    max-height: 280px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(0, 242, 255, 0.15);
    border-radius: 2px;
    padding: 1.5rem;
    overflow: hidden;
    font-family: 'Rajdhani', sans-serif;
    backdrop-filter: blur(20px);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
    font-size: 6px;
    pointer-events: auto;
    margin-top: 1.5rem;
}

.datastream-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, #00f2ff, transparent, #00f2ff);
    opacity: 0.5;
}

.datastream-header {
    font-size: 10px;
    font-weight: 700;
    color: #00f2ff;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 242, 255, 0.2);
    font-family: 'Orbitron', sans-serif;
    position: relative;
}

.datastream-header::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(0, 242, 255, 0.3);
}

.datastream-content {
    max-height: 200px;
    overflow-y: auto;
    font-size: 10px;
    color: #94a3b8;
    line-height: 1.6;
    padding-right: 0.5rem;
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
}

.datastream-content p {
    margin-bottom: 0.4rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    line-height: 1.6;
}

.datastream-content .text-red-700 {
    color: #ef4444;
    font-weight: bold;
}

.datastream-content .text-blue-700 {
    color: #00f2ff;
    font-weight: 500;
}

.datastream-content .text-green-700 {
    color: #10b981;
    font-weight: 500;
}

.datastream-content a {
    color: #00f2ff;
    text-decoration: underline;
    font-weight: 500;
}

.datastream-content a:hover {
    color: #ffffff;
}

#resultsOutput {
    display: none !important;
}

/* Grading Sheet Wedge Styles - Neon Green Tech Look */
#grading-sheet-wedge path {
    fill: rgba(0, 255, 157, 0.3);
    stroke: rgba(0, 255, 157, 0.5);
    stroke-width: 1px;
    transition: all 0.3s ease;
}

#grading-sheet-wedge:hover path {
    fill: rgba(0, 255, 157, 0.2);
    stroke: #00ff9d;
    stroke-width: 2px;
    filter: drop-shadow(0 0 8px rgba(0, 255, 157, 0.6));
}

#grading-sheet-wedge .wedge-text {
    fill: rgba(0, 255, 157, 0.7);
    font-family: 'Orbitron', sans-serif;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.2em;
    transition: all 0.3s ease;
    text-shadow: 0 0 2px rgba(0, 255, 157, 0.3);
}

#grading-sheet-wedge:hover .wedge-text {
    fill: #ffffff;
    text-shadow: 0 0 10px #00ff9d;
}

/* Free Trial Notice - Hanging from underside of Classes/Assignments bar */
#trialStatus {
    position: absolute;
    bottom: -28px;
    right: 0;
    font-family: 'Share Tech Mono', monospace;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #00f2ff;
    text-shadow: 
        0 0 4px #00f2ff,
        0 0 8px #00f2ff,
        0 0 12px #00f2ff,
        0 0 16px #00f2ff;
    animation: trial-glow 2s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 10;
    background: rgba(0, 242, 255, 0.05);
    padding: 2px 8px;
    border-radius: 2px;
    border: 1px solid rgba(0, 242, 255, 0.2);
    backdrop-filter: blur(2px);
}

#trialStatus::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0, 242, 255, 0.5), transparent);
}

#trialStatus::after {
    content: '●';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    color: #00f2ff;
    font-size: 6px;
    text-shadow: 0 0 4px #00f2ff;
    animation: pulse-dot 1s ease-in-out infinite;
}

@keyframes trial-glow {
    0% {
        text-shadow: 
            0 0 4px #00f2ff,
            0 0 8px #00f2ff,
            0 0 12px #00f2ff,
            0 0 16px #00f2ff;
        opacity: 0.8;
    }
    100% {
        text-shadow: 
            0 0 6px #00f2ff,
            0 0 12px #00f2ff,
            0 0 18px #00f2ff,
            0 0 24px #00f2ff;
        opacity: 1;
    }
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 0.5;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-50%) scale(1.2);
    }
}

/* Enhanced hover effect for trial notice */
#trialStatus:hover {
    text-shadow: 
        0 0 8px #00f2ff,
        0 0 16px #00f2ff,
        0 0 24px #00f2ff,
        0 0 32px #00f2ff;
    background: rgba(0, 242, 255, 0.1);
    border-color: rgba(0, 242, 255, 0.4);
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

/* QUOTA WARNING STYLES - Red visual feedback for API quota issues */
.quota-warning-active {
    border-color: #ff4444 !important;
    background-color: rgba(255, 68, 68, 0.1) !important;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.5) !important;
    color: #ff4444 !important;
}

.quota-warning-active::placeholder {
    color: rgba(255, 68, 68, 0.5) !important;
}

.stage-api-key-box.quota-warning-active .stage-api-header {
    color: #ff4444 !important;
    text-shadow: 0 0 8px rgba(255, 68, 68, 0.5) !important;
}

.quota-warning-active .stage-api-link {
    border-color: #ff4444 !important;
    color: #ff4444 !important;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.3) !important;
}

.quota-warning-active .stage-api-status .status-text {
    color: #ff4444 !important;
}

.quota-warning-active .stage-api-status .status-indicator {
    background: #ff4444 !important;
    box-shadow: 0 0 6px #ff4444 !important;
}




/* Stage 1 panel highlighting for quota warning - Custom Override */
.stage-panel.quota-warning-active {
    /* Reset generic active styles that affect children text/bg */
    box-shadow: none !important;
    border: none !important;
    background-color: transparent !important;
    color: inherit !important; /* Prevent text color bleed to children */
    overflow: visible; /* Ensure pseudo-element border isn't clipped */
}

/* Offset rounded border for the panel */
.stage-panel.quota-warning-active::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: none; /* Remove CSS border, we use the SVG path now */
    border-radius: 16px;
    pointer-events: none;
}



/* --- QUOTA WARNING VISUAL FEEDBACK STYLES --- */
/* Chart path container around Stage 1 panels */
.quota-chart-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 325px; /* Match Stage 1 panel width */
    height: 400px; /* Match approximate panel height */
    pointer-events: none; /* Let clicks pass through */
    z-index: 35; /* Keep warning line below picker/menu layer (center panel is z-40) */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quota-chart-container.active {
    opacity: 1;
}

.quota-chart-path {
    width: 100%;
    height: 100%;
}

.quota-chart-path .quota-line {
    fill: none;
    stroke: #ff4444; /* Make the line visible again, as it's now the border */
    stroke-width: 2px;
}

/* The animated text traveling on the path */
.quota-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 10px;
    font-weight: 700;
    fill: #ff4444;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0px 0px 2px rgba(255, 68, 68, 0.5);
}

/* The mask text that hides the line behind the visible text */
.quota-text-mask {
    font-family: 'Rajdhani', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    stroke: black; /* Black in a mask means 'hide' */
    stroke-width: 6px; /* Thick stroke to create a gap around the text */
    fill: black;
}

/* Keyframe animations */
/* @keyframes quota-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); }
    70% { box-shadow: 0 0 20px 10px rgba(255, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

@keyframes draw-path {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

@keyframes pulse-path {
    0% {
        stroke-width: 2;
        opacity: 0.8;
        filter: drop-shadow(0 0 2px #ff0000);
    }
    100% {
        stroke-width: 4;
        opacity: 1;
        filter: drop-shadow(0 0 12px #ff0000);
    }
} */

/* ============================================================
   SIGN-IN OVERLAY PANEL (Top-Center HUD)
   ============================================================ */
#appPanel {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.container {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#prePickerModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10100;
}

#signInPanel,
#subscriptionPanel,
#permissionPanel,
#prePickerModal .pre-picker-panel {
    margin: 0;
    padding: 1.1rem 1.1rem 1rem 1.1rem;
    border: 1px solid rgba(0, 242, 255, 0.45);
    border-radius: 0.6rem;
    background: linear-gradient(165deg, rgba(6, 20, 31, 0.36) 0%, rgba(3, 11, 20, 0.32) 100%);
    box-shadow:
        0 0 20px rgba(0, 242, 255, 0.2),
        inset 0 0 12px rgba(0, 242, 255, 0.06);
    color: #d6fbff;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
    position: relative;
}

#signInPanel,
#subscriptionPanel,
#permissionPanel {
    position: fixed;
    top: 15.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(38rem, calc(100vw - 2rem));
    z-index: 10050;
}

#signInPanel::before,
#subscriptionPanel::before,
#permissionPanel::before,
#prePickerModal .pre-picker-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 242, 255, 0.8), rgba(0, 242, 255, 0.08), rgba(0, 242, 255, 0.8));
}

#signInPanel::after,
#subscriptionPanel::after,
#permissionPanel::after,
#prePickerModal .pre-picker-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0, 242, 255, 0.7), transparent);
}

.signin-panel-header {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #00f2ff;
    margin-bottom: 0.45rem;
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.45);
}

#signInPanelCloseButton {
    position: absolute;
    top: 0.45rem;
    right: 0.55rem;
    width: 1.55rem;
    height: 1.55rem;
    border: 1px solid rgba(0, 242, 255, 0.35);
    border-radius: 0.3rem;
    background: rgba(0, 242, 255, 0.08);
    color: rgba(214, 251, 255, 0.95);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

#subscriptionPanelCloseButton {
    position: absolute;
    top: 0.45rem;
    right: 0.55rem;
    width: 1.55rem;
    height: 1.55rem;
    border: 1px solid rgba(0, 242, 255, 0.35);
    border-radius: 0.3rem;
    background: rgba(0, 242, 255, 0.08);
    color: rgba(214, 251, 255, 0.95);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

#permissionPanelCloseButton {
    position: absolute;
    top: 0.45rem;
    right: 0.55rem;
    width: 1.55rem;
    height: 1.55rem;
    border: 1px solid rgba(0, 242, 255, 0.35);
    border-radius: 0.3rem;
    background: rgba(0, 242, 255, 0.08);
    color: rgba(214, 251, 255, 0.95);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

#signInPanelCloseButton:hover {
    background: rgba(0, 242, 255, 0.18);
    border-color: rgba(0, 242, 255, 0.7);
    color: #ffffff;
}

#subscriptionPanelCloseButton:hover {
    background: rgba(0, 242, 255, 0.18);
    border-color: rgba(0, 242, 255, 0.7);
    color: #ffffff;
}

#permissionPanelCloseButton:hover {
    background: rgba(0, 242, 255, 0.18);
    border-color: rgba(0, 242, 255, 0.7);
    color: #ffffff;
}

#signInPanelCloseButton:focus-visible {
    outline: 2px solid rgba(0, 242, 255, 0.85);
    outline-offset: 2px;
}

#subscriptionPanelCloseButton:focus-visible {
    outline: 2px solid rgba(0, 242, 255, 0.85);
    outline-offset: 2px;
}

#permissionPanelCloseButton:focus-visible {
    outline: 2px solid rgba(0, 242, 255, 0.85);
    outline-offset: 2px;
}

.signin-status-text {
    margin-bottom: 0.85rem;
    color: rgba(198, 248, 255, 0.86);
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    line-height: 1.45;
}

.signin-note {
    text-align: left;
    margin-bottom: 0.65rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid rgba(0, 242, 255, 0.32);
    border-radius: 0.38rem;
    background: rgba(0, 242, 255, 0.035);
    box-shadow: inset 0 0 10px rgba(0, 242, 255, 0.06);
}

.signin-note.signin-note-secondary {
    border-color: rgba(0, 181, 211, 0.34);
    background: rgba(0, 181, 211, 0.03);
}

.signin-note-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #7ef4ff;
    margin-bottom: 0.2rem;
}

.signin-note p {
    margin: 0;
    color: rgba(203, 249, 255, 0.88);
    font-size: 0.74rem;
    line-height: 1.45;
    letter-spacing: 0.01em;
}

.signin-google-wrap {
    margin-top: 0.85rem;
    display: flex;
    justify-content: center;
}

#signInPanel #googleSignInButtonContainer {
    width: fit-content;
}

.subscription-action-row {
    margin-top: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: center;
}

.subscription-cta,
.permission-cta,
.pre-picker-continue-button,
#grantPermissionButton,
#prePickerContinueButton {
    appearance: none;
    border: 1px solid rgba(0, 242, 255, 0.48);
    border-radius: 0.45rem;
    background: linear-gradient(180deg, rgba(0, 242, 255, 0.16) 0%, rgba(0, 242, 255, 0.07) 100%);
    color: #c8fbff;
    box-shadow:
        inset 0 0 0 1px rgba(0, 242, 255, 0.16),
        0 0 12px rgba(0, 242, 255, 0.2);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    padding: 0.62rem 1rem;
    min-height: 2.4rem;
    cursor: pointer;
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.subscription-cta {
    flex: 1 1 13.75rem;
}

.permission-cta,
.pre-picker-continue-button,
#grantPermissionButton,
#prePickerContinueButton {
    width: min(18rem, 100%);
}

.subscription-cta-secondary {
    background: linear-gradient(180deg, rgba(0, 242, 255, 0.1) 0%, rgba(0, 242, 255, 0.04) 100%);
    border-color: rgba(126, 244, 255, 0.36);
    color: #aef3fb;
}

.subscription-cta:hover,
.permission-cta:hover,
.pre-picker-continue-button:hover,
#grantPermissionButton:hover,
#prePickerContinueButton:hover {
    border-color: rgba(0, 242, 255, 0.88);
    background: linear-gradient(180deg, rgba(0, 242, 255, 0.3) 0%, rgba(0, 242, 255, 0.14) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(0, 242, 255, 0.34),
        0 0 24px rgba(0, 242, 255, 0.45);
    color: #f1feff;
    transform: translateY(-1px);
}

.subscription-cta:active,
.permission-cta:active,
.pre-picker-continue-button:active,
#grantPermissionButton:active,
#prePickerContinueButton:active {
    transform: translateY(0);
    box-shadow:
        inset 0 0 0 1px rgba(0, 242, 255, 0.2),
        0 0 12px rgba(0, 242, 255, 0.24);
}

.subscription-cta:disabled,
.permission-cta:disabled,
.pre-picker-continue-button:disabled,
#grantPermissionButton:disabled,
#prePickerContinueButton:disabled {
    opacity: 0.58;
    cursor: not-allowed;
    box-shadow: none;
}
