/* ============================================================
   CryZon AI - FULL STYLING (FLOATING BUTTON & CHAT BOX)
============================================================ */

/* 1. CryZon CHAT BOX (PC - Left Side / Mobile - Center) */
#CryZon-chat-box {
    position: fixed;
    left: 30px; 
    bottom: 90px;
    width: 360px;
    height: 520px;
    background: linear-gradient(145deg, #0f0f1a, #1a1a2e);
    border-radius: 25px;
    display: none; /* JavaScript මගින් පාලනය වේ */
    flex-direction: column;
    z-index: 10001;
    border: 1px solid #4b0082;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    animation: slideInLeft 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* PC Optimization (Screen width > 1024px) */
@media screen and (min-width: 1024px) {
    #CryZon-chat-box {
        left: 30px !important;
        right: auto !important;
        top: 207px !important; 
        width: 450px !important;
        height: 650px !important;
    }
}

/* Mobile & Tablet Optimization */
@media screen and (max-width: 768px) {
    #CryZon-chat-box {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: 80px;
        height: 500px;
    }
}

/* 2. CryZon FLOATING BUTTON (FAB) */
.CryZon-fab {
    position: fixed;
    bottom: 10px;
    right: 20px;
    width: 65px;
    height: 65px;
    background: rgba(11, 14, 20, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2000;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(255, 215, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.CryZon-fab-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #ffd700;
    border-bottom-color: #ffd700;
    animation: rotateRing 3s linear infinite;
    opacity: 0.5;
}

.CryZon-fab-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    z-index: 2;
    border: 2px solid #ffd700;
}

.CryZon-fab-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 3. INTERNAL ELEMENTS (Header, Messages, Input) */
.CryZon-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #2e004f, #4b0082, #8a2be2);
    color: gold;
    border-bottom: 1px solid #4b0082;
}

.CryZon-name {
    font-size: 24px;
    font-family: 'Indie Flower', cursive;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.CryZon-messages {
    flex: 1;
    padding: 20px 15px;
    overflow-y: auto;
    background-color: #0b0b14;
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    background-blend-mode: overlay;
    background-size: 400px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.CryZon-msg {
    padding: 10px 14px;
    font-size: 14.5px;
    line-height: 1.4;
    max-width: 85%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.CryZon-msg.bot {
    background: #1a1a2e !important;
    color: #e9edef !important;
    border-radius: 0 15px 15px 15px;
    align-self: flex-start;
    border-left: 3px solid gold;
}

.CryZon-msg.user {
    background: #4b0082 !important;
    color: #ffffff !important;
    border-radius: 15px 15px 0 15px;
    align-self: flex-end;
}

.CryZon-input {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #161d21;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0 0 25px 25px;
}

.CryZon-input input {
    flex: 1;
    background: #1a1a2e;
    border: 1px solid #4b0082;
    color: #fff;
    border-radius: 20px;
    padding: 10px 16px;
    outline: none;
}

/* 4. BUTTONS (Send, Plus, Close) */
#CryZon-send {
    background: #4b0082;
    color: gold;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

#CryZon-plus {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

#CryZon-plus:hover {
    background: #ffd700;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    transform: translateY(-2px);
}

#CryZon-close {
    background: #ff4b4b;
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 5. ANIMATIONS & SCROLLBAR */
@keyframes rotateRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideInLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.CryZon-messages::-webkit-scrollbar { width: 5px; }
.CryZon-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 20px;
}

/* Thinking/Typing */
.wa-typing { display: flex; gap: 4px; align-items: center; }
.wa-typing span { width: 6px; height: 6px; background: gold; border-radius: 50%; animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }