body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #7f5af0 0%, #2cb67d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.8s;
}
#app {
    width: 100%;
    max-width: 440px;
    background: rgba(24, 24, 27, 0.65);
    border-radius: 22px;
    box-shadow: 0 8px 32px rgba(127,90,240,0.18), 0 2px 12px rgba(44,182,125,0.12);
    padding: 70px 22px 32px 22px;
    position: relative;
    backdrop-filter: blur(16px) saturate(180%);
    border: 1.5px solid rgba(127,90,240,0.18);
    overflow: hidden;
}
.logo-area {
    display: flex;
    align-items: baseline;
    gap: 10px;
    position: absolute;
    left: 22px;
    top: 22px;
}
.logo {
    font-size: 2.1rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #fff;
    text-shadow: 0 2px 12px #7f5af0, 0 1px 4px #2cb67d;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    user-select: none;
    margin: 0;
}
.experiment {
    font-size: 1rem;
    color: #fafafc;
    opacity: 0.7;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    letter-spacing: 0.04em;
    margin-left: 2px;
    vertical-align: super;
}
#chat-container {
    background: rgba(36,36,40,0.7);
    border-radius: 16px;
    min-height: 260px;
    max-height: 340px;
    overflow-y: auto;
    padding: 18px;
    margin-bottom: 22px;
    box-shadow: 0 2px 12px rgba(127,90,240,0.08);
    border: 1px solid rgba(127,90,240,0.08);
    animation: glassFadeIn 1s;
}
@keyframes glassFadeIn {
    from { opacity: 0; filter: blur(8px); }
    to { opacity: 1; filter: blur(0); }
}
.message {
    margin-bottom: 16px;
    padding: 10px 18px;
    border-radius: 16px;
    max-width: 80%;
    word-break: break-word;
    font-size: 1.08rem;
    line-height: 1.6;
    animation: bubbleIn 0.4s;
    box-shadow: 0 2px 8px rgba(127,90,240,0.08);
    position: relative;
}
@keyframes bubbleIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.message.user {
    background: linear-gradient(90deg, #7f5af0 60%, #6243ea 100%);
    color: #fff;
    margin-left: auto;
    text-align: right;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 12px #7f5af044;
}
.message.ai {
    background: linear-gradient(90deg, #2cb67d 60%, #1eae6b 100%);
    color: #fff;
    margin-right: auto;
    text-align: left;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 12px #2cb67d44;
}
.message.typing {
    border-right: 2px solid #fff;
    animation: blink-caret 0.8s steps(1) infinite;
}
@keyframes blink-caret {
    0%, 100% { border-color: transparent; }
    50% { border-color: #fff; }
}
#input-area {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
#input-box {
    flex: 1;
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    background: rgba(36,36,40,0.8);
    color: #fafafc;
    font-size: 1.08rem;
    outline: none;
    box-shadow: 0 2px 8px #7f5af044;
    transition: background 0.2s;
}
#input-box:focus {
    background: rgba(127,90,240,0.12);
}
#send-btn {
    background: linear-gradient(90deg, #7f5af0 60%, #2cb67d 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0 22px;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 2px 8px #7f5af044;
    transition: background 0.2s, transform 0.1s;
}
#send-btn:hover {
    background: linear-gradient(90deg, #6243ea 60%, #1eae6b 100%);
    transform: scale(1.08);
}
#stopwatch {
    position: absolute;
    left: 22px;
    bottom: 22px;
    font-size: 1.15rem;
    color: #fff;
    background: rgba(127,90,240,0.18);
    padding: 6px 16px;
    border-radius: 12px;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    letter-spacing: 0.08em;
    box-shadow: 0 2px 8px #7f5af044;
    border: 1px solid rgba(127,90,240,0.18);
    user-select: none;
}