/* RAVIX AI Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    color: white;
    margin: 0;
    overflow: hidden;
    height: 100vh;
}

.app-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: transparent;
}

/* Header */
.ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(10, 10, 10, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff99;
    box-shadow: 0 0 8px #00ff99;
    transition: 0.3s;
}

.status-dot.thinking {
    background: #ffbd2e;
    box-shadow: 0 0 8px #ffbd2e;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.ai-actions button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
}

.ai-actions button:hover {
    color: #ff5f56;
    transform: scale(1.1);
}

/* Chat Container */
.chat-container {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Scrollbar inherited from OS but refined */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: #00ff99;
    border-radius: 4px;
}

/* Messages */
.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}

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

.message.user-message {
    align-self: flex-end;
}

.message.ai-message {
    align-self: flex-start;
}

.message-content {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.user-message .message-content {
    background: rgba(0, 255, 153, 0.15);
    border: 1px solid rgba(0, 255, 153, 0.3);
    border-bottom-right-radius: 4px;
    color: #e0e0e0;
}

.ai-message .message-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 4px;
    color: #fff;
}

/* Markdown Styles inside AI Message */
.ai-message .message-content p {
    margin-bottom: 10px;
}
.ai-message .message-content p:last-child {
    margin-bottom: 0;
}
.ai-message .message-content a {
    color: #00bfff;
    text-decoration: none;
}
.ai-message .message-content a:hover {
    text-decoration: underline;
}

/* Code Blocks */
.code-block-wrapper {
    position: relative;
    margin: 10px 0;
    border-radius: 8px;
    background: #1e1e1e;
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: rgba(0,0,0,0.4);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.copy-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #00ff99;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: 0.2s;
}

.copy-btn:hover {
    background: rgba(0, 255, 153, 0.1);
    border-color: #00ff99;
}

.code-block-wrapper pre {
    margin: 0;
    padding: 12px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #d4d4d4;
}

/* Input Area */
.input-area {
    display: flex;
    padding: 15px;
    background: rgba(10, 10, 10, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    gap: 10px;
}

#promptInput {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: 0.3s;
}

#promptInput:focus {
    border-color: #00ff99;
    background: rgba(0, 255, 153, 0.05);
}

#sendBtn {
    background: #00ff99;
    border: none;
    width: 45px;
    border-radius: 8px;
    color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.3s;
}

#sendBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 153, 0.4);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 15px;
    align-items: center;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #00ff99;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

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

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Quick Actions */
.quick-actions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.quick-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s ease;
}

.quick-action-btn:hover {
    background: rgba(0, 255, 153, 0.15);
    border-color: #00ff99;
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 16px;
}

.btn-shortcut {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'JetBrains Mono', monospace;
}

/* Persistent Navigation */
.persistent-nav-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.nav-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 6px 12px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    transition: 0.2s ease;
}

.nav-btn:hover {
    color: #fff;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}
