/* Minimal Design - White + Google Blue */
:root {
    --google-blue: #4285F4;
    --google-blue-hover: #3367D6;
    --white: #FFFFFF;
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-900: #212121;
    --green: #34A853;
    --green-50: #E8F5E9;
    --green-500: #4CAF50;
    --green-600: #43A047;
    --green-700: #388E3C;
    --red: #EA4335;
    --red-50: #FFEBEE;
    --red-500: #F44336;
    --red-600: #E53935;
    --red-700: #D32F2F;
    --yellow: #FBBC04;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--white);
    color: var(--gray-900);
    line-height: 1.6;
}

/* Screens */
.screen {
    display: none;
}

.screen.active {
    display: flex;
}

/* Login */
#login-screen {
    height: 100vh;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
}

#login-screen .container {
    background: var(--white);
    padding: 48px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    min-width: 320px;
}

#login-screen h1 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 32px;
    color: var(--gray-900);
}

/* App Screen */
#app-screen {
    height: 100vh;
    flex-direction: column;
}

/* Header */
header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left h2 {
    font-size: 18px;
    font-weight: 500;
    display: inline-block;
    margin-right: 12px;
}

/* Scrollable content areas */
.scrollable-content {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding-right: 8px;
}

/* Scrollbar styling */
.scrollable-content::-webkit-scrollbar {
    width: 6px;
}

.scrollable-content::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
    background: var(--gray-700);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.username {
    color: var(--gray-700);
    font-size: 14px;
}

/* Buttons */
button {
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.primary {
    background: var(--google-blue);
    color: var(--white);
}

.primary:hover {
    background: var(--google-blue-hover);
}

.secondary {
    background: var(--gray-100);
    color: var(--gray-900);
}

.secondary:hover {
    background: var(--gray-200);
}

.icon-button {
    background: transparent;
    padding: 8px;
    font-size: 20px;
}

.icon-button:hover {
    background: var(--gray-100);
}

/* Input */
input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 16px;
}

input:focus {
    outline: none;
    border-color: var(--google-blue);
}

/* Content Area */
.content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
}

.network-tooltip {
    position: fixed;
    background: rgba(32, 33, 36, 0.92);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 1000;
    display: none;
}

.view {
    display: none;
    flex-direction: column;
    width: 100%;
}

.view.active {
    display: flex;
}

/* Chat View */
#chat-view {
    background: var(--gray-50);
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

/* Analysis progress indicator */
.analysis-progress {
    background: var(--gray-50);
    border-left: 4px solid var(--google-blue);
    animation: pulse 2s infinite;
}

/* Simulation progress indicator */
.simulation-progress {
    background: var(--gray-50);
    border-left: 4px solid var(--google-blue);
    animation: pulse 2s infinite;
}

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

.message.user {
    align-self: flex-end;
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--gray-900);
}

.message.agent, .message.system {
    align-self: flex-start;
    background: var(--white);
    border: 1px solid var(--gray-200);
}

.message.human {
    /* For future use: messages from other humans (not the current user) */
    align-self: flex-start;
    background: var(--google-blue);
    color: var(--white);
}

.message-header {
    font-size: 12px;
    color: var(--gray-700);
    margin-bottom: 4px;
    font-weight: 500;
}

.input-container {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 16px 24px;
    display: flex;
    gap: 12px;
}

.input-container input {
    margin-bottom: 0;
    flex: 1;
}

/* Feedback View */
#feedback-view {
    background: var(--white);
    padding: 24px;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.view-header h3 {
    font-size: 20px;
    font-weight: 500;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.tab {
    background: transparent;
    padding: 12px 16px;
    border-bottom: 2px solid transparent;
    font-weight: 400;
}

.tab.active {
    border-bottom-color: var(--google-blue);
    color: var(--google-blue);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.feedback-item {
    background: var(--gray-50);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.feedback-score {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
}

.feedback-score.positive { background: #E8F5E9; color: var(--green); }
.feedback-score.neutral { background: #FFF8E1; color: var(--yellow); }
.feedback-score.negative { background: #FFEBEE; color: var(--red); }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 32px;
    border-radius: 8px;
    min-width: 400px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    overflow-y: auto;
    max-height: 80vh;
}

.modal-content h3 {
    margin-bottom: 20px;
}

.feedback-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.feedback-btn {
    flex: 1;
    padding: 16px;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.feedback-btn div {
    font-weight: 600;
}

.feedback-btn small {
    font-size: 11px;
    color: #666;
}

.feedback-btn.positive:hover { background: #E8F5E9; }
.feedback-btn.negative:hover { background: #FFEBEE; }

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.modal-actions button {
    flex: 1;
}

/* Conversation List */
.conversation-item {
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.conversation-item:hover {
    background: #f8f9fa;
    border-color: var(--google-blue);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.1);
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.conversation-preview {
    color: #666;
    font-size: 14px;
}

.network-placeholder {
    display: none;
    border: 1px dashed var(--gray-300);
    border-radius: 8px;
    padding: 32px;
    background: var(--gray-50);
    margin-bottom: 16px;
}

.network-placeholder.visible {
    display: flex;
}

.network-placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    color: var(--gray-700);
    text-align: center;
}

.network-placeholder-spinner {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 4px solid rgba(66, 133, 244, 0.2);
    border-top-color: var(--primary-color);
    animation: network-placeholder-spin 1s linear infinite;
}

.network-placeholder-text {
    font-size: 14px;
    line-height: 1.5;
}

@keyframes network-placeholder-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Utility */
.loading {
    color: var(--gray-700);
    text-align: center;
    padding: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .message {
        max-width: 85%;
    }
    
    header {
        flex-wrap: wrap;
    }
}

/* Notification Center Styles */
.notification-center {
    position: relative;
    display: inline-block;
}

.notification-bell {
    cursor: pointer;
    padding: 8px;
    position: relative;
    color: var(--gray-700);
    border-radius: 50%;
    transition: background 0.2s;
}

.notification-bell:hover {
    background: var(--gray-200);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 18px;
    height: 18px;
    background: #ef4444; /* red-500 */
    color: white;
    font-size: 11px;
    font-weight: bold;
    border-radius: 9px;
    padding: 0 4px;
    border: 2px solid white;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
    border: 1px solid var(--gray-200);
    z-index: 1000;
    margin-top: 8px;
    overflow: hidden;
}

.notification-dropdown.hidden {
    display: none;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.notification-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--gray-50);
}

.notification-item:last-child {
    border-bottom: none;
}

.notif-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-content {
    flex: 1;
}

.notif-msg {
    font-size: 13px;
    color: var(--gray-800);
    margin-bottom: 4px;
    line-height: 1.4;
}

.notif-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--gray-500);
}

.empty-notifs {
    padding: 24px;
    text-align: center;
    color: var(--gray-500);
    font-size: 13px;
}

