:root {
    --bg-color: #0f1115;
    --panel-bg: rgba(25, 28, 35, 0.7);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --accent: #d84594; /* Magenta/Pink tone for Elisa */
    --accent-glow: rgba(216, 69, 148, 0.5);
    --user-msg: rgba(255, 255, 255, 0.05);
    --elisa-msg: rgba(216, 69, 148, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(216, 69, 148, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(99, 102, 241, 0.05), transparent 25%);
}

.app-container {
    width: 100%;
    max-width: 600px;
    height: 90vh;
    background: var(--panel-bg);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

header {
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    background: rgba(255,255,255,0.05);
    padding: 4px 12px;
    border-radius: 12px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 10px #22c55e;
}

.dot.listening {
    background-color: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    animation: pulse 1s infinite;
}

.dot.thinking {
    background-color: #eab308;
    box-shadow: 0 0 10px #eab308;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 85%;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.elisa-message .avatar {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 15px var(--accent-glow);
}

.user-message .avatar {
    background: #334155;
    color: white;
}

.text {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.elisa-message .text {
    background: var(--elisa-msg);
    border-top-left-radius: 4px;
    color: #f1f5f9;
}

.user-message .text {
    background: var(--user-msg);
    border-top-right-radius: 4px;
    color: #e2e8f0;
}

.controls-container {
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to top, rgba(15, 17, 21, 0.8), transparent);
}

.mic-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    outline: none;
}

.mic-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.mic-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
    animation: pulse-ring 1.5s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.mic-btn.jarvis-mode {
    background: #4ade80; /* Green to indicate active loop */
    color: #0f1115;
    border-color: #4ade80;
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.5);
    animation: pulse-ring-green 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

#instruction-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 var(--accent-glow);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(216, 69, 148, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(216, 69, 148, 0);
    }
}

@keyframes pulse-ring-green {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(74, 222, 128, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Lock Screen */
.lock-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 17, 21, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lock-box {
    background: var(--panel-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    box-shadow: 0 0 40px rgba(216, 69, 148, 0.2);
    width: 90%;
    max-width: 400px;
}

.lock-box h2 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.lock-box p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 0.9rem;
}

#password-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    margin-bottom: 15px;
    outline: none;
    text-align: center;
    transition: border-color 0.3s;
}

#password-input:focus {
    border-color: var(--accent);
}

#unlock-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

#unlock-btn:hover {
    background: #bf3980;
}

.error-msg {
    color: #ef4444 !important;
    margin-top: 15px;
    margin-bottom: 0 !important;
    min-height: 20px;
}

