/* Strategy Meeting with Jensen Huang — Styles */

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1e1e1e;
    --bg-jensen: #1a1a2e;
    --bg-user: #0d2818;
    --text-primary: #e8e8e8;
    --text-secondary: #999;
    --text-muted: #666;
    --accent: #76b900;
    --accent-dim: #5a8f00;
    --border: #2a2a2a;
    --danger: #cc3333;
    --radius: 12px;
    --max-width: 800px;
}

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Header */
.header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.header h1 .nvidia-green {
    color: var(--accent);
}

.header .subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-style: italic;
}

.header .subtitle .research-link {
    color: var(--accent);
    text-decoration: none;
    font-style: normal;
    font-size: 0.8rem;
}

.header .subtitle .research-link:hover {
    text-decoration: underline;
}

.model-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.8rem;
}

.model-selector label {
    color: var(--text-muted);
}

.model-selector select {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}

.model-selector select:focus {
    border-color: var(--accent-dim);
}

/* Chat area */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 8px;
    scroll-behavior: smooth;
}

.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* Messages */
.message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

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

.message.jensen {
    flex-direction: row;
}

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

.message .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.message.jensen .avatar {
    background: var(--bg-jensen);
    border: 1px solid #2a2a4e;
}

.message.user .avatar {
    background: var(--bg-user);
    border: 1px solid #1a4028;
}

.message .bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: var(--radius);
    line-height: 1.6;
    font-size: 0.925rem;
}

.message.jensen .bubble {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-top-left-radius: 4px;
}

.message.user .bubble {
    background: #0d2818;
    border: 1px solid #1a4028;
    border-top-right-radius: 4px;
    color: #d4e8d0;
}

.message .bubble p {
    margin-bottom: 0.6em;
}

.message .bubble p:last-child {
    margin-bottom: 0;
}

.message .bubble strong {
    color: var(--accent);
    font-weight: 600;
}

.message .bubble em {
    color: var(--text-secondary);
}

.message .bubble code {
    background: rgba(118, 185, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--accent);
}

.message .bubble table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 0.85rem;
}

.message .bubble th,
.message .bubble td {
    padding: 6px 10px;
    border: 1px solid var(--border);
    text-align: left;
}

.message .bubble th {
    background: rgba(118, 185, 0, 0.08);
    color: var(--accent);
    font-weight: 600;
}

.message .bubble h2,
.message .bubble h3 {
    color: var(--accent);
    margin: 12px 0 6px;
    font-size: 1rem;
}

.message .bubble h2:first-child,
.message .bubble h3:first-child {
    margin-top: 0;
}

/* Thinking indicator */
.thinking {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
    animation: fadeIn 0.3s ease;
}

.thinking .dots {
    display: flex;
    gap: 4px;
}

.thinking .dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-dim);
    animation: pulse 1.4s infinite;
}

.thinking .dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking .dots span:nth-child(3) { animation-delay: 0.4s; }

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

/* Input area */
.input-area {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.input-wrapper textarea {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.925rem;
    line-height: 1.5;
    resize: none;
    outline: none;
    min-height: 48px;
    max-height: 160px;
    transition: border-color 0.2s;
}

.input-wrapper textarea:focus {
    border-color: var(--accent-dim);
}

.input-wrapper textarea::placeholder {
    color: var(--text-muted);
}

.input-wrapper button {
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, opacity 0.2s;
    flex-shrink: 0;
}

.input-wrapper button:hover {
    background: var(--accent-dim);
}

.input-wrapper button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.input-wrapper button svg {
    width: 20px;
    height: 20px;
    fill: var(--bg-primary);
}

/* New meeting button */
.new-meeting {
    text-align: center;
    margin-top: 6px;
}

.new-meeting button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.new-meeting button:hover {
    color: var(--text-secondary);
}

/* Welcome screen */
.welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
}

.welcome .icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.welcome p {
    max-width: 380px;
    line-height: 1.6;
    font-size: 0.9rem;
}

.welcome .start-btn {
    margin-top: 20px;
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.welcome .start-btn:hover {
    background: var(--accent-dim);
}

/* Responsive */
@media (max-width: 600px) {
    .header {
        padding: 16px 16px 12px;
    }

    .header h1 {
        font-size: 1.1rem;
    }

    .message .bubble {
        max-width: 88%;
        padding: 10px 14px;
    }

    .message .avatar {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .input-area {
        padding: 10px 12px 14px;
    }
}
