
/* =========================================
   J.A.R.V.I.S. COMMAND CENTER 0.6
   ========================================= */

#jarvis {
    --jh-blue: #00e5ff;
    --jh-electric: #0066ff;
    --jh-white: #ffffff;
    --jh-muted: #8ca4bd;
    --jh-border: rgba(0, 229, 255, 0.16);
    color: var(--jh-white);
}

#jarvis * {
    box-sizing: border-box;
}

.jh-root {
    display: grid;
    gap: 23px;
    animation: jh-enter .55s ease both;
}

@keyframes jh-enter {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jh-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.jh-overline {
    font-size: 11px;
    letter-spacing: 3px;
    font-weight: 800;
    color: var(--jh-blue);
}

.jh-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--jh-blue);
}

.jh-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--jh-blue);
    box-shadow: 0 0 14px var(--jh-blue);
    animation: jh-blink 1.6s infinite;
}

@keyframes jh-blink {
    50% { opacity: .4; }
}

.jh-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    align-items: center;
    gap: 26px;
    min-height: 330px;
    padding: 36px;
    border-radius: 25px;
    border: 1px solid rgba(0, 229, 255, .25);
    background:
        radial-gradient(
            circle at 75% 48%,
            rgba(0, 102, 255, .19),
            transparent 43%
        ),
        linear-gradient(135deg, #0c1727, #040810 80%);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}

.jh-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .16;
    background-image:
        linear-gradient(#0066ff 1px, transparent 1px),
        linear-gradient(90deg, #0066ff 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(90deg, transparent 15%, black);
}

.jh-hero-copy,
.jh-face-area {
    position: relative;
    z-index: 1;
}

.jh-version {
    color: var(--jh-blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 3px;
}

.jh-hero h1 {
    margin: 18px 0;
    font-size: clamp(34px, 4.4vw, 66px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -2px;
}

.jh-hero h1 span {
    color: var(--jh-blue);
    text-shadow: 0 0 28px rgba(0, 229, 255, .4);
}

.jh-hero p {
    max-width: 480px;
    margin-bottom: 22px;
    color: #a5b5c9;
    font-size: 15px;
    line-height: 1.7;
}

.jh-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.jh-button {
    padding: 12px 19px;
    border: 1px solid #00e5ff;
    border-radius: 11px;
    color: #00131c;
    background: var(--jh-blue);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .7px;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}

.jh-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(0, 229, 255, .32);
}

.jh-button.secondary {
    color: #d5f8ff;
    background: rgba(0, 229, 255, .06);
}

.jh-face-area {
    display: grid;
    justify-items: center;
    gap: 16px;
}

.jh-face-ring {
    width: 230px;
    height: 230px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 2px solid rgba(0, 229, 255, .8);
    box-shadow:
        0 0 22px rgba(0, 229, 255, .4),
        inset 0 0 28px rgba(0, 102, 255, .24);
    background: radial-gradient(circle, #142437, #02050b 70%);
    animation: jh-breathe 3.5s ease-in-out infinite;
}

@keyframes jh-breathe {
    0%, 100% {
        box-shadow: 0 0 14px rgba(0, 229, 255, .25);
    }
    50% {
        box-shadow: 0 0 42px rgba(0, 229, 255, .6);
    }
}

.jh-face-ring svg {
    width: 175px;
    max-width: 85%;
    filter: drop-shadow(0 0 10px rgba(0, 229, 255, .22));
}

.jh-core-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--jh-blue);
}

.jh-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.jh-panel {
    padding: 24px;
    border: 1px solid var(--jh-border);
    border-radius: 20px;
    background: linear-gradient(140deg, #101b2c, #080e19);
    min-width: 0;
}

.jh-stat {
    position: relative;
    overflow: hidden;
}

.jh-stat::after {
    content: "";
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    background: rgba(0, 102, 255, .12);
    filter: blur(35px);
}

.jh-stat-label {
    color: var(--jh-muted);
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 800;
}

.jh-stat-value {
    margin: 12px 0 4px;
    font-size: clamp(28px, 3vw, 43px);
    font-weight: 900;
    color: var(--jh-blue);
}

.jh-stat-caption {
    color: var(--jh-muted);
    font-size: 12px;
}

.jh-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 20px;
}

.jh-panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
}

.jh-panel-heading h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
}

.jh-panel-heading span {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--jh-blue);
}

.jh-progress {
    height: 9px;
    border-radius: 100px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
}

.jh-progress-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #0066ff, #00e5ff);
    box-shadow: 0 0 16px #00e5ff;
    transition: width .5s ease;
}

.jh-progress-info {
    margin-top: 12px;
    color: var(--jh-muted);
    font-size: 12px;
}

.jh-form {
    display: flex;
    gap: 10px;
    margin: 24px 0 18px;
}

.jh-form input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(0, 229, 255, .2);
    border-radius: 11px;
    padding: 13px 14px;
    color: white;
    background: #050d19;
    outline: none;
    font: inherit;
}

.jh-form input:focus {
    border-color: #00e5ff;
}

.jh-task-list {
    display: grid;
    gap: 9px;
}

.jh-task {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;
    background: rgba(255,255,255,.025);
}

.jh-task input {
    width: 19px;
    height: 19px;
    accent-color: #00e5ff;
    cursor: pointer;
}

.jh-task-text {
    flex: 1;
    min-width: 0;
    color: #edf6ff;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.jh-task.done .jh-task-text {
    text-decoration: line-through;
    color: #73849a;
}

.jh-delete {
    border: 0;
    padding: 5px;
    color: #93a5bb;
    background: none;
    cursor: pointer;
    font-size: 17px;
}

.jh-delete:hover {
    color: #ff738e;
}

.jh-module-list {
    display: grid;
    gap: 12px;
}

.jh-module {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px;
    border: 1px solid rgba(0, 229, 255, .1);
    border-radius: 12px;
    background: rgba(0, 102, 255, .04);
}

.jh-module-icon {
    width: 41px;
    height: 41px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(0, 229, 255, .25);
    border-radius: 11px;
    color: #00e5ff;
    background: #0a1c2d;
    font-size: 21px;
}

.jh-module-details {
    flex: 1;
    min-width: 0;
}

.jh-module-name {
    font-size: 13px;
    font-weight: 800;
}

.jh-module-desc {
    margin-top: 4px;
    color: var(--jh-muted);
    font-size: 11px;
}

.jh-module-state {
    color: #00e5ff;
    font-size: 10px;
    letter-spacing: 1px;
}

.jh-empty {
    color: var(--jh-muted);
    font-size: 13px;
    padding: 18px 0;
}

@media (max-width: 1000px) {
    .jh-hero {
        grid-template-columns: minmax(0, 1fr) 190px;
    }

    .jh-face-ring {
        width: 185px;
        height: 185px;
    }

    .jh-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .jh-hero {
        grid-template-columns: 1fr;
        padding: 25px;
    }

    .jh-face-area {
        grid-row: 1;
    }

    .jh-stats {
        grid-template-columns: 1fr;
    }

    .jh-topline {
        align-items: flex-start;
        flex-direction: column;
    }

    .jh-form {
        flex-direction: column;
    }

    .jh-button {
        width: 100%;
    }

    .jh-panel {
        padding: 19px;
    }

    .jh-module {
        flex-wrap: wrap;
    }
}

/* =========================================
   MY UNIVERSE 0.7
   LIVING AI - TERMINAL & FACE ANIMATIONS
   ========================================= */

.jh-terminal-panel {
    padding: 0;
    overflow: hidden;
    border-color: rgba(0, 229, 255, 0.28);
    box-shadow:
        0 0 30px rgba(0, 102, 255, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

.jh-terminal-panel .jh-panel-heading {
    padding: 23px 25px 0;
}

.jh-terminal-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 42px;
    padding: 10px 18px;
    background: #0d1827;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(0,229,255,0.12);
}

.jh-terminal-lights {
    display: flex;
    gap: 6px;
}

.jh-terminal-lights i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0066ff;
    box-shadow: 0 0 7px rgba(0,102,255,0.5);
}

.jh-terminal-lights i:nth-child(2) {
    background: #00e5ff;
}

.jh-terminal-lights i:nth-child(3) {
    background: #286184;
}

.jh-terminal-topbar > span {
    flex: 1;
    font-size: 10px;
    letter-spacing: 2px;
    color: #8da7c3;
}

.jh-clear-button {
    border: 0;
    color: #8da7c3;
    background: none;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
}

.jh-clear-button:hover {
    color: #00e5ff;
}

.jh-terminal-output {
    min-height: 250px;
    max-height: 370px;
    overflow-y: auto;
    padding: 23px;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent 3px,
            rgba(0,229,255,0.008) 4px
        ),
        #030914;
    scrollbar-color: #174767 transparent;
    scrollbar-width: thin;
}

.jh-log-line {
    display: flex;
    gap: 14px;
    margin-bottom: 17px;
    color: #c6d6e9;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    animation: jh-log-appear .22s ease both;
}

@keyframes jh-log-appear {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jh-log-prefix {
    flex-shrink: 0;
    color: #00e5ff;
    font-weight: 800;
}

.jh-log-line.user .jh-log-prefix {
    color: #748ca8;
}

.jh-log-line.jarvis {
    color: #dcf8ff;
}

.jh-command-form {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 19px;
    background: #091322;
    border-top: 1px solid rgba(0,229,255,0.16);
}

.jh-prompt {
    color: #00e5ff;
    font-size: 25px;
    font-weight: 800;
    text-shadow: 0 0 12px rgba(0,229,255,0.55);
}

.jh-command-form input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 10px 3px;
    color: #ffffff;
    background: transparent;
    font: 14px Consolas, "Courier New", monospace;
}

.jh-command-form input::placeholder {
    color: #577089;
}

.jh-command-form input:disabled {
    opacity: .45;
}

.jh-command-send {
    padding: 11px 17px;
    border: 1px solid #00e5ff;
    border-radius: 9px;
    color: #001018;
    background: #00e5ff;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    transition: box-shadow .2s, transform .2s;
}

.jh-command-send:hover {
    box-shadow: 0 0 18px rgba(0,229,255,0.3);
    transform: translateY(-1px);
}

.jh-terminal-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: #748aa4;
    font-size: 11px;
    background: #091322;
}

.jh-voice-button {
    padding: 9px 13px;
    border: 1px solid rgba(0,229,255,.28);
    border-radius: 9px;
    color: #00e5ff;
    background: rgba(0,229,255,.05);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .7px;
    cursor: pointer;
}

.jh-voice-button:hover {
    background: rgba(0,229,255,.14);
}

/* REAZIONI DEL VOLTO */

.jh-face-ring {
    transition:
        box-shadow .3s ease,
        border-color .3s ease,
        transform .3s ease;
}

.jh-face-eyes {
    transform-origin: center;
}

.jh-listening {
    border-color: #44f3ff;
    box-shadow:
        0 0 30px rgba(0,229,255,.55),
        inset 0 0 35px rgba(0,229,255,.18);
}

.jh-listening .jh-face-eyes {
    animation: jh-eye-scan 1.3s ease-in-out infinite;
}

@keyframes jh-eye-scan {
    0%, 100% {
        transform: translateX(0);
        opacity: 1;
    }
    50% {
        transform: translateX(4px);
        opacity: .65;
    }
}

.jh-processing {
    border-color: #0066ff;
    animation: jh-processing-ring .55s ease-in-out infinite;
}

.jh-processing .jh-face-eyes {
    animation: jh-processing-eyes .4s infinite alternate;
}

@keyframes jh-processing-ring {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0,102,255,.3);
        transform: scale(.99);
    }
    50% {
        box-shadow: 0 0 44px rgba(0,102,255,.8);
        transform: scale(1.03);
    }
}

@keyframes jh-processing-eyes {
    from { opacity: .3; }
    to { opacity: 1; }
}

.jh-speaking .jh-face-mouth {
    transform-origin: 90px 156px;
    animation: jh-talk .24s ease-in-out infinite alternate;
}

.jh-speaking .jh-face-eyes {
    filter: drop-shadow(0 0 5px #00e5ff);
}

@keyframes jh-talk {
    from {
        transform: scaleY(.65);
        opacity: .6;
    }
    to {
        transform: scaleY(1.6);
        opacity: 1;
    }
}

@media (max-width: 650px) {
    .jh-terminal-output {
        padding: 15px;
        min-height: 200px;
    }

    .jh-log-line {
        gap: 8px;
        font-size: 11px;
    }

    .jh-terminal-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .jh-command-form {
        gap: 8px;
        padding: 12px;
    }

    .jh-command-send {
        padding: 10px;
    }

    .jh-terminal-topbar > span {
        font-size: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jh-face-ring,
    .jh-face-eyes,
    .jh-face-mouth,
    .jh-log-line {
        animation: none !important;
    }
}
