/* ELITE HACKERS - Light-Mode Chat Widget Stylesheet */

/* Chat Bubble */
#chat-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 132, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 132, 255, 0.1), 0 0 15px rgba(0, 132, 255, 0.05);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: bubble-glow 2.5s infinite alternate;
}

#chat-bubble:hover {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--accent-cyan);
    box-shadow: 0 15px 35px rgba(0, 132, 255, 0.18), 0 0 25px rgba(0, 132, 255, 0.2);
}

#chat-bubble.hidden {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
    pointer-events: none;
}

.bubble-icon {
    color: var(--accent-cyan);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 3px rgba(0, 132, 255, 0.3));
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent-magenta);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    font-family: var(--font-mono);
    box-shadow: 0 0 10px rgba(233, 30, 99, 0.3);
    animation: badge-pulse 1.5s infinite;
}

@keyframes bubble-glow {
    0% {
        box-shadow: 0 10px 30px rgba(0, 132, 255, 0.08), 0 0 10px rgba(0, 132, 255, 0.05);
    }
    100% {
        box-shadow: 0 10px 30px rgba(0, 132, 255, 0.15), 0 0 20px rgba(0, 132, 255, 0.15);
        border-color: rgba(0, 132, 255, 0.4);
    }
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Chat Window */
#chat-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 370px;
    height: 520px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 132, 255, 0.12);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08), 0 0 30px rgba(0, 132, 255, 0.04);
    z-index: 999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.8) translateY(40px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    overflow: hidden;
}

#chat-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    z-index: 5;
}

#chat-window.open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

.chat-header {
    background: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(0, 132, 255, 0.05);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.15em;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 26px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.close-btn:hover {
    background: rgba(0, 132, 255, 0.05);
    color: var(--text-primary);
}

.chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow: hidden;
}

/* Name Input Container */
.name-input-container {
    text-align: center;
    padding: 20px 10px;
    margin: auto 0;
}

.name-input-container p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 1.05em;
    line-height: 1.5;
}

#name-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 132, 255, 0.15);
    border-radius: 12px;
    font-size: 0.95em;
    color: var(--text-primary);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

#name-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(0, 132, 255, 0.15);
    background: #ffffff;
}

#name-submit-btn {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0, 132, 255, 0.15);
}

#name-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 132, 255, 0.25);
}

/* Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 5px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Message Custom Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}
.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 132, 255, 0.1);
    border-radius: 2px;
}
.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    animation: messageSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    font-size: 0.95em;
    line-height: 1.5;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, #00c6ff 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 132, 255, 0.1);
}

.bot-message {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 132, 255, 0.12);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

.system-message {
    background: rgba(255, 193, 7, 0.05);
    border: 1px solid rgba(255, 193, 7, 0.2);
    color: #b28900;
    align-self: center;
    font-size: 0.8em;
    font-family: var(--font-mono);
    border-radius: 8px;
    padding: 6px 12px;
    text-align: center;
}

.message-text {
    display: block;
    word-break: break-word;
}

.message-time {
    display: block;
    font-size: 0.7em;
    margin-top: 5px;
    opacity: 0.5;
    text-align: right;
    font-family: var(--font-mono);
}

.user-message .message-time {
    color: rgba(255, 255, 255, 0.8);
}

/* Input Container */
.chat-input-container {
    display: none;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 132, 255, 0.08);
}

#message-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 132, 255, 0.15);
    border-radius: 20px;
    font-size: 0.92em;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

#message-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 132, 255, 0.1);
    background: #ffffff;
}

#send-btn {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 132, 255, 0.15);
}

#send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 132, 255, 0.25);
}

/* Responsive */
@media (max-width: 480px) {
    #chat-window {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
        bottom: 95px;
        height: 460px;
    }
    #chat-bubble {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
}
