:root {
    --bg-color: #212121;
    --sidebar-bg: #171717;
    --text-primary: #ececec;
    --text-secondary: #b4b4b4;
    --border-color: #424242;
    --accent-color: #f7acb0;
    --accent-hover: #d69599;
    --user-msg-bg: #2f2f2f;
    --ai-msg-bg: transparent;
    --input-bg: #2f2f2f;
}

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

body, html {
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    transition: width 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.icon-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.sidebar-menu {
    flex: 1;
    padding: 10px;
}

.menu-item {
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    margin-bottom: 5px;
    transition: background 0.2s;
}

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

.menu-item.active {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    font-weight: 500;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.user-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: var(--bg-color);
}

.chat-header {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    justify-content: space-between;
}

.model-selector {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.model-selector:hover {
    background: rgba(255,255,255,0.05);
}

/* Chat Area */
.chat-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
}

.chat-scroll-area::-webkit-scrollbar {
    width: 8px;
}
.chat-scroll-area::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* Welcome Screen */
.welcome-screen {
    max-width: 800px;
    margin: auto;
    text-align: center;
    padding-top: 10vh;
}

.welcome-avatar {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-screen h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 50px;
    letter-spacing: -0.5px;
}

/* Claude style suggestion cards */
.suggestion-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 700px;
    margin: 0 auto;
}

.suggestion-card {
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.suggestion-card:hover {
    background: #2a2a2a;
    border-color: #666;
    transform: translateY(-2px);
}

.suggestion-card i {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.text-pink { color: #f472b6; }
.text-blue { color: #60a5fa; }
.text-orange { color: #fb923c; }
.text-green { color: #4ade80; }

.suggestion-card h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.suggestion-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Message Bubbles */
.message-row {
    display: flex;
    width: 100%;
    max-width: 850px;
    margin: 0 auto 30px auto;
    gap: 20px;
}

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

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sidebar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.user-avatar {
    background: #4b5563;
}

.ai-avatar {
    background: linear-gradient(135deg, #6366f1, #d946ef);
}

.message-bubble {
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 80%;
    word-break: keep-all;
}

.message-row.user .message-bubble {
    background-color: var(--user-msg-bg);
    border-bottom-right-radius: 4px;
}

.message-row.ai .message-bubble {
    background-color: var(--ai-msg-bg);
    padding: 10px 0;
}

.message-bubble img {
    max-width: 100%;
    border-radius: 12px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.typing-indicator {
    color: var(--text-secondary);
    font-style: italic;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Input Area */
.input-area {
    padding: 20px;
    max-width: 850px;
    width: 100%;
    margin: 0 auto;
}

.input-wrapper {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    align-items: flex-end;
    padding: 10px 15px;
    transition: border-color 0.2s, background 0.2s;
}

.input-wrapper:focus-within {
    border-color: #666;
    background-color: #333;
}

.attach-btn {
    padding: 10px;
    margin-bottom: 2px;
}

#ai-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 12px 10px;
    resize: none;
    outline: none;
    max-height: 200px;
    line-height: 1.5;
}

#ai-input::placeholder {
    color: #6b7280;
}

.submit-btn {
    background: #ececec;
    color: #171717;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s, background 0.2s;
    margin-bottom: 6px;
}

.submit-btn:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-2px);
}

.submit-btn:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
    transform: none;
}

.input-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 12px;
}

/* Responsive */
.mobile-menu-btn {
    display: none;
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .suggestion-cards {
        grid-template-columns: 1fr;
    }
    .message-bubble {
        max-width: 90%;
    }
}
