.nav-buttons {
    position: relative;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.model-selector {
    padding: 0.5rem 1rem;
    background: var(--content-bgc);
    box-shadow: var(--shadow);
    border: transparent;
    border-radius: var(--border-radius-custom);
    color: var(--accent-color);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.model-selector:hover {
    border-color: var(--accent);
}

.nav-buttons button {
    width: 45px;
    height: 45px;
    border-radius: var(--border-radius-custom);
    background: var(--content-bgc);
    color: var(--text-color-default);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-buttons button:hover {
    background: var(--accent-overlay);
}

.chat-container {
    display: flex;
    height: 100vh;
    background: var(--primary-bgc);
}

.character-panel {
    width: 350px;
    background: var(--secondary-bgc);
    border-right: var(--border-thin);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.character-avatar {
    width: 200px;
    height: 200px;
    border-radius: var(--border-radius-rounded);
    background: var(--accent-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite,
        aiPulse 2s ease-in-out infinite,
        titleGlow 3s ease-in-out infinite alternate;
    overflow: hidden;
    position: relative;
    pointer-events: none;
}

.character-info {
    display: flex;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.character-name {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: var(--my-font);
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.character-status {
    color: var(--accent-color);
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 0.5rem;
    min-height: 20px;
}

.mood-indicator {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.mood-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--border-radius-custom);
    background: var(--accent-color);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.mood-dot.active {
    opacity: 1;
    box-shadow: 0 0 10px var(--accent-color);
}

.mood-dot.pulse {
    animation: aiMoodWave 540ms ease-in-out infinite;
}

.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--primary-bgc);
}

.chat-header {
    padding: 1rem;
    background: var(--secondary-bgc);
    border-bottom: var(--border-thin);
    position: relative;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--gradient-bgc);
}

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

.message {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    animation: slideIn 0.3s ease-out;
    opacity: 0;
    transform: translateY(20px);
}

.message.show {
    opacity: 1;
    transform: translateY(0);
}

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

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-rounded);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--accent-color);
}

.message.user .message-avatar {
    background: var(--content-bgc);
    border: var(--border-thin);
}

.message.ai .message-avatar {
    background: var(--accent-overlay);
    border: var(--border-thin);
    animation: aiPulse 2s ease-in-out infinite;
}

.message-content {
    max-width: 70%;
    padding: 15px 20px;
    border-radius: var(--border-radius-custom);
    position: relative;
    word-wrap: break-word;
    background: var(--content-bgc);
    border: var(--border-thin);
}

.message.ai .message-content {
    background: var(--accent-overlay);
}

.message-time {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 5px;
}

.input-container {
    padding: 20px;
    background: var(--secondary-bgc);
    border-top: var(--border-thin);
    display: flex;
    gap: 15px;
    align-items: center;
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

#userInput {
    width: 100%;
    padding: 15px 100px 15px 20px;
    border: 2px solid transparent;
    border-radius: var(--border-radius-custom);
    background: var(--content-bgc);
    box-shadow: var(--shadow);
    color: var(--text-color-default);
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

#userInput:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-overlay);
}

.voice-btn,
.emoji-btn {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    border: none;
    background: transparent;
    color: var(--text-color-default);
    cursor: pointer;
    border-radius: var(--border-radius-custom);
    transition: all 0.3s ease;
}

.emoji-btn {
    right: 10px;
}

.voice-btn:hover,
.emoji-btn:hover {
    background: var(--accent-color);
    color: var(--primary-bgc);
}

.voice-btn.active {
    background: var(--accent-color);
    color: var(--primary-bgc);
    animation: aiPulse-record 1s infinite;
}

.send-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: var(--border-radius-custom);
    background: var(--content-bgc);
    color: var(--text-color-default);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

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

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: var(--accent-overlay);
    border-radius: var(--border-radius-custom);
    max-width: fit-content;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--border-radius-custom);
    background: var(--accent-color);
    animation: aiTyping 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

.welcome-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.welcome-message h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(var(--accent-color), var(--accent-overlay));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: var(--my-font);
}

.welcome-message p {
    font-size: 0.9rem;
    opacity: 0.5;
}

.suggestions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 800px;
    margin: 1rem auto;
}

.suggestion {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
    color: var(--accent-color);
    box-shadow: var(--shadow);
    border-radius: var(--border-radius-custom);
    transition: all 0.3s ease;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    background: var(--content-bgc);
}

.suggestion-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.suggestion-title {
    font-size: 0.875rem;
    font-weight: 500;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.suggestion-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.suggestion-icon,
.suggestion-title,
.suggestion-desc {
    pointer-events: none;
}

.suggestion:hover {
    background: var(--accent-overlay);
    color: var(--text-color-default);
    transform: translateY(-2px);
    transform: translateY(-2px);
}

.emoji-picker {
    position: absolute;
    bottom: 70px;
    right: 10px;
    background: var(--secondary-bgc);
    box-shadow: var(--shadow);
    border-radius: var(--border-radius-custom);
    padding: 10px;
    display: none;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    max-width: 100%;
    z-index: 1000;
}

.emoji-picker.show {
    display: grid;
    animation: fadeIn 0.3s ease;
}

.emoji-picker span {
    padding: 0.5rem;
    cursor: pointer;
    border-radius: var(--border-radius-custom);
    transition: all ease 0.2s;
    text-align: center;
}

.emoji-picker span:hover {
    background: var(--content-bgc);
}

@media screen and (max-width: 768px) {
    .chat-container {
        flex-direction: column;
    }

    .nav-buttons {
        justify-content: center;
    }

    .character-panel {
        width: 100%;
        height: 120px;
        flex-direction: row;
        border-right: none;
        display: none;
    }

    .character-avatar {
        display: none;
    }

    .character-info {
        flex: 1;
        text-align: center;
        justify-content: center;
    }

    .chat-panel {
        height: calc(100vh - 120px);
    }
}

.typing-indicator-text {
    font-size: 12px;
    opacity: 0.7;
}

.message-actions {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.message:hover .message-actions {
    opacity: 1;
}

.message-action {
    background: none;
    border: none;
    color: var(--text-color-default);
    opacity: 0.6;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--border-radius-custom);
    font-size: 12px;
    transition: all 0.2s ease;
}

.message-action:hover {
    opacity: 1;
    background: var(--accent-color);
    color: var(--primary-bgc);
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: var(--primary-bgc);
    padding: 12px 20px;
    border-radius: var(--border-radius-custom);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    max-width: 300px;
}