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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('https://6710i.ir/bg/uploads/1751578102_6866f5f6c3d76.png') center center/cover no-repeat;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    max-height: 800px;
    max-width: 800px;
    margin: 0 auto;
    background: #1e1e1e;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.vpn-notice {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 50%, #fbbc05 75%, #ea4335 100%);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 300;
}

.chat-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #2a2a2a;
}

.message {
    margin-bottom: 15px;
    display: flex;
    animation: fadeIn 0.3s ease-in;
}

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

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

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.4;
}

.message.user .message-content {
    background: #4285f4;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.ai .message-content {
    background: #3a3a3a;
    color: #e0e0e0;
    border: 1px solid #555;
    border-bottom-left-radius: 4px;
}

.input-container {
    display: flex;
    padding: 20px;
    background: #1e1e1e;
    border-top: 1px solid #555;
    gap: 10px;
}

#messageInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #555;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
    background: #2a2a2a;
    color: #e0e0e0;
}

#messageInput:focus {
    border-color: #4285f4;
}

#messageInput:disabled {
    background: #3a3a3a;
    cursor: not-allowed;
}

#sendButton {
    padding: 12px 24px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    min-width: 80px;
}

#sendButton:hover:not(:disabled) {
    background: #3367d6;
}

#sendButton:disabled {
    background: #666;
    cursor: not-allowed;
}

.typing-animation {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-animation span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-animation span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-animation span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

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

@media (max-width: 768px) {
    .container {
        height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .vpn-notice {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .header {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.4rem;
    }
    
    .messages {
        padding: 15px;
    }
    
    .message-content {
        max-width: 90%;
        padding: 10px 14px;
        font-size: 15px;
    }
    
    .input-container {
        padding: 15px;
        gap: 8px;
    }
    
    #messageInput {
        font-size: 16px;
        padding: 14px 16px;
        border-width: 1px;
    }
    
    #sendButton {
        padding: 14px 20px;
        min-width: 70px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .vpn-notice {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .header {
        padding: 12px;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    .messages {
        padding: 12px;
    }
    
    .message-content {
        max-width: 95%;
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .input-container {
        padding: 12px;
        gap: 6px;
    }
    
    #messageInput {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    #sendButton {
        padding: 12px 16px;
        min-width: 60px;
        font-size: 14px;
    }
}
