/* GSOC Chat Widget - Dark Style */
#gsoc-chat-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0090c4 0%, #1a73e8 100%);
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0,144,196,0.4), 0 0 0 1px rgba(255,255,255,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    transition: transform 0.2s, box-shadow 0.2s;
}

#gsoc-chat-bubble:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,144,196,0.5);
}

#gsoc-chat-bubble svg {
    width: 28px;
    height: 28px;
    fill: white;
}

#gsoc-chat-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 550px;
    max-height: calc(100vh - 120px);
    background: #020b16;
    border: 1px solid rgba(59,130,246,0.5);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(59,130,246,0.3);
    display: none;
    flex-direction: column;
    z-index: 9999;
    animation: slideUp 0.3s ease-out;
}

#gsoc-chat-panel.open {
    display: flex;
}

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

.gsoc-chat-header {
    padding: 16px;
    background: linear-gradient(135deg, #0090c4 0%, #1a73e8 100%);
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.gsoc-chat-header h3 {
    margin: 0;
    color: white;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gsoc-chat-close {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.gsoc-chat-close:hover {
    background: rgba(255,255,255,0.3);
}

.gsoc-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gsoc-chat-message {
    display: flex;
    gap: 8px;
    animation: fadeIn 0.3s;
}

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

.gsoc-chat-message.user {
    flex-direction: row-reverse;
}

.gsoc-chat-message .avatar {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    background: rgba(59,130,246,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.gsoc-chat-message.user .avatar {
    background: rgba(0,144,196,0.3);
}

.gsoc-chat-message .bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    color: #e6edf7;
    font-size: 14px;
    line-height: 1.4;
}

.gsoc-chat-message.assistant .bubble {
    background: rgba(59,130,246,0.15);
    border: 1px solid rgba(59,130,246,0.3);
}

.gsoc-chat-message.user .bubble {
    background: rgba(0,144,196,0.2);
    border: 1px solid rgba(0,144,196,0.4);
}

.gsoc-chat-typing {
    display: none;
    padding: 10px 14px;
    background: rgba(59,130,246,0.15);
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 12px;
    width: fit-content;
}

.gsoc-chat-typing.active {
    display: block;
}

.gsoc-chat-typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #60a5fa;
    border-radius: 3px;
    margin: 0 2px;
    animation: typing 1.4s infinite;
}

.gsoc-chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.gsoc-chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

.gsoc-chat-input-area {
    padding: 12px 16px;
    border-top: 1px solid rgba(59,130,246,0.2);
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.gsoc-chat-input {
    flex: 1;
    background: rgba(15,26,50,0.8);
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 20px;
    padding: 10px 16px;
    color: #e6edf7;
    font-size: 14px;
    outline: none;
    resize: none;
    max-height: 100px;
    font-family: inherit;
}

.gsoc-chat-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}

.gsoc-chat-send {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #0090c4 0%, #1a73e8 100%);
    border: none;
    border-radius: 19px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gsoc-chat-send:hover {
    opacity: 0.9;
}

.gsoc-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    #gsoc-chat-panel {
        width: calc(100vw - 40px);
        height: calc(100vh - 40px);
        bottom: 20px;
        right: 20px;
        max-height: none;
    }
}
