/* ==========================================================================
   NOVA AI Assistant — NovaPixel Technologies
   Brand Colors: Deep Space Navy #030B20 | Electric Blue #0560ED | Neon Cyan #0FBFFA
   ========================================================================== */

* {
    box-sizing: border-box;
}

:root {
    --color-deep-space: #030B20;
    --color-surface: #071228;
    --color-elevated: #0B1938;
    --color-border: rgba(15, 191, 250, 0.16);
    --color-electric-blue: #0560ED;
    --color-neon-cyan: #0FBFFA;
    --color-vibrant-purple: #B120BF;
    --color-fiery-orange: #F94B1A;
    --color-golden-yellow: #F9A82D;
    --color-pure-white: #FFFFFF;
    
    font-family: 'Plus Jakarta Sans', 'Noto Sans Sinhala', Arial, sans-serif;
    color: #eaf4ff;
    background: var(--color-deep-space);
}

input,
button {
    font-family: inherit;
}

body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background:
        radial-gradient(circle at 50% 0%, rgba(5, 96, 237, 0.22) 0%, transparent 60%),
        radial-gradient(circle at 90% 80%, rgba(15, 191, 250, 0.12) 0%, transparent 50%),
        var(--color-deep-space);
}

.chat-app {
    width: min(100%, 480px);
    height: min(740px, calc(100vh - 40px));
    min-height: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 24px;
    background: rgba(7, 18, 40, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), 0 0 40px rgba(5, 96, 237, 0.15);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: rgba(3, 11, 32, 0.85);
    border-bottom: 1px solid var(--color-border);
    position: relative;
}

.chat-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(15, 191, 250, 0.08);
    border: 1px solid rgba(15, 191, 250, 0.2);
    color: var(--color-neon-cyan);
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-back-link:hover {
    background: rgba(15, 191, 250, 0.2);
    color: #FFFFFF;
    transform: translateX(-2px);
}

.nova-avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(3, 11, 32, 0.8);
    border: 1.5px solid rgba(15, 191, 250, 0.35);
    box-shadow: 0 0 20px rgba(15, 191, 250, 0.3);
    flex-shrink: 0;
    overflow: hidden;
}

.nova-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

.chat-header-info {
    flex: 1;
    min-width: 0;
}

.chat-header h1 {
    margin: 0 0 2px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: #030B20;
    background: linear-gradient(135deg, var(--color-neon-cyan), var(--color-golden-yellow));
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.chat-header p {
    margin: 0;
    color: #94A3B8;
    font-size: 11px;
}

.status {
    margin-left: auto;
    color: #34D399;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(52, 211, 153, 0.1);
    padding: 4px 10px;
    border-radius: 99px;
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34D399;
    box-shadow: 0 0 8px #34D399;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
}

.message {
    max-width: 88%;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.message.bot {
    align-self: flex-start;
    border: 1px solid rgba(15, 191, 250, 0.18);
    background: rgba(11, 25, 56, 0.7);
    color: #E2E8F0;
    box-shadow: 0 4px 16px rgba(3, 11, 32, 0.4);
}

.message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #0560ED 0%, #0FBFFA 100%);
    color: #030B20;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(5, 96, 237, 0.35);
}

.quick-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 14px;
    overflow-x: auto;
    scrollbar-width: none;
}

.quick-actions::-webkit-scrollbar {
    display: none;
}

.quick-actions button {
    flex-shrink: 0;
    border: 1px solid rgba(15, 191, 250, 0.25);
    border-radius: 18px;
    padding: 8px 14px;
    color: var(--color-neon-cyan);
    background: rgba(7, 18, 40, 0.8);
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.quick-actions button:hover {
    background: rgba(15, 191, 250, 0.15);
    border-color: var(--color-neon-cyan);
    color: #FFFFFF;
}

.chat-input {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--color-border);
    background: rgba(3, 11, 32, 0.6);
}

.chat-input input {
    width: 0;
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 13px 16px;
    outline: none;
    background: rgba(3, 11, 32, 0.85);
    color: white;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-input input:focus {
    border-color: var(--color-neon-cyan);
    box-shadow: 0 0 0 3px rgba(15, 191, 250, 0.2);
}

.chat-input button {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #0560ED, #0FBFFA);
    color: #030B20;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-input button:hover {
    transform: scale(1.04);
    box-shadow: 0 0 16px rgba(15, 191, 250, 0.4);
}

.chat-footer {
    padding: 0 12px 14px;
    text-align: center;
    color: #64748B;
    font-size: 10.5px;
}

.chat-footer strong {
    color: var(--color-neon-cyan);
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid var(--color-neon-cyan);
    outline-offset: 3px;
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }

    .chat-app {
        width: 100%;
        height: 100dvh;
        min-height: 0;
        border-radius: 0;
        border: none;
    }
}
