:root {
    --neon-blue: #00f2ff;
    --neon-glow: rgba(0, 242, 255, 0.5);
    --bg-dark: #020b16;
    --panel-bg: rgba(10, 25, 47, 0.7);
    --panel-strong: rgba(6, 18, 34, 0.88);
    --border-blue: rgba(0, 242, 255, 0.3);
    --text-main: #e0faff;
    --text-dim: #88adb5;
    --danger: #ff5370;
    --success: #7bffb2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: block;
}

.scanlines {
    position: fixed;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.1) 50%
    );
    background-size: 100% 4px;
    z-index: 5;
    pointer-events: none;
    opacity: 0.15;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-dark) 90%);
    z-index: 1;
    pointer-events: none;
}

#hud-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: none;
    background: var(--panel-bg);
    border: none;
    display: flex;
    flex-direction: column;
    z-index: 10;
    box-shadow: none;
    transition: border-color 0.5s, box-shadow 0.5s;
}

#hud-container.gaming-mode-active {
    --neon-blue: #ff3e3e;
    --neon-glow: rgba(255, 62, 62, 0.5);
    --border-blue: rgba(255, 62, 62, 0.3);
    border-color: #ff3e3e;
    box-shadow: 0 0 50px rgba(255, 0, 0, 0.2), inset 0 0 30px rgba(255, 62, 62, 0.05);
}

.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--neon-blue);
    z-index: 20;
}

.top-left { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.top-right { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.bottom-left { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.bottom-right { bottom: -2px; right: -2px; border-left: none; border-top: none; }

header {
    position: relative;
    z-index: 500;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 242, 255, 0.03);
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 4px;
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-glow);
}

.version {
    font-size: 0.7rem;
    vertical-align: super;
    opacity: 0.6;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    letter-spacing: 2px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-blue);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-blue);
    animation: pulse 2s infinite;
}

.system-stats-display {
    display: flex;
    gap: 20px;
    font-size: 0.7rem;
    font-family: 'Orbitron', sans-serif;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.stat-item span {
    color: var(--neon-blue);
    font-weight: bold;
}

.data-stream {
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

main {
    flex: 1;
    overflow: hidden;
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: row; /* Side by side */
    gap: 20px;
}

#chat-panel {
    width: 600px; 
    height: 100%;
    display: flex;
    justify-content: flex-start;
    padding-left: 220px; /* Make room for the core on the left */
    pointer-events: none;
}

/* Panel open state logic is no longer needed with row layout, 
   but we keep the class for potential other adjustments */
#hud-container.panel-open #chat-panel {
}

/* Module Dropdown Styles */
.module-dropdown {
    position: relative;
    z-index: 1000;
}

.module-btn {
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid var(--border-blue);
    color: var(--neon-blue);
    padding: 10px 15px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.module-btn:hover {
    background: rgba(0, 242, 255, 0.1);
    box-shadow: 0 0 15px var(--neon-glow);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--panel-strong);
    border: 1px solid var(--border-blue);
    min-width: 200px;
    display: none;
    flex-direction: column;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    backdrop-filter: blur(15px);
}

.module-dropdown.active .dropdown-content {
    display: flex;
}

.dropdown-content button {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 242, 255, 0.1);
    color: var(--text-main);
    padding: 15px 20px;
    text-align: left;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-content button i {
    color: var(--neon-blue);
    width: 20px;
}

.dropdown-content button:hover {
    background: rgba(0, 242, 255, 0.1);
    padding-left: 25px;
    color: var(--neon-blue);
}

/* Overlay Panel Styles */
.overlay-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    bottom: 20px;
    width: 400px;
    background: var(--panel-strong);
    border: 1px solid var(--border-blue);
    z-index: 2000; /* Extremely high to ensure clickability */
    transform: translateX(calc(100% + 60px));
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    padding: 25px;
    box-shadow: -20px 0 50px rgba(0,0,0,0.6);
    backdrop-filter: blur(25px);
}

.overlay-panel.active {
    transform: translateX(0);
    display: flex !important;
}

@media (max-width: 1024px) {
    .scanlines { display: none !important; }
    #jarvis-core-container { display: none !important; }
    body {
        zoom: 1.0;
        margin: 0;
        padding: 0;
        display: block;
        height: 100%;
        width: 100%;
    }
    #hud-container {
        width: 100%;
        height: 100%;
        max-width: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
    #chat-panel {
        width: 100%;
        padding-left: 0;
        padding-top: 20px;
        display: flex;
        justify-content: center;
    }
    #chat-window {
        max-width: 95%;
    }
    .overlay-panel {
        width: 100%;
        right: 0;
        top: 0;
        bottom: 0;
        transform: translateX(100%);
    }
    header, footer, #mic-control-container, .module-dropdown, #user-input, #send-btn {
        pointer-events: auto !important;
        z-index: 9999 !important;
    }
    body::before {
        pointer-events: none !important;
    }
    
    .dropdown-content {
        flex-direction: row;
        flex-wrap: wrap;
        position: fixed;
        top: 70px;
        left: 5%;
        right: 5%;
        width: 90%;
        max-height: 80vh;
        overflow-y: auto;
        justify-content: flex-start;
    }
    .dropdown-content button {
        flex: 1 1 45%;
        margin: 5px;
        border: 1px solid rgba(0, 242, 255, 0.1);
        border-radius: 4px;
        justify-content: flex-start;
    }
}

.panel-close-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.panel-close-btn:hover {
    color: var(--danger);
}

.calendar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
    gap: 10px;
}

#current-month-display {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--neon-blue);
    text-align: center;
    flex: 1;
}

#chat-window {
    height: 100%;
    width: 100%;
    max-width: 500px; /* Narrower chat window */
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-blue) transparent;
    pointer-events: none;
}

#chat-window::-webkit-scrollbar,
#todo-list::-webkit-scrollbar {
    width: 4px;
}

#chat-window::-webkit-scrollbar-thumb,
#todo-list::-webkit-scrollbar-thumb {
    background: var(--border-blue);
}

.message {
    max-width: 90%;
    padding: 10px 15px;
    border-radius: 8px;
    position: relative;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    margin-bottom: 5px;
    pointer-events: none; /* Messages themselves should also not block clicks */
}

.message.bot {
    align-self: flex-start;
    background: rgba(0, 242, 255, 0.08);
    border: 1px solid var(--border-blue);
    border-left: 4px solid var(--neon-blue);
    font-weight: 300;
    backdrop-filter: blur(5px);
}

.message.user {
    align-self: flex-start; /* Also to the left for consistency */
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 4px solid var(--text-dim);
    text-align: left;
}

.msg-content {
    line-height: 1.6;
    letter-spacing: 0.5px;
}

.message.expired {
    animation: fadeAwayUp 1s forwards;
    pointer-events: none;
}

@keyframes fadeAwayUp {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-50px); opacity: 0; }
}

#todo-panel {
    /* Styles are now part of .overlay-panel */
}

#monitor-panel {
    background: rgba(6, 18, 34, 0.85);
    border: 1px solid var(--border-blue);
    box-shadow: 
        0 0 20px rgba(0, 0, 0, 0.5),
        inset 0 0 40px rgba(0, 242, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.monitor-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 10px;
}

.monitor-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.monitor-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.monitor-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: var(--neon-blue);
    text-shadow: 0 0 8px var(--neon-glow);
}

.monitor-bar-bg {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.monitor-bar {
    height: 100%;
    background: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
    transition: width 0.5s ease-out;
}

.monitor-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 242, 255, 0.1);
}

.status-ok {
    font-size: 0.65rem;
    color: var(--success);
    letter-spacing: 2px;
    animation: blink 2s infinite;
}

#todo-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
    animation: scanlineHorizontal 4s linear infinite;
    opacity: 0.3;
}

#todo-panel.collapsed {
    width: 60px;
    padding: 20px 10px;
}

#todo-panel.collapsed > :not(.panel-header) {
    display: none;
}

@keyframes scanlineHorizontal {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon-blue);
    box-shadow: 0 0 8px var(--neon-blue);
    margin-top: 4px;
}

.panel-kicker {
    font-size: 0.68rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

#todo-panel h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-blue);
    letter-spacing: 2px;
    font-size: 1rem;
}

#todo-toggle-btn,
#todo-add-btn,
.todo-delete {
    background: transparent;
    border: 1px solid var(--border-blue);
    color: var(--neon-blue);
    cursor: pointer;
    transition: all 0.25s ease;
}

.panel-actions {
    display: flex;
    gap: 8px;
}

#todo-save-btn, #open-monitor-btn {
    padding: 0 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 1px;
    height: 36px;
    background: rgba(0, 242, 255, 0.05);
}

#todo-save-btn.saved {
    background: var(--success);
    color: var(--bg-dark);
    border-color: var(--success);
    animation: saveSuccess 0.5s ease-out;
}

@keyframes saveSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 20px var(--success); }
    100% { transform: scale(1); }
}

#todo-toggle-btn {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

#todo-toggle-btn:hover,
#todo-add-btn:hover,
.todo-delete:hover {
    box-shadow: 0 0 16px var(--neon-glow);
    background: rgba(0, 242, 255, 0.08);
}

#todo-summary {
    color: var(--text-main);
    font-size: 0.92rem;
    line-height: 1.5;
    padding: 12px 14px;
    border: 1px solid rgba(0, 242, 255, 0.12);
    background: rgba(2, 11, 22, 0.55);
}

#todo-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

#todo-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-blue);
    padding: 14px 16px;
    color: var(--text-main);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    outline: none;
}

#todo-input:focus,
.todo-text:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

#todo-add-btn {
    padding: 12px 16px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
    font-size: 0.72rem;
}

#todo-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    min-height: 0;
    flex: 1;
    padding-right: 6px;
}

.todo-empty {
    padding: 16px;
    color: var(--text-dim);
    border: 1px dashed rgba(0, 242, 255, 0.18);
    text-align: center;
}

.todo-item {
    display: grid;
    grid-template-columns: 26px 1fr 36px;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(0, 242, 255, 0.12);
    background: rgba(2, 11, 22, 0.58);
}

.todo-item.done {
    opacity: 0.75;
}

.todo-check {
    position: relative;
    width: 22px;
    height: 22px;
}

.todo-check input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
}

.todo-check span {
    position: absolute;
    inset: 0;
    border: 1px solid var(--border-blue);
    background: rgba(255, 255, 255, 0.03);
}

.todo-check input:checked + span {
    background: rgba(123, 255, 178, 0.18);
    border-color: rgba(123, 255, 178, 0.6);
    box-shadow: 0 0 10px rgba(123, 255, 178, 0.2);
}

.todo-check input:checked + span::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid var(--success);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.todo-text {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-main);
    padding: 8px 10px;
    font-size: 0.92rem;
    width: 100%;
    outline: none;
}

.todo-item.done .todo-text {
    color: var(--text-dim);
    text-decoration: line-through;
}

.todo-delete {
    height: 34px;
    font-size: 1rem;
    color: var(--danger);
    border-color: rgba(255, 83, 112, 0.35);
}

footer {
    position: relative;
    z-index: 500;
    padding: 30px;
    border-top: 1px solid var(--border-blue);
    background: rgba(0, 242, 255, 0.02);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#input-area {
    display: flex;
    gap: 20px;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

#user-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-blue);
    padding: 15px 20px;
    color: var(--text-main);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    outline: none;
    transition: all 0.3s;
}

#user-input:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

.input-glow {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--neon-blue);
    transition: width 0.3s;
}

#user-input:focus + .input-glow {
    width: 100%;
}

#mic-control-container {
    z-index: 100;
    display: flex;
    position: relative;
    top: -10px;
    left: 15px;
}

#mic-btn {
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid var(--border-blue);
    border-radius: 4px;
    width: 52px;
    height: 52px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

#mic-btn.waiting-for-wake {
    opacity: 0.3;
    border-color: rgba(0, 242, 255, 0.15);
    filter: grayscale(0.8);
}

#mic-btn.listening {
    opacity: 1;
    border-color: #ff3e3e;
    box-shadow: 0 0 20px rgba(255, 62, 62, 0.6);
    animation: micPulse 1.2s infinite ease-in-out;
    filter: grayscale(0);
}

#mic-btn.listening .mic-icon {
    filter: drop-shadow(0 0 5px #ff3e3e);
}

@keyframes micPulse {
    0% { transform: scale(1); box-shadow: 0 0 10px rgba(255, 62, 62, 0.4); }
    50% { transform: scale(1.1); box-shadow: 0 0 25px rgba(255, 62, 62, 0.8); }
    100% { transform: scale(1); box-shadow: 0 0 10px rgba(255, 62, 62, 0.4); }
}

.jarvis-active-flash {
    animation: activeFlash 0.5s ease-out;
}

@keyframes activeFlash {
    0% { box-shadow: inset 0 0 50px rgba(0, 242, 255, 0.3); }
    100% { box-shadow: inset 0 0 0px transparent; }
}

#send-btn {
    background: transparent;
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 0 30px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

#send-btn:hover {
    background: var(--neon-blue);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--neon-glow);
}

.typing::after {
    content: "|";
    animation: blink 0.7s infinite;
}

#startup-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out;
}

.auth-box {
    border: 1px solid var(--neon-blue);
    padding: 40px;
    background: rgba(0, 242, 255, 0.05);
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2), inset 0 0 20px rgba(0, 242, 255, 0.1);
}

.auth-box h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-blue);
    font-size: 1.2rem;
    letter-spacing: 3px;
    margin-bottom: 30px;
    text-shadow: 0 0 10px var(--neon-glow);
}

#system-start-btn {
    background: transparent;
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 15px 40px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

#system-start-btn:hover {
    background: var(--neon-blue);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--neon-glow);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes corePulse {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes micPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 62, 62, 0.25); }
    50% { box-shadow: 0 0 16px rgba(255, 62, 62, 0.5); }
}

/* Media queries consolidated and updated below */
@media (max-width: 768px) {
    #hud-container {
        width: 100vw;
        height: 100vh;
        max-width: none;
        border: none;
        border-radius: 0;
    }

    header {
        padding: 10px 15px;
    }

    h1 {
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    .module-btn span {
        display: none;
    }

    .module-btn {
        padding: 8px 12px;
    }

    main {
        padding: 10px;
    }

    #chat-panel {
        width: 100% !important;
        padding-left: 0 !important;
        justify-content: center !important;
    }

    #chat-window {
        padding: 5px;
        gap: 10px;
        max-width: 100% !important;
    }

    .message {
        max-width: 90%;
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    footer {
        padding: 15px;
    }

    #input-area {
        gap: 10px;
    }

    #user-input {
        padding: 12px 15px;
        font-size: 0.85rem;
    }

    #send-btn {
        padding: 0 15px;
        font-size: 0.7rem;
    }

    #mic-btn {
        width: 44px;
        height: 44px;
    }

    #jarvis-core-container {
        position: fixed;
        top: 50% !important;
        left: 50% !important;
        bottom: auto !important;
        right: auto !important;
        transform: translate(-50%, -50%) scale(0.7) !important;
        opacity: 0.8; 
        z-index: 50;  /* Higher than background gradient */
        display: flex !important;
        pointer-events: none;
    }
    .jarvis-core {
        pointer-events: auto;
        visibility: visible !important;
        display: flex !important;
    }
}

/* =========================================
   PREMIUM LOGIN INTERFACE
   ========================================= */
#login-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #020b16;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(0, 243, 255, 0.1) 0%, transparent 70%),
        linear-gradient(rgba(0, 243, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 50px 50px, 50px 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-container {
    width: min(380px, 90vw);
    padding: 30px 20px;
    background: rgba(4, 15, 28, 0.9);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 4px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 243, 255, 0.05);
    text-align: center;
    position: relative;
    clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
}

.login-header h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-blue);
    font-size: 1.2rem;
    letter-spacing: 4px;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.login-methods {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.method-tab {
    flex: 1;
    padding: 15px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.method-tab.active {
    color: var(--neon-blue);
    border-bottom: 2px solid var(--neon-blue);
}

.login-field {
    margin-bottom: 25px;
}

.login-field input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 243, 255, 0.2);
    padding: 15px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    text-align: center;
    border-radius: 2px;
    transition: border 0.3s;
}

.login-field input:focus {
    border-color: var(--neon-blue);
    outline: none;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

.primary-btn {
    width: 100%;
    padding: 15px;
    background: var(--neon-blue);
    color: #000;
    border: none;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s;
}

.primary-btn:hover {
    background: #fff;
    box-shadow: 0 0 25px var(--neon-blue);
}

.bio-trigger {
    background: transparent;
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 40px 20px;
    border-radius: 4px;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.bio-trigger i {
    font-size: 2.5rem;
}

.bio-trigger:hover {
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}

#login-msg {
    margin-top: 20px;
    font-size: 0.8rem;
    min-height: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.msg-error { color: var(--danger); }
.msg-info { color: var(--neon-blue); }

/* --- MICROPHONE STATES --- */
#mic-btn.waiting-for-wake {
    background: rgba(0, 242, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
    animation: mic-pulse 2s infinite;
}

@keyframes mic-pulse {
    0% { transform: scale(1); box-shadow: 0 0 5px rgba(0, 242, 255, 0.2); }
    50% { transform: scale(1.1); box-shadow: 0 0 20px rgba(0, 242, 255, 0.5); }
    100% { transform: scale(1); box-shadow: 0 0 5px rgba(0, 242, 255, 0.2); }
}

#mic-btn.listening {
    background: var(--neon-blue) !important;
    color: var(--bg-dark) !important;
    box-shadow: 0 0 30px var(--neon-blue) !important;
    transform: scale(1.2);
    animation: none;
}
/* ========================================= */
/* MODULE SELECTOR (DROPDOWN) */
/* ========================================= */
.module-selector select {
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    padding: 8px 15px;
    letter-spacing: 2px;
    outline: none;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.1);
    appearance: none;
    -webkit-appearance: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.module-selector select:hover {
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
    background: rgba(0, 242, 255, 0.1);
}

.module-selector select option {
    background: var(--bg-dark);
    color: var(--neon-blue);
    padding: 10px;
}

/* ========================================= */
/* CALENDAR PANEL (HIGH END) */
/* ========================================= */
#calendar-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-right: 10px;
    animation: slideIn 0.3s ease-out;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-blue);
    padding-bottom: 15px;
}

.calendar-header h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-blue);
    letter-spacing: 4px;
    text-shadow: 0 0 10px var(--neon-glow);
    font-size: 1.4rem;
}

.cal-nav-btn {
    background: transparent;
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-nav-btn:hover {
    box-shadow: 0 0 15px var(--neon-glow);
    background: rgba(0, 242, 255, 0.1);
}

.cal-add-btn {
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 10px 20px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
}

.cal-add-btn:hover {
    background: var(--neon-blue);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--neon-glow);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    color: var(--text-dim);
    margin-bottom: 10px;
    letter-spacing: 2px;
    font-size: 0.8rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 8px;
    flex: 1;
}

.cal-day {
    background: rgba(6, 18, 34, 0.6);
    border: 1px solid rgba(0, 242, 255, 0.1);
    padding: 10px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
    min-height: 80px;
}

.cal-day:hover {
    border-color: var(--neon-blue);
    box-shadow: inset 0 0 20px rgba(0, 242, 255, 0.1);
    transform: scale(1.02);
    z-index: 10;
    background: rgba(0, 242, 255, 0.05);
}

.cal-day.has-events:hover .cal-events-container {
    max-height: none;
    overflow: visible;
}

.cal-day.today {
    border-color: var(--neon-blue);
    background: rgba(0, 242, 255, 0.05);
}

.cal-day.today::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
}

.cal-day-num {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-dim);
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.9rem;
}

.cal-day.today .cal-day-num {
    color: var(--neon-blue);
    text-shadow: 0 0 5px var(--neon-glow);
}

.cal-day.other-month {
    opacity: 0.3;
}

.cal-events-container {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.3s ease;
}

.cal-event-badge {
    background: rgba(0, 242, 255, 0.15);
    border-left: 2px solid var(--neon-blue);
    color: var(--text-main);
    font-size: 0.65rem;
    padding: 3px 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 0 3px 3px 0;
}

/* HOLOGRAM MODAL */
.hologram-modal {
    position: absolute;
    inset: 0;
    background: rgba(2, 11, 22, 0.85);
    backdrop-filter: blur(5px);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hologram-modal .modal-content {
    background: var(--panel-strong);
    border: 1px solid var(--neon-blue);
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2), inset 0 0 15px rgba(0, 242, 255, 0.05);
    animation: scaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hologram-modal h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-blue);
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 2px;
}

.hologram-modal input {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-blue);
    padding: 12px;
    margin-bottom: 15px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    outline: none;
    color-scheme: dark;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}

.field-group label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    color: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.field-group small {
    font-size: 0.6rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.hologram-modal input:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.1);
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.modal-actions button {
    padding: 10px 20px;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    border: 1px solid var(--border-blue);
    background: transparent;
    color: var(--text-dim);
    transition: all 0.3s;
}

.modal-actions .save-btn {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.modal-actions .save-btn:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 15px var(--neon-glow);
}

.modal-actions button:hover {
    background: rgba(255, 255, 255, 0.1);
}

#modal-delete-btn {
    padding: 10px 20px;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    border: 1px solid var(--danger);
    background: transparent;
    color: var(--danger);
    transition: all 0.3s;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

#modal-delete-btn:hover {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 83, 112, 0.4);
}

@keyframes scaleUp {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .calendar-header h2 { font-size: 1rem; letter-spacing: 1px; }
    .cal-nav-btn { width: 32px; height: 32px; font-size: 0.8rem; }
    .cal-add-btn { padding: 8px 12px; font-size: 0.7rem; }
    
    .calendar-weekdays { font-size: 0.6rem; gap: 2px; }
    .calendar-grid { gap: 4px; }
    
    .cal-day { 
        min-height: 50px; 
        padding: 4px; 
    }
    
    .cal-day-num { font-size: 0.7rem; top: 4px; right: 4px; }
    
    .cal-events-container { margin-top: 15px; }
    .cal-event-badge { 
        font-size: 0.5rem; 
        padding: 1px 2px; 
        margin-bottom: 2px;
    }
    
    .module-selector select {
        font-size: 0.75rem;
        padding: 8px 10px;
        letter-spacing: 1px;
        min-width: 130px;
    }

    .hologram-modal .modal-content {
        padding: 20px;
        width: 95%;
    }
}
/* ========================================= */
/* JARVIS CORE REDESIGN */
/* ========================================= */
#jarvis-core-container {
    position: fixed;
    bottom: 90px; /* Even further down, just above the mic button */
    left: 40px;
    z-index: 1000;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.jarvis-core {
    width: 200px;
    height: 200px;
    position: relative;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: drop-shadow(0 0 20px rgba(0, 242, 255, 0.3));
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--neon-blue);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.ring.outer {
    width: 100%;
    height: 100%;
    border-style: dashed;
    animation: rotate 20s linear infinite;
    border-width: 2px;
}

.ring.middle {
    width: 75%;
    height: 75%;
    border-style: solid;
    border-top-color: transparent;
    border-bottom-color: transparent;
    animation: rotate-reverse 10s linear infinite;
    border-width: 3px;
    box-shadow: inset 0 0 15px rgba(0, 242, 255, 0.2);
}

.ring.inner {
    width: 50%;
    height: 50%;
    border-style: solid;
    border-left-color: transparent;
    border-right-color: transparent;
    animation: rotate 5s linear infinite;
    border-width: 4px;
}

.ring.mini {
    width: 25%;
    height: 25%;
    border: 2px solid var(--neon-blue);
    animation: pulse-mini 2s ease-in-out infinite;
}

.core-center {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 20px 5px #fff, 0 0 40px 10px var(--neon-blue);
    z-index: 5;
}

.core-glow {
    position: absolute;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.5) 0%, transparent 70%);
    border-radius: 50%;
    animation: core-pulse 3s ease-in-out infinite;
}

.orbit-particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-blue);
    z-index: 4;
}

.p1 { animation: orbit1 8s linear infinite; }
.p2 { animation: orbit2 12s linear infinite; }
.p3 { animation: orbit3 10s linear infinite; }

/* SPEAKING STATE */
.jarvis-core.speaking .ring {
    border-color: #fff;
    filter: brightness(1.8) drop-shadow(0 0 10px var(--neon-blue));
    opacity: 1;
}

.jarvis-core.speaking .ring.outer { animation-duration: 2s; }
.jarvis-core.speaking .ring.middle { animation-duration: 1.5s; }
.jarvis-core.speaking .ring.inner { animation-duration: 1s; }

/* PROMPTED / LISTENING STATE */
.jarvis-core.prompted {
    filter: drop-shadow(0 0 30px rgba(255, 204, 0, 0.8));
}

.jarvis-core.prompted .ring {
    border-color: #ffcc00;
    opacity: 1;
}

.jarvis-core.prompted .core-glow {
    background: radial-gradient(circle, rgba(255, 204, 0, 0.6) 0%, transparent 70%);
    animation: core-pulse-fast 0.3s ease-in-out infinite;
}

.jarvis-active-flash {
    animation: hud-flash 0.3s ease-out;
}

@keyframes hud-flash {
    0% { filter: brightness(1); }
    50% { filter: brightness(2) contrast(1.2); }
    100% { filter: brightness(1); }
}

.jarvis-core.speaking .core-glow {
    animation: core-pulse-fast 0.4s ease-in-out infinite;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, transparent 70%);
}

@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes rotate-reverse { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }

@keyframes core-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes core-pulse-fast {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.4); opacity: 1; }
}

@keyframes pulse-mini {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.4); opacity: 1; }
}

@keyframes orbit1 {
    from { transform: rotate(0deg) translateX(100px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(100px) rotate(-360deg); }
}

@keyframes orbit2 {
    from { transform: rotate(360deg) translateX(80px) rotate(-360deg); }
    to { transform: rotate(0deg) translateX(80px) rotate(0deg); }
}

@keyframes orbit3 {
    from { transform: rotate(180deg) translateX(120px) rotate(-180deg); }
    to { transform: rotate(540deg) translateX(120px) rotate(-540deg); }
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 62, 62, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(255, 62, 62, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 62, 62, 0); }
}

@media (max-width: 1200px) {
    #jarvis-core-container {
        left: 20px;
        transform: translateY(-50%) scale(0.7);
    }
}

@media (max-width: 768px) {
    #jarvis-core-container {
        top: 50% !important;
        left: 50% !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) scale(0.7) !important;
        opacity: 0.8;
        z-index: 50;
        pointer-events: none !important;
    }
}

/* --- NOTIFICATION OVERLAY --- */
.hologram-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    width: 90%;
    max-width: 500px;
    background: rgba(255, 62, 62, 0.1);
    border: 1px solid #ff3e3e;
    backdrop-filter: blur(15px);
    padding: 20px;
    box-shadow: 0 0 30px rgba(255, 62, 62, 0.2), inset 0 0 20px rgba(255, 62, 62, 0.1);
    animation: slideDownFade 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notif-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notif-content i {
    font-size: 2rem;
    color: #ff3e3e;
    animation: blink 1s infinite;
}

.notif-text {
    flex: 1;
}

.notif-kicker {
    font-size: 0.6rem;
    color: #ff3e3e;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

#notif-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: #fff;
    letter-spacing: 1px;
}

#notif-close-btn {
    background: #ff3e3e;
    color: #000;
    border: none;
    padding: 10px 15px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s;
}

#notif-close-btn:hover {
    background: #fff;
    box-shadow: 0 0 15px #fff;
}

@keyframes slideDownFade {
    from { transform: translateX(-50%) translateY(-50px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* --- QUICK REMINDER BUTTONS --- */
.reminder-quick-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.quick-rem-btn {
    flex: 1;
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid var(--border-blue);
    color: var(--neon-blue);
    padding: 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-rem-btn:hover {
    background: rgba(0, 242, 255, 0.15);
    border-color: var(--neon-blue);
}

/* Pocket Money Specific Styles */
#pocket-money-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffcc00, transparent);
    animation: scanlineHorizontal 4s linear infinite;
    opacity: 0.3;
}

#pocket-money-panel h2 {
    font-family: 'Orbitron', sans-serif;
    color: #ffcc00;
    letter-spacing: 2px;
    font-size: 1rem;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.4);
}

#pocket-money-panel .panel-status-dot {
    background: #ffcc00;
    box-shadow: 0 0 8px #ffcc00;
}

#pocket-money-summary {
    color: var(--text-main);
    font-size: 0.92rem;
    line-height: 1.5;
    padding: 12px 14px;
    border: 1px solid rgba(255, 204, 0, 0.12);
    background: rgba(2, 11, 22, 0.55);
    margin-bottom: 15px;
}

#pocket-money-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    min-height: 0;
    flex: 1;
    padding-right: 6px;
}

.pocket-money-item {
    display: grid;
    grid-template-columns: 1fr 36px;
    gap: 15px;
    align-items: center;
    padding: 15px;
    border: 1px solid rgba(255, 204, 0, 0.15);
    background: rgba(10, 25, 47, 0.4);
    transition: all 0.3s;
}

.pocket-money-item:hover {
    background: rgba(255, 204, 0, 0.05);
    border-color: rgba(255, 204, 0, 0.4);
}

.pocket-money-week {
    display: flex;
    flex-direction: column;
}

.week-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.week-date {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--text-main);
}

.pocket-money-check {
    position: relative;
    width: 26px;
    height: 26px;
}

.pocket-money-check input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
    z-index: 2;
}

.pocket-money-check span {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 204, 0, 0.3);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pocket-money-check input:checked + span {
    background: rgba(123, 255, 178, 0.15);
    border-color: var(--success);
}

.pocket-money-check input:checked + span::after {
    content: "€";
    color: var(--success);
    font-weight: bold;
    font-size: 0.9rem;
}

.pocket-money-item.paid {
    border-color: rgba(123, 255, 178, 0.2);
    background: rgba(123, 255, 178, 0.03);
}

.pocket-money-item.paid .week-date {
    color: var(--success);
}

.panel-footer-info {
    margin-top: 15px;
    padding: 10px;
    font-size: 0.65rem;
    color: var(--text-dim);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================
   VOICE CHAT – HEADER BUTTON
   ============================================================ */
.voice-chat-header-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 242, 255, 0.08);
    border: 1px solid rgba(0, 242, 255, 0.35);
    border-radius: 8px;
    color: var(--neon-blue);
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 1.5px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.25s;
    -webkit-tap-highlight-color: transparent;
}

.voice-chat-header-btn:hover,
.voice-chat-header-btn.active {
    background: rgba(0, 242, 255, 0.18);
    border-color: var(--neon-blue);
    box-shadow: 0 0 14px rgba(0, 242, 255, 0.4);
}

.vc-pulse {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--neon-blue);
    box-shadow: 0 0 6px var(--neon-blue);
    animation: vcPulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes vcPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.6); opacity: 0.5; }
}

/* ============================================================
   VOICE CHAT – PANEL
   ============================================================ */
.voice-panel {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 5000;
    background: radial-gradient(ellipse at 50% 30%, rgba(0, 30, 60, 0.98) 0%, rgba(2, 11, 22, 0.99) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: vpFadeIn 0.3s ease;
    overflow: hidden;
}

@keyframes vpFadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

/* Header */
.vp-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 242, 255, 0.15);
}

.vp-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--neon-blue);
}

.vp-status-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    transition: all 0.4s;
}

.vp-status-dot.listening { background: var(--neon-blue); box-shadow: 0 0 12px var(--neon-blue); animation: vcPulse 0.8s ease-in-out infinite; }
.vp-status-dot.speaking  { background: #ff9a3c; box-shadow: 0 0 12px #ff9a3c; animation: vcPulse 0.5s ease-in-out infinite; }
.vp-status-dot.thinking  { background: #b48bff; box-shadow: 0 0 12px #b48bff; animation: vcPulse 1s ease-in-out infinite; }

.vp-close-btn {
    background: transparent;
    border: 1px solid rgba(0, 242, 255, 0.25);
    border-radius: 6px;
    color: var(--text-dim);
    font-size: 18px;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.vp-close-btn:hover { border-color: var(--danger); color: var(--danger); }

/* Animated core rings */
.vp-core-ring {
    position: relative;
    width: 160px; height: 160px;
    display: flex; align-items: center; justify-content: center;
    margin: 24px auto 10px;
    flex-shrink: 0;
}

.vp-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(0, 242, 255, 0.3);
    transition: all 0.4s;
}

.vp-ring.r1 { width: 160px; height: 160px; animation: vpRing 3s linear infinite; }
.vp-ring.r2 { width: 120px; height: 120px; animation: vpRing 2s linear infinite reverse; border-color: rgba(0, 242, 255, 0.2); }
.vp-ring.r3 { width: 80px;  height: 80px;  animation: vpRing 1.5s linear infinite; border-color: rgba(0, 242, 255, 0.5); }

@keyframes vpRing {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Active (listening) state */
.vp-core-ring.listening .vp-ring { border-color: rgba(0, 242, 255, 0.7); box-shadow: 0 0 12px rgba(0, 242, 255, 0.3); }
.vp-core-ring.speaking  .vp-ring { border-color: rgba(255, 154, 60, 0.7); box-shadow: 0 0 12px rgba(255, 154, 60, 0.3); }
.vp-core-ring.thinking  .vp-ring { border-color: rgba(180, 139, 255, 0.7); box-shadow: 0 0 12px rgba(180, 139, 255, 0.3); }

.vp-core-center {
    font-size: 36px;
    z-index: 2;
    filter: drop-shadow(0 0 12px rgba(0, 242, 255, 0.6));
    transition: transform 0.3s;
}

.vp-core-ring.speaking .vp-core-center { animation: vcPulse 0.5s ease-in-out infinite; }

/* Status text */
.vp-status-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-dim);
    text-align: center;
    padding: 0 20px;
    min-height: 22px;
    transition: color 0.3s;
}

.vp-status-text.listening { color: var(--neon-blue); }
.vp-status-text.speaking  { color: #ff9a3c; }
.vp-status-text.thinking  { color: #b48bff; }

/* Sound wave bars */
.vp-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 40px;
    margin: 12px 0 8px;
    flex-shrink: 0;
}

.vp-wave span {
    display: block;
    width: 4px;
    background: rgba(0, 242, 255, 0.2);
    border-radius: 2px;
    height: 8px;
    transition: background 0.3s;
}

.vp-wave.active span {
    background: var(--neon-blue);
    animation: vpWave 0.6s ease-in-out infinite;
}

.vp-wave.speaking span { background: #ff9a3c; }
.vp-wave.thinking span { background: #b48bff; animation: vpWave 1.2s ease-in-out infinite; }

.vp-wave.active span:nth-child(1)  { animation-delay: 0.0s; --h: 14px; }
.vp-wave.active span:nth-child(2)  { animation-delay: 0.1s; --h: 28px; }
.vp-wave.active span:nth-child(3)  { animation-delay: 0.2s; --h: 38px; }
.vp-wave.active span:nth-child(4)  { animation-delay: 0.3s; --h: 24px; }
.vp-wave.active span:nth-child(5)  { animation-delay: 0.15s; --h: 32px; }
.vp-wave.active span:nth-child(6)  { animation-delay: 0.05s; --h: 20px; }
.vp-wave.active span:nth-child(7)  { animation-delay: 0.25s; --h: 36px; }
.vp-wave.active span:nth-child(8)  { animation-delay: 0.35s; --h: 18px; }
.vp-wave.active span:nth-child(9)  { animation-delay: 0.1s; --h: 26px; }
.vp-wave.active span:nth-child(10) { animation-delay: 0.2s; --h: 14px; }

@keyframes vpWave {
    0%, 100% { height: 6px; }
    50%       { height: var(--h, 24px); }
}

/* Transcript */
.vp-transcript {
    flex: 1;
    width: 100%;
    max-width: 600px;
    overflow-y: auto;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
}

.vp-msg {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
    max-width: 88%;
    font-family: 'Inter', sans-serif;
    animation: vpMsgIn 0.3s cubic-bezier(.175,.885,.32,1.275) both;
}

@keyframes vpMsgIn {
    from { transform: scale(0.9) translateY(8px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

.vp-msg span {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 9px;
    letter-spacing: 2px;
    margin-bottom: 4px;
    opacity: 0.6;
}

.vp-msg.user {
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid rgba(0, 242, 255, 0.25);
    color: #e0faff;
    align-self: flex-end;
    text-align: right;
}

.vp-msg.user span { color: var(--neon-blue); }

.vp-msg.bot {
    background: rgba(180, 139, 255, 0.1);
    border: 1px solid rgba(180, 139, 255, 0.2);
    color: #e0e0ff;
    align-self: flex-start;
}

.vp-msg.bot span { color: #b48bff; }

/* Tap-to-talk button */
.vp-footer {
    width: 100%;
    padding: 16px 20px 28px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.vp-tap-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(0, 242, 255, 0.08);
    border: 2px solid rgba(0, 242, 255, 0.35);
    border-radius: 60px;
    padding: 18px 48px;
    cursor: pointer;
    transition: all 0.25s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.vp-tap-btn:active,
.vp-tap-btn.active {
    background: rgba(0, 242, 255, 0.22);
    border-color: var(--neon-blue);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.5), inset 0 0 20px rgba(0, 242, 255, 0.08);
    transform: scale(0.96);
}

.vp-tap-icon { font-size: 32px; }

.vp-tap-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--neon-blue);
}

/* Mobile optimizations for voice panel */
@media (max-width: 500px) {
    .vp-core-ring { width: 130px; height: 130px; margin: 16px auto 8px; }
    .vp-ring.r1 { width: 130px; height: 130px; }
    .vp-ring.r2 { width: 96px; height: 96px; }
    .vp-ring.r3 { width: 64px; height: 64px; }
    .vp-core-center { font-size: 28px; }
    .vp-tap-btn { padding: 16px 36px; }
}

/* COM-LINK STYLES */
.com-layout {
    display: flex;
    height: calc(100% - 60px);
    width: 100%;
    border: 1px solid var(--border-blue);
    background: rgba(2, 11, 22, 0.8);
    margin-top: 15px;
    box-sizing: border-box;
}

.ts3-sidebar {
    width: 250px;
    background: #0f131a;
    border-right: 1px solid var(--border-blue);
    display: flex;
    flex-direction: column;
    padding: 10px;
    overflow-y: auto;
}

.ts3-header {
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-blue);
    font-size: 0.8rem;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 242, 255, 0.2);
    margin-bottom: 10px;
}

.ts3-channel {
    color: #e0e0e0;
    font-size: 0.85rem;
    font-weight: bold;
    padding: 5px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ts3-channel i.fa-chevron-down, .ts3-channel i.fa-chevron-right {
    font-size: 0.7rem;
    color: #888;
}

.ts3-user {
    color: #b0b0b0;
    font-size: 0.8rem;
    padding: 3px 0 3px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.ts3-user:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ts3-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.ts3-status.green { background: #4caf50; box-shadow: 0 0 5px #4caf50; }
.ts3-status.red { background: #f44336; box-shadow: 0 0 5px #f44336; }

.ts3-controls {
    margin-top: auto;
    display: flex;
    gap: 5px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 242, 255, 0.2);
}

.ts3-btn {
    background: #1a2332;
    border: 1px solid rgba(0, 242, 255, 0.3);
    color: #fff;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    flex: 1;
}
.ts3-btn:hover { background: #253347; }
.ts3-btn.disconnect { background: #6b1515; color: #fff; border-color: #f44336; font-weight: bold; }
.ts3-btn.disconnect:hover { background: #8a1d1d; }

.wa-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0b141a;
    position: relative;
}

.wa-chat-header {
    background: #202c33;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wa-avatar {
    width: 40px;
    height: 40px;
    background: #607d8b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.wa-contact-info {
    display: flex;
    flex-direction: column;
}
.wa-contact-info strong { color: #e9edef; font-size: 1rem; }
.wa-contact-info span { color: #8696a0; font-size: 0.8rem; }

.wa-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #0b141a;
}

.wa-msg {
    max-width: 65%;
    padding: 8px 12px;
    border-radius: 8px;
    position: relative;
    font-size: 0.9rem;
    color: #e9edef;
    line-height: 1.4;
}

.wa-msg.received {
    background: #202c33;
    align-self: flex-start;
    border-top-left-radius: 0;
}

.wa-msg.sent {
    background: #005c4b;
    align-self: flex-end;
    border-top-right-radius: 0;
}

.wa-sender {
    display: block;
    color: #53bdeb;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 3px;
}

.wa-time {
    display: block;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.6);
    text-align: right;
    margin-top: 5px;
}

.wa-input-area {
    background: #202c33;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wa-attach-btn, .wa-send-btn {
    background: transparent;
    border: none;
    color: #8696a0;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}
.wa-send-btn { color: #00a884; }

.wa-input {
    flex: 1;
    background: #2a3942;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    color: #e9edef;
    font-family: 'Inter', sans-serif;
    outline: none;
}
.wa-input::placeholder { color: #8696a0; }

/* Global fix for clickability */
header, footer, #mic-control-container, .module-dropdown, #user-input, #send-btn {
    pointer-events: auto !important;
    z-index: 9999 !important;
}

/* Global fix for clickability - Update */
header, footer, #mic-control-container, .module-dropdown, #user-input, #send-btn, .module-btn {
    pointer-events: auto !important;
    z-index: 9999 !important;
}

/* Dropdown Click Fix */
.dropdown-content, .dropdown-content button {
    pointer-events: auto !important;
}
.module-dropdown {
    pointer-events: auto !important;
    z-index: 10000 !important;
}

/* Hardcore Dropdown Fixes */
.module-dropdown {
    pointer-events: auto !important;
    z-index: 999999 !important;
}
.module-btn {
    pointer-events: auto !important;
    z-index: 999999 !important;
    cursor: pointer !important;
}
.dropdown-content {
    z-index: 999999 !important;
}
.module-dropdown.active .dropdown-content {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

@media (max-width: 1024px) {
    /* Mobile Responsive Chat/Voice UI */
    .com-back-btn {
        display: inline-block;
        background: transparent;
        border: none;
        color: var(--text-color);
        font-size: 1.2rem;
        cursor: pointer;
        margin-right: 15px;
        padding: 5px;
    }
    .com-back-btn:hover { color: #53bdeb; }

    .ts3-sidebar {
        width: 100% !important;
        border-right: none;
    }

    .wa-chat-area {
        display: none !important;
        width: 100%;
    }

    .com-layout.chat-active .ts3-sidebar {
        display: none !important;
    }

    .com-layout.chat-active .wa-chat-area {
        display: flex !important;
    }
}

