* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #fff;
}

.chat-container {
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(15, 23, 42, 0.8);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: transform 0.3s ease;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
}

.logo-text span {
    color: #667eea;
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.new-chat-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.new-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.history-title {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.history-item {
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 8px;
    font-size: 14px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.05);
}

.history-item:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #fff;
}

.history-item.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    color: #fff;
    font-weight: 600;
    border-left: 3px solid #667eea;
}

.history-item i {
    color: #667eea;
    font-size: 14px;
    width: 20px;
}

.creator-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.creator-text {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.6;
}

.team-name {
    color: #667eea;
    font-weight: 700;
}

/* Main Chat Area */
.main-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.6);
}

.chat-header {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.8);
}

.chat-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #94a3b8;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px #10b981;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.5; 
        transform: scale(1.1);
    }
}

/* Messages Container */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.message {
    display: flex;
    gap: 15px;
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

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

.message.user {
    margin-left: auto;
    flex-direction: row-reverse;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    border: 2px solid;
}

.avatar.user {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: rgba(102, 126, 234, 0.5);
}

.avatar.ai {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: rgba(16, 185, 129, 0.5);
}

.message-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 18px 22px;
    border-radius: 18px;
    backdrop-filter: blur(10px);
    max-width: 100%;
    word-wrap: break-word;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message.user .message-content {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    color: white;
    border-bottom-right-radius: 5px;
}

.message.ai .message-content {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border-bottom-left-radius: 5px;
}

.message-text {
    line-height: 1.7;
    font-size: 15px;
}

.message-text h1, .message-text h2, .message-text h3 {
    margin: 10px 0;
    color: #fff;
}

.message-text p {
    margin: 8px 0;
}

.message-text ul, .message-text ol {
    margin: 10px 0 10px 20px;
}

.message-text li {
    margin: 5px 0;
}

.message-time {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 10px;
    text-align: right;
}

.message.user .message-time {
    color: rgba(255, 255, 255, 0.7);
}

/* Welcome Container */
.welcome-container {
    text-align: center;
    padding: 50px 20px;
    max-width: 700px;
    margin: 0 auto;
}

.welcome-icon {
    font-size: 64px;
    color: #667eea;
    margin-bottom: 25px;
    position: relative;
}

.pulse-ring {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border: 3px solid #667eea;
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { 
        transform: translateX(-50%) scale(0.8);
        opacity: 1;
    }
    100% { 
        transform: translateX(-50%) scale(1.5);
        opacity: 0;
    }
}

.welcome-title {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.welcome-subtitle {
    font-size: 17px;
    color: #cbd5e1;
    margin-bottom: 40px;
    line-height: 1.7;
}

/* Example Prompts */
.example-prompts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.example-prompt {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.example-prompt:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.example-prompt i {
    font-size: 20px;
    color: #667eea;
    width: 30px;
}

.example-prompt span {
    font-size: 15px;
    font-weight: 500;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    max-width: 250px;
    margin: 0 30px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.typing-indicator.active {
    display: flex;
}

.typing-dots {
    display: flex;
    gap: 5px;
}

.typing-dot {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% { 
        transform: translateY(0); 
    }
    30% { 
        transform: translateY(-8px); 
    }
}

.typing-text {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 500;
}

/* Input Container */
.input-container {
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.8);
}

.input-wrapper {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.input-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

#userInput {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #fff;
    resize: none;
    outline: none;
    min-height: 24px;
    max-height: 120px;
    line-height: 1.5;
    font-family: inherit;
}

#userInput::placeholder {
    color: #94a3b8;
}

.input-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.action-btn:hover {
    background: rgba(102, 126, 234, 0.3);
    color: #fff;
}

.send-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

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

.privacy-notice {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

/* Chat Footer */
.chat-footer {
    padding: 15px 30px;
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-text {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.developer-name {
    color: #667eea;
    font-weight: 700;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Code Styling */
pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 15px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

code {
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message.user code {
    background: rgba(255, 255, 255, 0.1);
    border: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .chat-container {
        height: 95vh;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        z-index: 1000;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .message {
        max-width: 90%;
    }
    
    .example-prompts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .chat-container {
        height: 100vh;
        border-radius: 15px;
    }
    
    .messages-container {
        padding: 20px;
    }
    
    .chat-header {
        padding: 15px 20px;
    }
    
    .input-container {
        padding: 15px 20px;
    }
    
    .welcome-title {
        font-size: 28px;
    }
    
    .welcome-subtitle {
        font-size: 16px;
    }
    
    .footer-text {
        flex-direction: column;
        gap: 5px;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message {
    animation: slideIn 0.3s ease;
}
