* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: #00d4ff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: #a0a0a0;
    font-weight: 300;
}

.main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    flex: 1;
}

.chat-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    max-height: 600px;
}

.message {
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    text-align: right;
}

.message-content {
    display: inline-flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 80%;
    padding: 15px 20px;
    border-radius: 18px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.message.user .message-content {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.3);
    margin-left: auto;
}

.message.system .message-content {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.message-content i {
    font-size: 1.2rem;
    color: #00d4ff;
    margin-top: 2px;
}

.message-content p {
    line-height: 1.6;
    font-size: 1rem;
}

.input-container {
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.input-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

#promptInput {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 15px 20px;
    color: #ffffff;
    font-size: 1rem;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
}

#promptInput:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

#promptInput::placeholder {
    color: #a0a0a0;
}

.send-button {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 15px;
    width: 50px;
    height: 50px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #a0a0a0;
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-wrapper input:checked + .checkmark {
    background: #00d4ff;
    border-color: #00d4ff;
}

.checkbox-wrapper input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.clear-button {
    background: rgba(255, 59, 48, 0.2);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #ff3b30;
    padding: 8px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clear-button:hover {
    background: rgba(255, 59, 48, 0.3);
    transform: translateY(-1px);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.model-info, .response-stats {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.model-info h3, .response-stats h3 {
    margin-bottom: 15px;
    color: #00d4ff;
    font-size: 1.1rem;
    font-weight: 600;
}

.info-item, .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item:last-child, .stat-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.label {
    color: #a0a0a0;
    font-size: 0.9rem;
}

.value {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
}

.status {
    color: #30d158;
}

.status.loading {
    color: #ff9f0a;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #00d4ff;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .main {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .chat-messages {
        max-height: 400px;
    }
    
    .sample-prompts {
        position: fixed !important;
        bottom: 10px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
        z-index: 1000;
    }
    
    .message-content {
        max-width: 90% !important;
    }
}

/* Enhanced animations */
.message.bot {
    animation: slideInLeft 0.3s ease-out;
}

.message.user {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
