@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Share+Tech+Mono&display=swap');

:root {
    --bg-deep: #0a0a0c;
    --bg-body: #0e0e12;
    --bg-panel: rgba(18, 18, 26, 0.92);
    --border: rgba(0, 255, 100, 0.15);
    --border-glow: rgba(0, 255, 100, 0.4);

    --neon-green: #00ff64;
    --neon-pink: #ff2d95;
    --neon-cyan: #00e5ff;
    --neon-yellow: #ffe600;
    --neon-orange: #ff8c00;
    --neon-purple: #b64dff;
    --neon-red: #ff3333;

    --text: #c8ffc8;
    --text-dim: #5a8a5a;
    --text-bright: #ffffff;

    --radius: 4px;
    --radius-sm: 2px;

    --font: 'Press Start 2P', monospace;
    --mono: 'Share Tech Mono', 'Courier New', monospace;

    --transition: .2s ease;
    --pixel-border: 3px solid var(--neon-green);
}


*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--mono);
    background: var(--bg-body);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.8;
    position: relative;
}


body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(to bottom,
            transparent 0px,
            transparent 2px,
            rgba(0, 0, 0, 0.12) 2px,
            rgba(0, 0, 0, 0.12) 4px);
    pointer-events: none;
    z-index: 9999;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    animation: crtFlicker 0.1s infinite;
    background: transparent;
}

@keyframes crtFlicker {
    0% {
        opacity: 0.02;
        background: rgba(0, 255, 100, 0.01);
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 0.02;
        background: rgba(0, 255, 100, 0.01);
    }
}

.app-header {
    position: relative;
    text-align: center;
    padding: 40px 24px 24px;
    z-index: 1;
}

.header-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 250px;
    background: radial-gradient(ellipse, rgba(0, 255, 100, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.header-title {
    font-family: var(--font);
    font-size: clamp(1rem, 3.5vw, 1.6rem);
    font-weight: 400;
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--neon-green);
    text-shadow:
        0 0 10px var(--neon-green),
        0 0 30px rgba(0, 255, 100, 0.3),
        0 0 60px rgba(0, 255, 100, 0.1);
    position: relative;
}

.title-icon {
    font-size: 1.2em;
    animation: arcadeBounce 1.5s ease-in-out infinite;
}

@keyframes arcadeBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.title-highlight {
    color: var(--neon-pink);
    text-shadow:
        0 0 10px var(--neon-pink),
        0 0 30px rgba(255, 45, 149, 0.3),
        0 0 60px rgba(255, 45, 149, 0.1);
}

.header-sub {
    font-family: var(--mono);
    color: var(--text-dim);
    margin-top: 10px;
    font-size: 0.85rem;
    letter-spacing: 2px;
}

.mode-bar {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 0 auto 20px;
    max-width: 700px;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.mode-btn {
    flex: 1;
    padding: 12px 16px;
    font-family: var(--font);
    font-size: 0.55rem;
    letter-spacing: 1px;
    border: 2px solid var(--neon-green);
    background: rgba(0, 255, 100, 0.05);
    color: var(--neon-green);
    cursor: pointer;
    transition: all var(--transition);
    text-transform: uppercase;
}

.mode-btn:first-child {
    border-radius: var(--radius) 0 0 var(--radius);
    border-right: none;
}

.mode-btn:nth-child(2) {
    border-radius: 0;
    border-right: none;
}

.mode-btn:last-child {
    border-radius: 0 var(--radius) var(--radius) 0;
}

.mode-btn.active {
    background: var(--neon-green);
    color: var(--bg-deep);
    box-shadow: 0 0 20px rgba(0, 255, 100, 0.3);
}

.mode-btn:hover:not(.active) {
    background: rgba(0, 255, 100, 0.12);
}

.pixel-card {
    background: var(--bg-panel);
    border: 2px solid rgba(0, 255, 100, 0.2);
    border-radius: var(--radius);
    box-shadow:
        inset 0 0 30px rgba(0, 255, 100, 0.03),
        0 0 15px rgba(0, 0, 0, 0.5);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.pixel-card:hover {
    border-color: rgba(0, 255, 100, 0.35);
    box-shadow:
        inset 0 0 30px rgba(0, 255, 100, 0.05),
        0 0 25px rgba(0, 255, 100, 0.1);
}

.panel {
    padding: 24px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.panel-title {
    font-family: var(--font);
    font-size: 0.65rem;
    font-weight: 400;
    margin-bottom: 16px;
    letter-spacing: 1px;
    color: var(--neon-green);
    text-shadow: 0 0 8px rgba(0, 255, 100, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.panel-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    position: relative;
}

.panel-header-row .panel-title {
    margin-bottom: 0;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 0 24px;
    z-index: 1;
    position: relative;
}

.select-wrap select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--neon-green);
    border: 2px solid rgba(0, 255, 100, 0.25);
    border-radius: var(--radius-sm);
    font-family: var(--mono);
    font-size: 0.82rem;
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300ff64' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.select-wrap select:focus {
    border-color: var(--neon-green);
    box-shadow: 0 0 12px rgba(0, 255, 100, 0.2);
}

.select-wrap select option {
    background: #0e0e12;
    color: var(--neon-green);
}

.info-tooltip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
}

.info-icon {
    cursor: help;
    font-size: 1rem;
    transition: transform var(--transition);
    user-select: none;
}

.info-icon:hover {
    transform: scale(1.2);
}

.info-tooltip {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    padding: 14px 16px;
    background: rgba(10, 10, 16, 0.97);
    border: 2px solid var(--neon-green);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.75rem;
    line-height: 1.6;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    z-index: 100;
    box-shadow: 0 0 20px rgba(0, 255, 100, 0.15);
}

.info-icon:hover+.info-tooltip,
.info-tooltip:hover {
    opacity: 1;
    pointer-events: auto;
}

.panel-header-row>.info-icon {
    margin-left: 4px;
}

.panel-header-row>.info-tooltip {
    left: 120px;
    top: 40px;
    transform: none;
}

.panel-header-row>.info-icon:hover~.info-tooltip,
.panel-header-row>.info-tooltip:hover {
    opacity: 1;
    pointer-events: auto;
}

.quantum-wrap {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantum-wrap label {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: var(--mono);
}

.quantum-wrap input {
    width: 72px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--neon-green);
    border: 2px solid rgba(0, 255, 100, 0.25);
    border-radius: var(--radius-sm);
    font-family: var(--mono);
    font-size: 0.85rem;
    outline: none;
    transition: border-color var(--transition);
}

.quantum-wrap input:focus {
    border-color: var(--neon-green);
    box-shadow: 0 0 8px rgba(0, 255, 100, 0.2);
}

.priority-note {
    margin-top: 8px;
    font-size: 0.7rem;
    color: var(--neon-yellow);
    text-shadow: 0 0 6px rgba(255, 230, 0, 0.3);
}

.btn-row {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 2px solid;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-weight: 400;
    font-size: 0.5rem;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.15s;
}

.btn:active::after {
    opacity: 0.15;
}

.btn-primary {
    background: var(--neon-green);
    border-color: var(--neon-green);
    color: var(--bg-deep);
    box-shadow: 0 0 15px rgba(0, 255, 100, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(0, 255, 100, 0.45);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-ghost {
    background: transparent;
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.btn-ghost:hover {
    background: rgba(0, 229, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.btn-add {
    background: transparent;
    border-color: var(--neon-yellow);
    color: var(--neon-yellow);
    padding: 8px 14px;
    font-size: 0.5rem;
}

.btn-add:hover {
    background: rgba(255, 230, 0, 0.1);
    box-shadow: 0 0 12px rgba(255, 230, 0, 0.2);
}

.btn-danger {
    background: transparent;
    border-color: var(--neon-red);
    color: var(--neon-red);
    margin-top: 10px;
}

.btn-danger:hover {
    background: rgba(255, 51, 51, 0.1);
    box-shadow: 0 0 12px rgba(255, 51, 51, 0.2);
}

.btn-sm {
    padding: 7px 12px;
    font-size: 0.45rem;
}

.btn-icon {
    font-size: 0.9rem;
}

.process-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.input-group label {
    font-family: var(--font);
    font-size: 0.45rem;
    font-weight: 400;
    color: var(--neon-cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(0, 229, 255, 0.3);
}

.input-group input {
    width: 72px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--neon-green);
    border: 2px solid rgba(0, 255, 100, 0.2);
    border-radius: var(--radius-sm);
    font-family: var(--mono);
    font-size: 0.85rem;
    outline: none;
    transition: border-color var(--transition);
}

.input-group input:focus {
    border-color: var(--neon-green);
    box-shadow: 0 0 8px rgba(0, 255, 100, 0.2);
}

.process-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

.process-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 2px solid;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 400;
    font-family: var(--mono);
    color: #fff;
    animation: chipIn .3s ease-out;
    position: relative;
    min-width: 130px;
    background: rgba(0, 0, 0, 0.4);
}

@keyframes chipIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(6px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.chip-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
}

.chip-remove {
    margin-left: auto;
    cursor: pointer;
    opacity: 0.5;
    font-size: 0.85rem;
    transition: opacity .15s;
}

.chip-remove:hover {
    opacity: 1;
}

.badge {
    background: var(--neon-pink);
    color: #fff;
    font-family: var(--font);
    font-size: 0.45rem;
    font-weight: 400;
    padding: 3px 8px;
    border-radius: 2px;
    min-width: 22px;
    text-align: center;
    box-shadow: 0 0 8px rgba(255, 45, 149, 0.3);
}

.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.45rem;
    letter-spacing: 1px;
    z-index: 10000;
    transition: all .3s ease;
    border: 2px solid;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: rgba(0, 255, 100, 0.15);
    color: var(--neon-green);
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 100, 0.15);
}

.toast.error {
    background: rgba(255, 51, 51, 0.15);
    color: var(--neon-red);
    border-color: var(--neon-red);
    box-shadow: 0 0 20px rgba(255, 51, 51, 0.15);
}

.hidden {
    display: none !important;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 100, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 100, 0.4);
}

.app-footer {
    text-align: center;
    padding: 24px 20px;
    margin-top: 40px;
    border-top: 2px solid rgba(0, 255, 100, 0.1);
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    position: relative;
    z-index: 1;
}

.app-footer a {
    color: var(--neon-green);
    text-decoration: none;
    margin-left: 8px;
    transition: text-shadow var(--transition);
}

.app-footer a:hover {
    text-shadow: 0 0 10px rgba(0, 255, 100, 0.5);
}

.footer-sub {
    font-size: 0.65rem;
    color: rgba(90, 138, 90, 0.5);
    margin-top: 6px;
    letter-spacing: 1px;
}

@media (max-width: 860px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .process-form {
        flex-direction: column;
        align-items: stretch;
    }

    .input-group input {
        width: 100%;
    }

    .mode-bar {
        flex-direction: column;
    }

    .mode-btn {
        border-radius: var(--radius-sm) !important;
        border: 2px solid var(--neon-green) !important;
    }
}
