:root {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --glass: rgba(30, 41, 59, 0.7);
    --border: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Layout */
.sidebar {
    width: 320px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.main-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
}

.info-panel {
    width: 300px;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    padding: 20px;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--accent), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Chat List */
.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    gap: 12px;
}

.chat-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.chat-item.active {
    background: rgba(56, 189, 248, 0.1);
    border-left: 4px solid var(--accent);
}

.chat-item.priority-high {
    border-left: 4px solid var(--danger);
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-info h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.chat-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Chat Area */
.chat-header {
    padding: 15px 25px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

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

.message.user {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.message.agent {
    align-self: flex-end;
    background: var(--accent);
    color: white;
}

.message .original {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 4px;
    font-style: italic;
}

.message .translated {
    font-size: 0.95rem;
}

/* Chat Input */
.input-area {
    padding: 20px 25px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
}

.input-wrapper {
    background: #334155;
    border-radius: 12px;
    padding: 10px 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    outline: none;
    font-size: 0.95rem;
}

.btn-send {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-send:hover {
    background: var(--accent-hover);
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
