﻿.chatboxmini {
    height: 80%;
    max-height: 700px;
}

.chat-container {
    height: 100%;
    position: relative;
    /* background-color: rgba(13, 14, 25, 0.85);*/
    background-color: #ffffff96;
    border-radius: 12px;
    border: 1px solid rgba(14, 227, 255, 0.15);
    box-shadow: 0 0 30px rgba(14, 227, 255, 0.1), 0 0 60px rgba(248, 69, 255, 0.05);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
html[data-bs-theme="dark"] .chat-container {
    background-color: rgba(13, 14, 25, 0.95) !important;
}

.glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(14, 227, 255, 0.03) 0%, rgba(248, 69, 255, 0.03) 100%);
    pointer-events: none;
    z-index: 1;
}

.chat-header {
    padding: 0px 20px;
    background-color: var(--darker);
    border-bottom: 1px solid rgba(14, 227, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

    .chat-title h2 {
        background: linear-gradient(90deg, var(--primary), var(--secondary));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        font-size: 1.25rem;
        letter-spacing: 1px;
        font-weight: 600;
        text-transform: uppercase;
    }

.online-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}

    .status-indicator::before {
        content: '';
        position: absolute;
        top: -2px;
        left: -2px;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        opacity: 0.4;
        animation: pulse 2s infinite;
    }

.header-actions {
    display: flex;
    gap: 15px;
}

.header-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    position: relative;
    font-size: 28px;
}

    .header-btn:hover {
        color: rgba(14, 227, 255, 1);
    }

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 2;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary) var(--darker);
}

    .chat-body::-webkit-scrollbar {
        width: 5px;
    }

    .chat-body::-webkit-scrollbar-thumb {
        background-color: var(--primary);
        border-radius: 10px;
    }

    .chat-body::-webkit-scrollbar-track {
        background-color: var(--darker);
    }

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 12px;
    position: relative;
    animation: fadeIn 0.3s ease-out forwards;
    transition: transform 0.2s;
    margin-bottom: 5px;
}

    .message:hover {
        transform: translateY(-2px);
    }

    .message.incoming {
        align-self: flex-start;
        background: linear-gradient(135deg, rgba(14, 227, 255, 0.15), rgba(14, 227, 255, 0.05));
        border-top-left-radius: 0;
        border-left: 2px solid #0ee3ff73;
    }

    .message.outgoing {
        align-self: flex-end;
        background: linear-gradient(135deg, rgba(248, 69, 255, 0.15), rgba(248, 69, 255, 0.05));
        border-bottom-right-radius: 0;
        border-right: 2px solid #ee5ffb82;
    }

    .message.system {
        align-self: center;
        background: rgba(255, 255, 255, 0.05);
        font-style: italic;
        font-size: 0.9rem;
        color: var(--text-dim);
        padding: 5px 15px;
        max-width: 90%;
        text-align: center;
    }

.message-content {
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-word;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.7rem;
    color: var(--text-dim);
}

.username {
    font-weight: 600;
    margin-bottom: 3px;
}

.message.incoming .username {
    color: var(--primary);
}

.message.outgoing .username {
    color: var(--secondary);
}

.timestamp {
    font-size: 0.7rem;
    opacity: 0.7;
}

.chat-footer {
    padding: 15px 20px;
    background-color: var(--darker);
    border-top: 1px solid rgba(14, 227, 255, 0.15);
    position: sticky;
    bottom: 0px;
    z-index: 2;
}

.message-form {
    display: flex;
    gap: 10px;
}

.message-input-container {
    flex: 1;
    position: relative;
}

.message-input {
    width: 100%;
    padding: 12px 15px;
    padding-right: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(14, 227, 255, 0.15);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    transition: all 0.3s;
    outline: none;
}

    .message-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 2px rgba(14, 227, 255, 0.2);
    }

    .message-input::placeholder {
        color: var(--text-dim);
    }

.emoji-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.2s;
    font-size: 1.1rem;
}

    .emoji-btn:hover {
        color: var(--primary);
    }

.send-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 8px;
    width: 45px;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

    .send-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        opacity: 0;
        transition: opacity 0.3s;
    }

    .send-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(14, 227, 255, 0.3);
    }

    .send-btn:active {
        transform: translateY(0);
    }

.notification {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(14, 227, 255, 0.9);
    color: var(--darker);
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    z-index: 10;
    box-shadow: 0 5px 20px rgba(14, 227, 255, 0.4);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    text-align: center;
    font-weight: 500;
}

    .notification.active {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

.typing-indicator {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    font-size: 0.9rem;
    color: var(--text-dim);
    align-self: flex-start;
    margin-top: -5px;
}

    .typing-indicator.active {
        display: flex;
    }

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    opacity: 0.6;
}

    .typing-dot:nth-child(1) {
        animation: typingDot 1s infinite 0.1s;
    }

    .typing-dot:nth-child(2) {
        animation: typingDot 1s infinite 0.2s;
    }

    .typing-dot:nth-child(3) {
        animation: typingDot 1s infinite 0.3s;
    }

.ping-effect {
    position: absolute;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #437eee;
    opacity: 0.7;
    z-index: 10;
    pointer-events: none;
    animation: pingFade 0.6s ease-out forwards;
}

.guild-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    margin-top: 3px;
}

.guild-tag {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    background-color: rgba(66, 255, 135, 0.2);
    color: var(--success);
}

.incoming .guild-tag {
    background-color: rgba(14, 227, 255, 0.2);
    color: var(--primary);
}

.outgoing .guild-tag {
    background-color: rgba(248, 69, 255, 0.2);
    color: var(--secondary);
}

.player-level {
    font-size: 0.7rem;
    background: var(--text-dim);
    color: var(--darker);
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 5px;
}

.chat-mode-toggle {
    display: flex;
    gap: 10px;
    padding: 5px;
    margin-bottom: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.8rem;
    width: fit-content;
    align-self: center;
}

.chat-mode-btn {
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

    .chat-mode-btn.active {
        background: linear-gradient(90deg, var(--primary), var(--secondary));
        color: var(--darker);
    }

.message-reaction {
    display: flex;
    align-items: center;
    gap: 3px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 5px;
    border-radius: 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 3px;
    width: fit-content;
}

    .message-reaction:hover {
        background-color: rgba(14, 227, 255, 0.2);
    }

.reaction-count {
    font-size: 0.75rem;
}

.quick-emotes {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}

.quick-emote {
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s;
    opacity: 0.7;
}

    .quick-emote:hover {
        transform: scale(1.2);
        opacity: 1;
    }

/* Cyberpunk glitch effect on notification */
.notification::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 227, 255, 0.9);
    color: var(--darker);
    clip: rect(0, 0, 0, 0);
    animation: glitch 2s infinite linear alternate-reverse;
}

/* Animation keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.2;
    }

    100% {
        transform: scale(1);
        opacity: 0.4;
    }
}

@keyframes typingDot {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

@keyframes pingFade {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

@keyframes glitch {
    0% {
        clip: rect(5px, 9999px, 75px, 0);
        opacity: 0.4;
    }

    5% {
        clip: rect(33px, 9999px, 99px, 0);
        opacity: 0.3;
    }

    10% {
        clip: rect(56px, 9999px, 22px, 0);
        opacity: 0.6;
    }

    15% {
        clip: rect(0, 0, 0, 0);
        opacity: 0;
    }

    100% {
        clip: rect(0, 0, 0, 0);
        opacity: 0;
    }
}

@media (max-width: 700px) {
    .container {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .message {
        max-width: 90%;
    }
}
