/* MRA Intelligence Hub - Final Branded Design */

:root {
  --color-primary: #0A66C2;
  --color-primary-hover: #0057A0;
  --color-accent-light: #EAF3FF;
  --color-text-main: #0D1117;
  --color-text-muted: #4F6B8A;
  --color-border: #D0D7DE;
  --color-bg: #F9FBFD;
  
  --radius-small: 8px;
  --radius-medium: 12px;
  --radius-large: 20px;
  
  --shadow-light: 0 1px 4px rgba(0,0,0,0.04);
  --shadow-medium: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-card: 0 2px 10px rgba(0,0,0,0.08);
  
  --font-serif: 'Merriweather', serif;
  --font-sans: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text-main);
    height: 100vh;
    overflow: hidden;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 24px;
    background: #ffffff;
    box-shadow: var(--shadow-medium);
}

.navbar-left {
    display: flex;
    align-items: center;
}

.logo {
    height: 102px;
    width: auto;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.navbar-tagline {
    font-size: 1.05rem;
    font-style: italic;
    font-weight: 400;
    color: var(--color-text-muted);
    margin: 0;
    white-space: nowrap;
}

.new-conversation-btn {
    padding: 10px 20px;
    background: var(--color-primary);
    border: none;
    color: white;
    border-radius: var(--radius-small);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    white-space: nowrap;
}

.new-conversation-btn:hover {
    background: var(--color-primary-hover);
}

/* Chat Container */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
    max-width: 1200px;
    margin: 0 auto;
}

/* Chat Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Hero Card */
.hero-card {
    background: #ffffff;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-card);
    padding: 40px;
    max-width: 700px;
    margin: 50px auto;
    text-align: center;
}

.hero-card h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 8px;
}

.hero-subtext {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: 24px;
}

/* Topic Bubbles */
.prompt-chips {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.topic-bubble {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);
    padding: 10px 20px;
    font-size: 14px;
    color: var(--color-text-main);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-light);
}

.topic-bubble:hover {
    background: var(--color-accent-light);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Message Bubbles */
.message {
    display: flex;
    gap: 12px;
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}

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

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    background: var(--color-accent-light);
    color: var(--color-primary);
    border: 1px solid var(--color-border);
}

.message.user .message-avatar {
    background: var(--color-primary);
    color: white;
    border: none;
}

.message-content {
    background: #fcfefe;
    border: 1px solid #e6edf3;
    padding: 14px 18px;
    border-radius: 10px;
    line-height: 1.6;
    color: var(--color-text-main);
    box-shadow: var(--shadow-light);
}

.message.user .message-content {
    background: white;
    border: 1px solid var(--color-border);
}

.message.assistant .message-content {
    border-left: 4px solid var(--color-primary);
}

/* Thinking Indicator */
.thinking {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
}

.thinking-dot {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite;
}

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

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* Chat Input */
.chat-input-container {
    border-top: 1px solid var(--color-border);
    padding: 12px 24px;
    background: white;
}

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

.chat-input {
    flex: 1;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-medium);
    padding: 12px 16px;
    font-size: 15px;
    font-family: var(--font-sans);
    resize: none;
    max-height: 150px;
    transition: border-color 0.2s;
    background: white;
}

.chat-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.send-btn {
    width: 44px;
    height: 44px;
    background: var(--color-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.send-btn:not(:disabled):hover {
    background: var(--color-primary-hover);
    transform: scale(1.05);
}

.send-icon {
    font-size: 18px;
}

.input-hint {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 8px;
    text-align: center;
}

/* Message Actions (Feedback Buttons) */
.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.action-btn-small {
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    background: white;
    border-radius: var(--radius-small);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn-small:hover {
    background: var(--color-accent-light);
    border-color: var(--color-primary);
}

.action-btn-small:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Feedback Modal */
.feedback-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.feedback-modal {
    background: white;
    border-radius: var(--radius-medium);
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
}

.feedback-modal h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: var(--color-text-main);
    font-family: var(--font-serif);
}

.feedback-modal textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-small);
    font-family: var(--font-sans);
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.feedback-modal textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.feedback-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.feedback-modal-buttons button {
    padding: 10px 20px;
    border-radius: var(--radius-small);
    font-size: 14px;
    cursor: pointer;
    border: none;
    font-weight: 500;
}

.feedback-modal .submit-feedback {
    background: var(--color-primary);
    color: white;
}

.feedback-modal .submit-feedback:hover {
    background: var(--color-primary-hover);
}

.feedback-modal .cancel-feedback {
    background: #f0f0f0;
    color: var(--color-text-main);
}

.feedback-modal .cancel-feedback:hover {
    background: #e0e0e0;
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

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

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 16px;
    }
    
    .logo {
        height: 80px;
    }
    
    .navbar-tagline {
        display: none;
    }
    
    .hero-card {
        padding: 24px;
        margin: 20px auto;
    }
    
    .hero-card h2 {
        font-size: 1.5rem;
    }
}
