/* ============================================================
   J.A.R.V.I.S PROTOCOL CSS — HAINEO NEURAL OS
   Iron Man Style — Voice-Only Holographic Interface
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@400;700;900&display=swap');

/* ── JARVIS CIRCLE BUTTON ────────────────────────────── */
#jarvis-pill {
    position: fixed !important;
    bottom: 148px;
    right: 16px;
    z-index: 9999 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
#jarvis-pill.visible {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0);
    animation: gentle-float 4s ease-in-out infinite;
}
@keyframes gentle-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}


#jarvis-pill-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    /* Prominent 76px Circle shape — Flagship AI Assistant */
    width: 76px;
    height: 76px;
    border-radius: 50%;
    padding: 0;
    background: rgba(0, 10, 20, 0.85);
    border: 1.5px solid rgba(0, 243, 255, 0.45);
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10.5px;
    color: #00f3ff;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 32px rgba(0, 243, 255, 0.25), inset 0 0 16px rgba(0, 243, 255, 0.1);
    white-space: nowrap;
}

#jarvis-pill-btn:hover {
    background: rgba(0, 243, 255, 0.15);
    border-color: #00f3ff;
    box-shadow: 0 0 28px rgba(0, 243, 255, 0.4);
    transform: scale(1.08);
}

#jarvis-pill-btn.ready {
    animation: pill-breathe 3s ease-in-out infinite;
}

#jarvis-pill-btn.active {
    background: rgba(0, 243, 255, 0.2);
    border-color: #00f3ff;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.6);
    animation: pill-pulse 1s ease-in-out infinite;
}

@keyframes pill-breathe {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 243, 255, 0.2); }
    50%       { box-shadow: 0 0 24px rgba(0, 243, 255, 0.55); }
}

@keyframes pill-pulse {
    0%, 100% { box-shadow: 0 0 18px rgba(0, 243, 255, 0.45); }
    50%       { box-shadow: 0 0 40px rgba(0, 243, 255, 0.95); }
}

#jarvis-pill-icon {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00f3ff;
    flex-shrink: 0;
    box-shadow: 0 0 6px #00f3ff;
    margin-bottom: 2px;
}

#jarvis-pill-icon.loading {
    animation: dot-blink 0.8s ease-in-out infinite;
}

@keyframes dot-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.2; }
}

/* ── PROGRESS BAR ────────────────────────────────────── */
#jarvis-progress-wrap {
    width: 100%;
    height: 2px;
    background: rgba(0, 243, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

#jarvis-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00f3ff, #0088ff);
    border-radius: 999px;
    transition: width 0.4s ease;
    box-shadow: 0 0 6px #00f3ff;
}

/* ── FULLSCREEN MODAL ────────────────────────────────── */
#jarvis-modal {
    position: fixed !important;
    inset: 0;
    z-index: 99999 !important;
    background: rgba(0, 3, 12, 0.96);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    overflow: hidden;
    font-family: 'Share Tech Mono', monospace;
}

#jarvis-modal.open {
    opacity: 1;
    pointer-events: all;
}

/* Scanline hologram overlay */
#jarvis-modal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 2px,
        rgba(0, 243, 255, 0.018) 2px,
        rgba(0, 243, 255, 0.018) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* Subtle vignette */
#jarvis-modal::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.7) 100%);
    pointer-events: none;
    z-index: 1;
}

/* ── HEADER BAR ──────────────────────────────────────── */
#jarvis-header {
    position: absolute;
    top: 16px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header-center h3 {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    letter-spacing: 2px;
    color: #00f3ff;
}

.chat-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    #jarvis-header {
        flex-direction: column;
        gap: 8px;
        top: 10px;
        left: 10px;
        right: 10px;
    }
    .chat-header-left {
        justify-content: center;
    }
}

/* ── CINEMATIC INTRO OVERLAY ───────────────────────────── */
#jarvis-intro-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 20000;
    background: #000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#jarvis-intro-overlay.active { display: flex; }
#jarvis-intro-overlay.fade-out { animation: intro-fade-out 0.8s ease forwards; }

@keyframes intro-fade-out { to { opacity: 0; } }

#jarvis-intro-canvas {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}

#jarvis-intro-hex {
    position: absolute;
    inset: -50%;
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    z-index: 2;
    transition: all 4s ease-out;
}
#jarvis-intro-hex.active {
    opacity: 1;
    transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(0);
}

.jarvis-intro-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 300px;
}

#jarvis-intro-boot, #jarvis-intro-welcome, #jarvis-intro-sub {
    font-family: 'Share Tech Mono', monospace;
    color: rgba(0, 243, 255, 0.8);
    letter-spacing: 0.3em;
}

#jarvis-intro-boot {
    font-size: clamp(10px, 2vw, 14px);
    height: 20px;
    margin-bottom: 20px;
}

#jarvis-intro-welcome {
    font-size: clamp(12px, 2.5vw, 18px);
    height: 25px;
    margin-bottom: 10px;
}

#jarvis-intro-text {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(40px, 10vw, 120px);
    font-weight: 200;
    color: #00f3ff;
    letter-spacing: 0.2em;
    margin: 0;
    height: clamp(50px, 12vw, 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#jarvis-intro-text.glow-pulse {
    animation: j-glow-pulse 2s infinite alternate;
}
@keyframes j-glow-pulse {
    from { filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5)); }
    to { filter: drop-shadow(0 0 25px rgba(0, 243, 255, 0.9)) drop-shadow(0 0 45px rgba(0, 243, 255, 0.4)); }
}

#jarvis-intro-sub {
    font-size: clamp(8px, 1.5vw, 14px);
    height: 20px;
    margin-top: 15px;
}
#jarvis-intro-sub.glow-stable {
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.6);
}

#jarvis-intro-scanline {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0,243,255,0.8), transparent);
    box-shadow: 0 0 20px rgba(0,243,255,0.6), 0 0 40px rgba(0,243,255,0.3);
    opacity: 0;
    z-index: 5;
}
#jarvis-intro-scanline.active {
    animation: scanline-sweep 2.5s ease-in-out infinite;
}
@keyframes scanline-sweep {
    0% { top: -10%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 110%; opacity: 0; }
}

#jarvis-intro-skip {
    position: absolute;
    bottom: 30px;
    background: transparent;
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: rgba(0, 243, 255, 0.5);
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 2px;
    padding: 6px 12px;
    cursor: pointer;
    z-index: 20;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
}
#jarvis-intro-skip.visible {
    opacity: 1;
    pointer-events: auto;
}
#jarvis-intro-skip:hover {
    background: rgba(0, 243, 255, 0.1);
    color: #00f3ff;
    border-color: #00f3ff;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

#jarvis-main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 10;
    padding: 80px 20px 60px;
    overflow-y: auto;
    box-sizing: border-box;
}

/* ── HERO TITLE ──────────────────────────────────────── */
#jarvis-hero-wrap {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 2vh;
}
#jarvis-hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(32px, 6vw, 80px);
    font-weight: 200;
    color: #ffffff;
    letter-spacing: 1.5vw;
    margin: 0;
    text-shadow: 0 0 15px rgba(0, 243, 255, 0.6), 0 0 30px rgba(0, 243, 255, 0.2);
    opacity: 0;
    animation: hero-glitch-in 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
}
#jarvis-hero-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(10px, 1.5vw, 14px);
    color: rgba(0, 243, 255, 0.9);
    letter-spacing: 0.3em;
    opacity: 0;
    animation: fade-in-up 1.5s ease forwards 1s;
}

@keyframes hero-glitch-in {
    0% { opacity: 0; filter: blur(15px); transform: scale(1.1) translateY(-20px); }
    50% { opacity: 0.8; filter: blur(4px); transform: scale(1.02) translateY(0); }
    100% { opacity: 1; filter: blur(0); transform: scale(1) translateY(0); }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── HUD CORE (Center) ───────────────────────────────── */
#jarvis-hud-wrap {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
    max-width: 800px;
}

#jarvis-hud {
    position: relative;
    width: 340px;
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Rings */
.j-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    box-sizing: border-box;
}

.j-ring-1 {
    width: 320px; height: 320px;
    border-top: 2px solid rgba(0, 243, 255, 0.7);
    border-bottom: 2px solid rgba(0, 243, 255, 0.7);
    animation: spin-r 6s linear infinite;
}

.j-ring-2 {
    width: 290px; height: 290px;
    border: 1.5px dashed rgba(0, 243, 255, 0.35);
    animation: spin-l 10s linear infinite;
}

.j-ring-3 {
    width: 260px; height: 260px;
    border-left: 3px solid rgba(0, 243, 255, 0.8);
    border-right: 3px solid rgba(0, 243, 255, 0.8);
    animation: spin-l 4s linear infinite;
}

.j-ring-4 {
    width: 230px; height: 230px;
    border-top: 1px solid rgba(0, 243, 255, 0.2);
    border-right: 1px solid rgba(0, 243, 255, 0.2);
    animation: spin-r 8s linear infinite;
}

.j-ring-5 {
    width: 190px; height: 190px;
    border: 1px dotted rgba(0, 243, 255, 0.25);
    animation: spin-r 15s linear infinite;
}

/* Core */
#jarvis-core {
    position: relative;
    z-index: 10;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(0, 243, 255, 0.9) 0%,
        rgba(0, 150, 200, 0.5) 35%,
        rgba(0, 50, 100, 0.2) 65%,
        transparent 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 30px rgba(0, 243, 255, 0.6),
        0 0 60px rgba(0, 243, 255, 0.2),
        inset 0 0 30px rgba(0, 243, 255, 0.1);
    animation: core-idle 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

#jarvis-core.j-interactive {
    cursor: pointer;
}

#jarvis-core.j-interactive:hover {
    box-shadow:
        0 0 45px rgba(0, 243, 255, 0.9),
        0 0 90px rgba(0, 243, 255, 0.4),
        inset 0 0 35px rgba(0, 243, 255, 0.2);
}

#jarvis-core.speaking {
    animation: core-speak 0.4s ease-in-out infinite alternate;
    box-shadow:
        0 0 50px rgba(0, 243, 255, 0.9),
        0 0 100px rgba(0, 243, 255, 0.4),
        inset 0 0 40px rgba(0, 243, 255, 0.3);
}

#jarvis-core.listening {
    animation: core-listen 0.8s ease-in-out infinite alternate;
    box-shadow:
        0 0 40px rgba(255, 200, 0, 0.7),
        0 0 80px rgba(255, 200, 0, 0.2);
    background: radial-gradient(circle,
        rgba(255, 220, 50, 0.9) 0%,
        rgba(200, 150, 0, 0.4) 40%,
        transparent 70%
    );
}

#jarvis-core-label {
    font-family: 'Orbitron', monospace;
    font-size: 9px;
    font-weight: 700;
    color: rgba(0, 243, 255, 0.9);
    letter-spacing: 2px;
    text-align: center;
    line-height: 1.4;
    text-shadow: 0 0 8px #00f3ff;
}

@keyframes spin-r { 100% { transform: rotate(360deg); } }
@keyframes spin-l { 100% { transform: rotate(-360deg); } }

@keyframes core-idle {
    0%, 100% { transform: scale(0.95); opacity: 0.8; }
    50%       { transform: scale(1.05); opacity: 1; }
}

@keyframes core-speak {
    from { transform: scale(1.0); filter: brightness(1); }
    to   { transform: scale(1.15); filter: brightness(1.4); }
}

@keyframes core-listen {
    from { transform: scale(1.0); }
    to   { transform: scale(1.08); }
}

/* Audio waveform bars (visible when speaking) */
#jarvis-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 40px;
    margin-top: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}

#jarvis-wave.active { opacity: 1; }

.j-wave-bar {
    width: 3px;
    border-radius: 2px;
    background: #00f3ff;
    box-shadow: 0 0 6px #00f3ff;
    animation: wave-bar 0.5s ease-in-out infinite alternate;
}

.j-wave-bar:nth-child(1)  { animation-delay: 0.0s; height: 8px; }
.j-wave-bar:nth-child(2)  { animation-delay: 0.1s; height: 20px; }
.j-wave-bar:nth-child(3)  { animation-delay: 0.2s; height: 35px; }
.j-wave-bar:nth-child(4)  { animation-delay: 0.05s; height: 28px; }
.j-wave-bar:nth-child(5)  { animation-delay: 0.15s; height: 40px; }
.j-wave-bar:nth-child(6)  { animation-delay: 0.25s; height: 30px; }
.j-wave-bar:nth-child(7)  { animation-delay: 0.1s; height: 18px; }
.j-wave-bar:nth-child(8)  { animation-delay: 0.2s; height: 10px; }
.j-wave-bar:nth-child(9)  { animation-delay: 0.3s; height: 25px; }
.j-wave-bar:nth-child(10) { animation-delay: 0.05s; height: 14px; }
.j-wave-bar:nth-child(11) { animation-delay: 0.15s; height: 32px; }
.j-wave-bar:nth-child(12) { animation-delay: 0.25s; height: 22px; }

@keyframes wave-bar {
    from { height: 4px; opacity: 0.4; }
    to   { opacity: 1; }
}

/* ── TRANSCRIPT AREA ─────────────────────────────────── */
#jarvis-transcript {
    width: 100%;
    max-width: 700px;
    max-height: 260px;
    overflow-y: auto;
    padding: 0 20px;
    margin-top: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 243, 255, 0.2) transparent;
}

#jarvis-transcript::-webkit-scrollbar {
    width: 3px;
}
#jarvis-transcript::-webkit-scrollbar-thumb {
    background: rgba(0, 243, 255, 0.3);
    border-radius: 2px;
}

#jarvis-partial {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    color: rgba(0, 243, 255, 0.6);
    text-align: center;
    margin-top: 10px;
    font-style: italic;
    min-height: 20px;
    width: 100%;
}

.j-line {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 243, 255, 0.06);
    animation: j-line-in 0.4s ease forwards;
    opacity: 0;
    text-align: center; /* PERFECT SYMMETRY */
}

@keyframes j-line-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.j-line-label {
    font-family: 'Orbitron', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
    display: block;
    text-align: center;
}

.j-line-label.jarvis { color: rgba(0, 243, 255, 0.5); }
.j-line-label.user   { color: rgba(255, 255, 255, 0.35); }

.j-line-text {
    font-family: 'Share Tech Mono', monospace;
    display: block;
    line-height: 1.6;
    text-align: center;
}

.j-line-text.jarvis {
    font-size: 18px;
    color: #00f3ff;
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.4);
}

.j-line-text.user {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
}

/* Typewriter cursor */
.j-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #00f3ff;
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 0.7s step-end infinite;
    box-shadow: 0 0 6px #00f3ff;
}

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

/* ── STATUS BAR (BOTTOM HUD) ─────────────────────────── */
#jarvis-status-bar {
    position: absolute;
    bottom: 15px;
    left: 20px; right: 20px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    font-family: 'Share Tech Mono', monospace;
    color: rgba(0, 243, 255, 0.6);
}

.j-status-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.4), transparent);
    margin-bottom: 8px;
    position: relative;
}
.j-status-line::after {
    content: '';
    position: absolute;
    top: -1px; left: 50%;
    width: 30px; height: 3px;
    background: #00f3ff;
    box-shadow: 0 0 10px #00f3ff;
    transform: translateX(-50%);
}

.j-status-content {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.j-status-item { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.j-status-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #00f3ff;
    box-shadow: 0 0 8px #00f3ff;
    animation: dot-blink 1.5s ease-in-out infinite;
}

.j-progress {
    width: 60px;
    height: 4px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
}
.j-progress-bar {
    height: 100%;
    background: #00f3ff;
    box-shadow: 0 0 5px #00f3ff;
    animation: progress-pulse 2s infinite alternate;
}

@keyframes progress-pulse {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

@media (max-width: 600px) {
    .j-status-content { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .hide-mobile { display: none !important; }
    
    /* Ensure countdown timer is visible on mobile */
    #jarvis-countdown-wrap {
        display: inline-flex !important;
        align-items: center;
        gap: 4px;
        font-size: 10px;
        color: rgba(0, 243, 255, 0.8);
        margin-top: 4px;
    }
    
    #jarvis-countdown-ticker {
        font-family: 'Share Tech Mono', monospace;
        font-size: 10px;
        color: #00f3ff;
    }
    
    /* Ensure chat header left section displays countdown on mobile */
    .chat-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* ── LANGUAGE & VOICE OS SELECTOR PANEL (CENTERED BELOW HUD CIRCLE) ── */
#jarvis-lang-panel {
    position: relative;
    margin: 18px auto 14px auto;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(10, 15, 25, 0.85);
    border: 1px solid rgba(0, 243, 255, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 6px 14px;
    border-radius: 30px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(0, 243, 255, 0.1);
    transition: all 0.3s ease;
}

.j-lang-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1.5px;
    margin-right: 2px;
    margin-left: 4px;
}

.j-lang-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.25s ease;
}

.j-lang-btn:hover {
    background: rgba(0, 243, 255, 0.15);
    color: #fff;
    border-color: rgba(0, 243, 255, 0.5);
}

.j-lang-btn.active {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.25) 0%, rgba(212, 175, 55, 0.25) 100%);
    border: 1.5px solid #00f3ff;
    color: #00f3ff;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.8);
}

.j-lang-btn .flag {
    font-size: 12px;
    line-height: 1;
}

#jarvis-lang-toggle {
    position: absolute;
    top: 48px;
    left: 30px;
    z-index: 100;
    background: none;
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: rgba(0, 243, 255, 0.7);
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 2px;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
}
#jarvis-lang-toggle:hover {
    background: rgba(0, 243, 255, 0.1);
    color: #00f3ff;
    border-color: #00f3ff;
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.3);
}
#jarvis-lang-toggle.id { color: #00ff88; border-color: rgba(0,255,136,0.4); }
#jarvis-lang-toggle.en { color: #00f3ff; border-color: rgba(0,243,255,0.4); }

/* ── IDLE INDICATOR ──────────────────────────────────── */
#jarvis-idle-bar {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    gap: 6px;
    align-items: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    color: rgba(255, 180, 0, 0.5);
    letter-spacing: 2px;
    z-index: 100;
}
#jarvis-idle-bar.visible { display: flex; }
#jarvis-idle-pip {
    width: 5px; height: 5px; border-radius: 50%;
    background: rgba(255,180,0,0.7);
    animation: dot-blink 1.5s ease-in-out infinite;
}

/* ── MOBILE ──────────────────────────────────────────── */
@media (max-width: 600px) {
    #jarvis-pill { right: 16px !important; bottom: 148px !important; opacity: 1 !important; pointer-events: auto !important; }
    #jarvis-pill-btn { width: 76px !important; height: 76px !important; border-radius: 50% !important; padding: 0 !important; font-size: 10px !important; }

    #jarvis-main-content {
        padding: 100px 15px 70px !important;
        justify-content: flex-start;
    }

    #jarvis-hud { width: 240px; height: 240px; }
    .j-ring-1 { width: 230px; height: 230px; }
    .j-ring-2 { width: 206px; height: 206px; }
    .j-ring-3 { width: 185px; height: 185px; }
    .j-ring-4 { width: 162px; height: 162px; }
    .j-ring-5 { width: 135px; height: 135px; }
    #jarvis-core { width: 80px; height: 80px; }
    #jarvis-core-label { font-size: 7px; }

    .j-line-text.jarvis { font-size: 15px; }
    .j-line-text.user   { font-size: 13px; }

    #jarvis-header { font-size: 9px; }
    #jarvis-lang-toggle { top: 16px; left: 15px; font-size: 9px; padding: 6px 10px; }
}

/* ── CORNER HUD DECORATORS ────────────────────────────── */
.hud-bracket {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid rgba(0, 243, 255, 0.5);
    z-index: 50;
    pointer-events: none;
    transition: all 0.3s;
}

.hud-bracket.top-left {
    top: 20px; left: 20px;
    border-right: none; border-bottom: none;
}
.hud-bracket.top-right {
    top: 20px; right: 20px;
    border-left: none; border-bottom: none;
}
.hud-bracket.bottom-left {
    bottom: 20px; left: 20px;
    border-right: none; border-top: none;
}
.hud-bracket.bottom-right {
    bottom: 20px; right: 20px;
    border-left: none; border-top: none;
}

/* Add pulsing glow to brackets */
#chat-modal:not(.closing) .hud-bracket {
    animation: bracket-glow 3s infinite alternate;
}
@keyframes bracket-glow {
    0% { opacity: 0.4; filter: drop-shadow(0 0 2px rgba(0, 243, 255, 0.4)); }
    100% { opacity: 0.9; filter: drop-shadow(0 0 8px rgba(0, 243, 255, 0.8)); }
}

/* Ambient Scanline for entire modal */
#chat-modal::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(0, 243, 255, 0.03) 50%, 
        transparent 100%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 90;
    opacity: 0.5;
}

/* ── JARVIS CTA BUTTON STYLING ─────────────────────────── */
.jarvis-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.15) 0%, rgba(0, 150, 255, 0.15) 100%);
    border: 1.5px solid rgba(0, 243, 255, 0.5);
    border-radius: 8px;
    padding: 10px 18px;
    margin-top: 12px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    font-weight: bold;
    color: #00f3ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 
        0 0 15px rgba(0, 243, 255, 0.2),
        inset 0 0 10px rgba(0, 243, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
    width: fit-content;
}

.jarvis-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.jarvis-cta-btn:hover {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.25) 0%, rgba(0, 150, 255, 0.25) 100%);
    border-color: #00f3ff;
    color: #ffffff;
    box-shadow: 
        0 0 25px rgba(0, 243, 255, 0.5),
        0 0 50px rgba(0, 243, 255, 0.2),
        inset 0 0 15px rgba(0, 243, 255, 0.1);
    transform: translateY(-2px);
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.8);
}

.jarvis-cta-btn:hover::before {
    left: 100%;
}

.jarvis-cta-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 0 15px rgba(0, 243, 255, 0.4),
        inset 0 0 10px rgba(0, 243, 255, 0.15);
}

/* Pulse animation for CTA button */
.jarvis-cta-btn {
    animation: cta-pulse 2s ease-in-out infinite;
}

@keyframes cta-pulse {
    0%, 100% {
        box-shadow: 
            0 0 15px rgba(0, 243, 255, 0.2),
            inset 0 0 10px rgba(0, 243, 255, 0.05);
    }
    50% {
        box-shadow: 
            0 0 25px rgba(0, 243, 255, 0.4),
            inset 0 0 15px rgba(0, 243, 255, 0.1);
    }
}

/* Icon styling for CTA button */
.jarvis-cta-btn::after {
    content: '→';
    font-size: 14px;
    transition: transform 0.3s ease;
}

.jarvis-cta-btn:hover::after {
    transform: translateX(4px);
}
