/* ================================
   ChatAFD Ultra 3D Glass Style
   Author: ChatAFD
   Features: 3D Glass, Depth, Hover, Shadow
================================= */

/* ======= Body & Background ======= */
body {
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top, #0f2027, #203a43, #2c5364);
    font-family: 'Tahoma', sans-serif;
    overflow: hidden;
}

/* ======= AI Container (Glass Card) ======= */
.ai-container {
    width: 520px;
    height: 700px;
    background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02));
    backdrop-filter: blur(55px);
    border-radius: 40px;
    box-shadow:
        0 60px 140px rgba(0,0,0,0.9),
        inset 0 0 60px rgba(255,255,255,0.15);
    transform-style: preserve-3d;
    transform: perspective(1500px) rotateX(6deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    color: #fff;
    overflow: hidden;
}

/* ======= Hover Effect 3D ======= */
.ai-container:hover {
    transform: perspective(1500px) rotateX(0deg) rotateY(2deg);
    box-shadow:
        0 70px 160px rgba(0,0,0,1),
        inset 0 0 80px rgba(255,255,255,0.2);
}

/* ======= Header ======= */
.ai-header {
    padding: 20px;
    font-size: 22px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    text-shadow:
        0 0 12px #00ffd5,
        0 0 30px rgba(0,255,213,0.4);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
}

/* ======= Chat Box ======= */
#chat {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    white-space: pre-line;
    scroll-behavior: smooth;
}

/* Scrollbar Styles */
#chat::-webkit-scrollbar {
    width: 10px;
}

#chat::-webkit-scrollbar-thumb {
    background: rgba(0,255,213,0.3);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

#chat::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

/* ======= Messages ======= */
.msg-ai {
    color: #00ffd5;
    margin-bottom: 20px;
    text-shadow: 0 0 6px #00ffd5;
    background: rgba(255,255,255,0.05);
    padding: 12px 15px;
    border-radius: 15px;
    backdrop-filter: blur(15px);
    box-shadow: inset 0 0 10px rgba(255,255,255,0.1);
    transition: transform 0.2s ease, background 0.2s ease;
}

.msg-ai:hover {
    transform: scale(1.02) translateZ(5px);
    background: rgba(255,255,255,0.08);
}

.msg-user {
    color: #ffffff;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.05);
    padding: 12px 15px;
    border-radius: 15px;
    backdrop-filter: blur(15px);
    box-shadow: inset 0 0 10px rgba(255,255,255,0.1);
}

/* ======= Input Box ======= */
input#input {
    margin: 20px;
    padding: 15px;
    border-radius: 20px;
    border: none;
    outline: none;
    font-size: 16px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    backdrop-filter: blur(15px);
    box-shadow: inset 0 0 10px rgba(255,255,255,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

input#input:focus {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0,255,213,0.5);
}

/* ======= Responsive ======= */
@media (max-width: 600px) {
    .ai-container {
        width: 90%;
        height: 90%;
    }
    .ai-header {
        font-size: 18px;
        padding: 15px;
    }
    input#input {
        padding: 12px;
        font-size: 14px;
    }
}
