* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f6f0df;
    min-height: 100vh;
    color: #1a1a2e;
    overflow: hidden;
}

.app {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.header-section {
    text-align: center;
    margin-bottom: 24px;
}

.main-title {
    font-size: 42px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.video-section {
    text-align: center;
    margin-bottom: 20px;
}

.fillip-video {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    pointer-events: none;
}

.main-title .highlight {
    background: linear-gradient(135deg, #6b9dfa 0%, #4f7cfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-subtitle {
    font-size: 16px;
    color: rgba(26, 26, 46, 0.7);
    font-weight: 400;
}

.messages-section {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 24px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}


.message {
    display: flex;
    animation: fadeIn 0.3s ease-in;
}

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

.message-user {
    justify-content: flex-end;
}

.message-assistant {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 14px 18px;
    border-radius: 18px;
    line-height: 1.5;
    font-size: 15px;
}

.message-user .message-content {
    background: linear-gradient(135deg, #6b9dfa 0%, #4f7cfa 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.message-assistant .message-content {
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.message-content ul {
    margin-left: 1.5em;
    margin-top: 8px;
    list-style-type: disc;
}

.message-content li {
    margin-bottom: 4px;
}

.message-content strong {
    font-weight: 600;
    color: #6b9dfa;
}

.message-content p {
    margin-bottom: 8px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.input-section {
    padding: 0 20px 20px;
}

.input-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    min-height: 100px;
    position: relative;
}

#userInput {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-size: 15px;
    font-family: inherit;
    background: transparent;
    color: #1a1a2e;
    line-height: 1.5;
    max-height: 200px;
    overflow-y: auto;
    padding-bottom: 50px;
}

#userInput::placeholder {
    color: rgba(26, 26, 46, 0.5);
}

.input-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    position: absolute;
    bottom: 20px;
    right: 24px;
}

.action-btn,
.send-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.action-btn {
    background: rgba(107, 157, 250, 0.15);
    color: #6b9dfa;
}

.action-btn:hover {
    background: rgba(107, 157, 250, 0.25);
}

.send-btn {
    background: linear-gradient(135deg, #6b9dfa 0%, #4f7cfa 100%);
    color: white;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(107, 157, 250, 0.4);
}

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

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(107, 157, 250, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 157, 250, 0.5);
}

@media (max-width: 768px) {
    .app {
        padding: 20px 12px 12px;
    }
    
    .main-title {
        font-size: 32px;
    }
    
    .main-subtitle {
        font-size: 14px;
    }
    
    .message-content {
        max-width: 85%;
        font-size: 14px;
    }
    
    .messages-section {
        padding: 0 12px;
    }
    
    .input-section {
        padding: 0 12px 12px;
    }
}
