body {
    background-color: black;
    overflow-y: hidden;
    overflow-x: hidden;
}

.square {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 70%;
    /* Circle shape */
    background-image: radial-gradient(#6b72ff00 50%, #000dff3b 40%);
    /* Base background for the hood */
    box-shadow: 0 0 50px rgba(0, 132, 255, 0.5), inset 0 0 20px rgba(0, 255, 255, 0.6);
    /* Neon glow effect */
    animation: vibgyorGlow 6s linear infinite;
    /* VIBGYOR glow animation */
}

.square span {
    position: absolute;
    top: 0%;
    left: 0%;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#84ff6b00 40%, #0400ff6c 100%);
    box-shadow: 0 0 50px rgb(25, 0, 255), inset 0 0 50px rgb(255, 0, 0);
    border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
    transition: 0.5s;
    animation: rotate360 10s linear infinite, glowFlicker 1.5s infinite;
}

/* VIBGYOR glow effect for the hood */
@keyframes vibgyorGlow {
    0% {
        box-shadow: 0 0 15px 5px violet, 0 0 25px violet, 0 0 30px violet;
    }

    14% {
        box-shadow: 0 0 15px 5px indigo, 0 0 25px indigo, 0 0 30px indigo;
    }

    28% {
        box-shadow: 0 0 15px 5px blue, 0 0 25px blue, 0 0 30px blue;
    }

    42% {
        box-shadow: 0 0 15px 5px green, 0 0 25px green, 0 0 30px green;
    }

    57% {
        box-shadow: 0 0 15px 5px yellow, 0 0 25px yellow, 0 0 30px yellow;
    }

    71% {
        box-shadow: 0 0 15px 5px orange, 0 0 25px orange, 0 0 30px orange;
    }

    85% {
        box-shadow: 0 0 15px 5px red, 0 0 25px red, 0 0 30px red;
    }

    100% {
        box-shadow: 0 0 15px 5px violet, 0 0 25px violet, 0 0 30px violet;
    }
}

/* Smooth rotation for the inner circles */
@keyframes rotate360 {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Subtle glow flicker animation */
@keyframes glowFlicker {

    0%,
    100% {
        box-shadow: 0 0 30px rgba(0, 132, 255, 0.7);
    }

    50% {
        box-shadow: 0 0 40px rgba(0, 132, 255, 1);
    }
}

/* Adjust the animations for each span (circle) */
.square span:nth-child(1) {
    z-index: 1;
    opacity: 0.95;
    animation: rotate360 4s linear infinite, glowFlicker s infinite;
}

.square span:nth-child(2) {
    z-index: 2;
    opacity: 0.85;
    animation: rotate360 6s linear infinite, glowFlicker 2s infinite;
}

.square span:nth-child(3) {
    z-index: 3;
    opacity: 0.75;
    animation: rotate360 8s linear infinite, glowFlicker 2s infinite;
}

.square span:nth-child(4) {
    z-index: 4;
    opacity: 0.7;
    animation: rotate360 10s linear infinite, glowFlicker 3s infinite;
}

.square span:nth-child(5) {
    z-index: 5;
    opacity: 0.6;
    animation: rotate360 12s linear infinite, glowFlicker 3.5s infinite;
}

/* Hover effect for interactivity */
.square:hover span {
    transform: scale(1.05);
    box-shadow: 0 0 70px rgba(0, 132, 255, 0.9), inset 0 0 50px rgba(0, 255, 255, 1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Input Filed Start*/

#TextInput {
    background-color: #181818a8;
    border-color: blue;
    box-shadow: 0 0 20px rgb(25, 0, 255),
        inset 0 0 0px rgb(25, 0, 255);
    border-radius: 8px;
    color: white;
    padding: 3px 0px 3px 20px;
    margin: 0px 20%;
    position: relative;
    top: 60px;
    width: 60%;
}

.input-field {
    background-color: transparent;
    border: none;
    width: 95%;
    outline: none;
    color: white;
    font-family: cursive;
}

.glow-on-hover {
    width: 35px;
    height: 35px;
    border: none;
    outline: none;
    color: #fff;
    background: #111;
    cursor: pointer;
    position: relative;
    z-index: 0;
    border-radius: 10px;
    padding: 0px;
    margin-left: 10px;
}

.glow-on-hover:before {
    content: '';
    background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    position: absolute;
    top: -2px;
    left: -2px;
    background-size: 400%;
    z-index: -1;
    filter: blur(5px);
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    animation: glowing 20s linear infinite;
    opacity: 0;
    transition: opacity .3s ease-in-out;
    border-radius: 10px;
}

.glow-on-hover:active {
    color: #181818a8
}

.glow-on-hover:active:after {
    background: transparent;
}

.glow-on-hover:hover:before {
    opacity: 1;
}

.glow-on-hover:after {
    z-index: -1;
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #111;
    left: 0;
    top: 0;
    border-radius: 10px;
}

@keyframes glowing {
    0% {
        background-position: 0 0;
    }

    50% {
        background-position: 400% 0;
    }

    100% {
        background-position: 0 0;
    }
}

/* Input Filed End*/

[hidden] {
    display: none !important;
}


/* Area chat untuk output Gemini (dari js/app.js) */
#messages {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 14px;
}

/* Turn container styling */
#messages .turn {
    background: rgba(36, 40, 47, 0.8);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.turn-header {
    font-weight: 700;
    color: #e4e6eb;
    margin-bottom: 8px;
    font-size: 14px;
}

.turn-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 720px) {
    .turn-content {
        grid-template-columns: 1fr 1fr;
    }
}

.transcripts {
    background: rgba(31, 41, 55, 0.6);
    border: 1px solid rgba(100, 116, 139, 0.2);
    border-radius: 8px;
    padding: 10px;
}

.analysis-panel {
    min-height: 50px;
}

/* Message type styling */
.user-message {
    margin: 10px 0;
    padding: 8px;
    background-color: rgba(30, 58, 95, 0.8);
    border-radius: 5px;
    border-left: 4px solid #3b82f6;
}

.agent-message {
    margin: 10px 0;
    padding: 8px;
    background-color: rgba(49, 46, 129, 0.8);
    border-radius: 5px;
    border-left: 4px solid #8b5cf6;
}

.input-transcript-message {
    margin: 10px 0;
    padding: 8px;
    background-color: rgba(6, 78, 59, 0.8);
    border-radius: 5px;
    border-left: 4px solid #10b981;
    font-style: italic;
    opacity: 0.9;
}

.output-transcript-message {
    margin: 10px 0;
    padding: 8px;
    background-color: rgba(120, 53, 15, 0.8);
    border-radius: 5px;
    border-left: 4px solid #f59e0b;
    font-style: italic;
    opacity: 0.9;
}

.message-label {
    font-weight: bold;
    color: #e5e7eb;
    margin-right: 8px;
}

.message-text {
    color: #d1d5db;
}

/* Detailed analysis styling */
.detailed-analysis {
    margin: 15px 0;
    padding: 0;
    background-color: rgba(36, 40, 47, 0.9);
    border-radius: 8px;
    border: 1px solid rgba(100, 116, 139, 0.3);
    overflow: hidden;
}

.analysis-header {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: #fff;
    padding: 12px 15px;
    font-weight: bold;
    font-size: 16px;
}

.analysis-content {
    padding: 15px;
    color: #e5e7eb;
    line-height: 1.7;
    font-size: 14px;
}

/* Status bar styling */
#statusBar {
    margin-top: 5px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: #9ca3af;
}

#statusBar.recording {
    background: rgba(6, 78, 59, 0.8);
    border: 1px solid #10b981;
    color: #6ee7b7;
}

#statusBar.processing {
    background: rgba(30, 58, 95, 0.8);
    border: 1px solid #3b82f6;
    color: #93c5fd;
}

#statusBar.ready {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: #9ca3af;
}

#statusBar.error {
    background: rgba(153, 27, 27, 0.8);
    border: 1px solid #ef4444;
    color: #fca5a5;
}

#statusBar.warning {
    background: rgba(120, 53, 15, 0.8);
    border: 1px solid #f59e0b;
    color: #fcd34d;
    animation: pulse 2s ease-in-out infinite;
}

#statusBar.success {
    background: rgba(6, 78, 59, 0.8);
    border: 1px solid #10b981;
    color: #6ee7b7;
}

/* Pulse animation for reconnecting indicator */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* ===========================
   TAMBAHAN: audio reactive hood
   =========================== */

/* .square akan di-scale oleh jinny-visualizer.js */
#JinnyHood .square {
    transform-origin: center center;
    transition: transform 0.08s linear;
}

/* Saat idle bisa dipaksa balik ke scale(1) */
#JinnyHood.jinny-idle .square {
    transform: scale(1);
}

/* ===========================
   MOVED FROM index.html
   =========================== */
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    background: #000;
}

.full-screen-block {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

#jinnyBlock,
#cameraBlock,
#chatBlock {
    background: #000;
    z-index: 1;
}

#cameraBlock video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#chatBlock {
    padding: 20px;
    padding-bottom: 180px;
    overflow-y: auto;
}

#chatBlock #chatMessages {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.overlay-component {
    position: fixed;
    left: 0;
    right: 0;
    transition: all 0.3s ease;
}

#chatOverlay {
    position: fixed;
    bottom: 150px;
    height: 35vh;
    max-height: 400px;
    right: 20px;
    width: 550px;
    background: transparent;
    backdrop-filter: none;
    border: none;
    padding: 20px;
    overflow-y: auto;
    z-index: 50;
    font-size: 0.85rem;
}

.chat-bubble-ai {
    background: rgba(60, 60, 60, 0.9) !important;
    color: #fff !important;
    backdrop-filter: blur(10px);
}

.chat-bubble-user {
    background: rgba(0, 122, 255, 0.9) !important;
    color: #fff !important;
}

#promptLine {
    bottom: 80px;
    text-align: center;
    padding: 10px 20px;
    z-index: 80;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 300;
}

#chatInputRow {
    bottom: 0;
    padding: 15px 20px;
    z-index: 90;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

#chatInputRow #ChatBox {
    width: 100%;
    max-width: 700px;
    box-sizing: border-box;
}

#messagesSection {
    position: fixed;
    bottom: 80px;
    left: 0;
    right: 0;
    max-height: 40vh;
    background: rgba(0, 0, 0, 0.95);
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    overflow-y: auto;
    z-index: 75;
}

@media (max-width: 768px) {
    #chatOverlay {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
        width: 95%;
        max-width: 95%;
        height: 25vh;
        bottom: 140px;
        font-size: 0.8rem;
    }

    #promptLine {
        font-size: 1rem;
        bottom: 75px;
    }

    #chatInputRow {
        padding: 12px 15px;
        bottom: 0;
    }
}
/* Sidebar Styles */
#sessionSidebar {
    position: fixed; 
    top: 0; 
    right: -300px; 
    width: 300px; 
    height: 100vh; 
    background: rgba(0, 0, 0, 0.95); 
    border-left: 1px solid rgba(255, 255, 255, 0.1); 
    z-index: 199; 
    transition: right 0.3s ease;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

#sessionSidebar.active {
    right: 0;
}

#menuBtn {
    position: fixed; 
    top: 20px; 
    right: 20px; 
    z-index: 200;
}

#sessionList {
    flex: 1; 
    overflow-y: auto; 
    margin-bottom: 20px;
}
