.nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    touch-action: manipulation;
}

.nav-button:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--text-muted);
    transform: scale(1.05);
}

.nav-button .material-symbols-outlined {
    font-size: 20px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.nav-button:hover .material-symbols-outlined {
    color: var(--text-primary);
}

.nav-button.new-chat-button {
    background: linear-gradient(135deg, var(--accent-muted) 0%, var(--bg-secondary) 100%);
}

.nav-button.new-chat-button .material-symbols-outlined {
    color: var(--accent-primary);
    font-weight: 600;
}

.nav-button.new-chat-button:hover {
    box-shadow: 0 4px 16px rgba(124, 176, 138, 0.4);
}

.nav-button.account-button {
    background: linear-gradient(135deg, var(--accent-muted) 0%, var(--bg-secondary) 100%);
}

.nav-button.account-button .material-symbols-outlined {
    color: var(--accent-primary);
}

.banner-button {
    padding: 5px 12px;
    background-color: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.banner-button:hover {
    opacity: 0.85;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.suggestion-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 24px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    text-align: left;
}

.suggestion-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-muted);
    background-color: var(--bg-tertiary);
}

.suggestion-card .material-symbols-outlined {
    font-size: 28px;
    color: var(--accent-primary);
}

.card-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.message {
    animation: messageSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    line-height: 1.7;
    font-size: 15px;
}

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

.user-message {
    align-self: flex-end;
    max-width: 75%;
    padding: 12px 18px;
    background-color: var(--accent-muted);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    animation: messageSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.bot-message {
    align-self: flex-start;
    max-width: 85%;
    color: var(--text-primary);
    animation: messageSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.bot-message p {
    margin: 0;
}

.streaming-message {
    animation: none;
}

.streaming-message p::after {
    content: '▌';
    animation: blink 1s infinite;
    color: var(--accent-primary);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.chat-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-secondary);
    border-radius: 28px;
    padding: 8px 8px 8px 22px;
    border: 1px solid var(--border-color);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.chat-input-wrapper:focus-within {
    border-color: var(--accent-secondary);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--accent-muted);
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    padding: 10px 0;
    line-height: 1.5;
}

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

.send-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 12px rgba(124, 176, 138, 0.35);
    flex-shrink: 0;
}

.send-button:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 20px rgba(124, 176, 138, 0.5);
}

.send-button:active {
    transform: scale(0.94);
}

.send-button .material-symbols-outlined {
    font-size: 22px;
    color: var(--bg-primary);
    font-weight: 600;
}

.loading-dots {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 0;
}

.loading-dots span {
    width: 7px;
    height: 7px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.toggle-switch input:checked+.toggle-slider {
    background-color: var(--accent-muted);
    border-color: var(--accent-secondary);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(20px);
    background-color: var(--accent-primary);
}

.settings-input,
.settings-textarea {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.settings-input:focus,
.settings-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

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

.settings-textarea {
    min-height: 80px;
    resize: vertical;
    line-height: 1.5;
}

.settings-select-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.settings-select-button:hover {
    border-color: var(--text-muted);
}

.settings-select-button:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-muted);
    outline: none;
}

.select-button-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.select-button-content .material-symbols-outlined {
    font-size: 20px;
    color: var(--accent-primary);
}

.settings-select-button > .material-symbols-outlined {
    font-size: 20px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 4px 4px 4px 14px;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    padding: 8px 0;
}

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

.toggle-visibility {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.toggle-visibility:hover {
    opacity: 0.7;
}

.toggle-visibility .material-symbols-outlined {
    font-size: 18px;
    color: var(--text-muted);
}

.hint {
    margin-top: 10px;
    font-size: 12px;
}

.hint a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.hint a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.input-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.input-action-btn:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
    border-color: var(--accent-secondary);
    transform: scale(1.05);
}

.input-action-btn:active {
    transform: scale(0.95);
}

.input-action-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-muted);
}

.input-action-btn .material-symbols-outlined {
    font-size: 22px;
}

.research-prompt {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-md);
}

.research-prompt p {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.research-buttons {
    display: flex;
    gap: 10px;
}

.research-btn {
    padding: 10px 20px;
    background: var(--accent-primary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.research-btn:hover {
    opacity: 0.85;
}

.research-btn:active {
    transform: scale(0.97);
}

.research-cancel-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.research-cancel-btn:hover {
    background: var(--bg-secondary);
}

.search-results-message {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-md);
}

.search-results-message p {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.search-results-json {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    color: var(--accent-primary);
    overflow-x: auto;
    white-space: pre;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.search-results-hint {
    color: var(--text-muted) !important;
    font-size: 13px;
    font-style: italic;
}

.loading-message .loading-text {
    margin-left: 10px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ========================================
   Slash Command Dropdown
   ======================================== */

.slash-command-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    max-height: 180px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
    z-index: 20;
    margin-bottom: 8px;
    padding: 3px;
}

.slash-command-dropdown.visible {
    display: block;
    animation: slideUp 0.15s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.slash-command-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.15s ease;
    min-height: 28px;
}

.slash-command-item:hover {
    background-color: var(--bg-tertiary);
}

.slash-command-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    flex-shrink: 0;
}

.slash-command-icon .material-symbols-outlined {
    font-size: 12px;
    color: var(--accent-primary);
}

.slash-command-icon.built-in {
    background: var(--accent-muted);
}

.slash-command-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.slash-command-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.slash-command-desc {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.slash-command-badge {
    font-size: 8px;
    padding: 1px 5px;
    background: var(--accent-muted);
    color: var(--accent-primary);
    border-radius: 8px;
    flex-shrink: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Slash hint below input */
.slash-hint {
    font-size: 8px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 3px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.slash-hint.hidden {
    opacity: 0;
}

/* ========================================
   Skill Usage Indicator
   ======================================== */

.skill-indicator {
    padding: 0;
}

.skill-usage-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--accent-muted);
    border-radius: var(--radius-lg);
    font-size: 13px;
    color: var(--accent-primary);
    animation: pulse 1.5s ease-in-out infinite;
}

.skill-usage-badge .material-symbols-outlined {
    font-size: 16px;
    animation: spin 2s linear infinite;
}

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