:root {
    --bg-color: transparent;
    --text-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.05);
    --accent-color: #3b82f6;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-main: 'Geist', -apple-system, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.aitainer {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: transparent;
    backdrop-filter: blur(20px);
}

.ai-msgs {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    scrollbar-width: none;
}

.ai-msgs::-webkit-scrollbar {
    display: none;
}

.ai-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    opacity: 0.6;
    text-align: center;
}

.ai-welcome-icon {
    width: 64px;
    height: 64px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.ai-welcome h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.ai-welcome p {
    margin: 8px 0 0;
    font-size: 14px;
}

.msg {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    animation: fadeIn 0.3s ease-out;
}

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

.msg.user {
    align-self: flex-end;
    align-items: flex-end;
}

.msg.ai {
    align-self: flex-start;
}

.msg-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.4;
    margin-bottom: 6px;
    font-weight: 600;
}

.msg-bubble {
    padding: 16px 20px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.6;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.msg.user .msg-bubble {
    background: var(--accent-color);
    color: white;
    border: none;
    border-bottom-right-radius: 4px;
}

.msg.ai .msg-bubble {
    border-bottom-left-radius: 4px;
}

.ai-input-area {
    padding: 20px 40px 40px;
}

.ai-input-wpr {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 8px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    transition: border-color 0.2s;
}

.ai-input-wpr:focus-within {
    border-color: rgba(255, 255, 255, 0.2);
}

.ai-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 12px 4px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    outline: none;
    max-height: 120px;
}

.ai-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 16px;
    background: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, opacity 0.2s;
}

.ai-send-btn:hover {
    transform: scale(1.05);
}

.ai-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.model-sel {
    position: relative;
}

.model-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 8px 12px;
    color: white;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.model-chv {
    width: 12px;
    height: 12px;
    opacity: 0.5;
    transition: transform 0.2s;
}

.model-dr.open + .model-btn .model-chv {
    transform: rotate(180deg);
}

.model-dr {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 0;
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 8px;
    display: none;
    flex-direction: column;
    min-width: 200px;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.model-dr.open {
    display: flex;
}

.model-option {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.model-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.model-option.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
}

.prov-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
}

.typing-ind {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-dot {
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0.3;
    animation: typing 1s infinite ease-in-out;
}

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

@keyframes typing {
    0%, 100% { transform: translateY(0); opacity: 0.3; }
    50% { transform: translateY(-4px); opacity: 1; }
}
