:root{
	--bg:#f3f6fc;
	--panel:#ffffff;
	--panel-2:#f7f9fc;
	--text:#0b1020;
	--muted:#5b6786;
	--primary:#3b82f6;
	--primary-2:#8b5cf6;
	--accent:#0ea5e9;
	--border:#e6e9f2;
	--shadow:0 6px 18px rgba(16,24,40,.08);
}

html, body { 
	height: 100%; 
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Mobile Typography and Touch Improvements */
@media (max-width: 768px) {
	body {
		font-size: 18px;
		line-height: 1.6;
	}
	
	h1, h2, h3, h4, h5, h6 {
		line-height: 1.3;
		margin-bottom: 0.8rem;
	}
	
	h1 { font-size: 2.2rem; }
	h2 { font-size: 1.9rem; }
	h3 { font-size: 1.6rem; }
	h4 { font-size: 1.4rem; }
	h5 { font-size: 1.2rem; }
	h6 { font-size: 1.1rem; }
	
	p {
		margin-bottom: 1rem;
		line-height: 1.7;
		font-size: 1.05rem;
	}
	
	/* Improve touch targets */
	a, button, input, select, textarea {
		min-height: 48px;
		touch-action: manipulation;
	}
	
	/* Prevent zoom on input focus */
	input[type="text"],
	input[type="email"],
	input[type="password"],
	textarea,
	select {
		font-size: 18px;
	}
	
	/* Larger text for better readability */
	small, .text-muted {
		font-size: 0.95rem;
	}
	
	/* Improve button text size */
	.btn {
		font-size: 1.05rem;
	}
	
	.btn-sm {
		font-size: 0.95rem;
	}
}

@media (max-width: 480px) {
	body {
		font-size: 17px;
		line-height: 1.6;
	}
	
	h1 { font-size: 2rem; }
	h2 { font-size: 1.7rem; }
	h3 { font-size: 1.5rem; }
	h4 { font-size: 1.3rem; }
	h5 { font-size: 1.15rem; }
	h6 { font-size: 1.05rem; }
	
	p {
		font-size: 1rem;
		line-height: 1.7;
	}
	
	/* Even larger text for very small screens */
	small, .text-muted {
		font-size: 0.9rem;
	}
	
	.btn {
		font-size: 1rem;
	}
}

a { color: var(--primary); }

/* Header */
.site-header { 
	background: #fff; 
	border-bottom: 1px solid var(--border); 
	position: sticky; 
	top: 0; 
	z-index: 10; 
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.site-header .inner { 
	max-width: 90vw; 
	margin: 0 auto; 
	display: flex; 
	align-items: center; 
	gap: 1rem; 
	padding: 1rem; 
}
.logo { 
	font-family: 'Orbitron', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; 
	font-weight: 800; 
	letter-spacing: .04em; 
	text-transform: lowercase; 
	color: var(--text); 
	font-size: 1.4rem; 
	text-decoration: none; 
	transition: color 0.2s ease;
}
.logo:hover { color: var(--primary); }
.logo .dot { 
	color: var(--accent); 
	font-size: 1.25em; 
	line-height: 1; 
	display: inline-block; 
	transform: translateY(1px); 
}
.header-right { 
	margin-left: auto; 
	display: flex; 
	align-items: center; 
	gap: .75rem; 
	color: var(--text); 
	flex-wrap: wrap;
}
.header-sep { 
	opacity: .4; 
	display: none;
}
.header-right a { 
	text-decoration: none; 
	color: var(--text); 
	font-weight: 500;
}
.profile-link { 
	display: flex; 
	align-items: center; 
	gap: 0.4rem; 
	padding: 0.5rem 0.8rem; 
	border-radius: 10px; 
	transition: all 0.2s ease; 
	font-size: 0.95rem;
}
.profile-link:hover { 
	background: rgba(59, 130, 246, 0.08); 
	color: var(--primary); 
	transform: translateY(-1px);
}
.profile-icon { 
	font-size: 1.1em; 
	opacity: 0.8; 
}

/* Mobile Header Responsiveness */
@media (max-width: 768px) {
	.site-header .inner { 
		padding: 0.5rem 1rem; 
		flex-direction: column;
		gap: 0.3rem;
	}
	
	.logo { 
		font-size: 1.2rem; 
		font-weight: 800;
		text-align: center;
		order: 1;
	}
	
	.header-right { 
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 100%;
		gap: 0;
		font-size: 0.9rem;
		font-weight: 500;
		order: 2;
	}
	
	.header-sep { 
		display: none; 
	}
	
	.profile-link { 
		padding: 0.3rem 0.5rem; 
		font-size: 0.9rem;
		font-weight: 500;
		order: 2;
	}
	
	.profile-link span:not(.profile-icon) { 
		display: inline; 
	}
	
	/* Credits text */
	.header-right span {
		font-size: 0.9rem;
		font-weight: 500;
		order: 1;
	}
}

@media (max-width: 480px) {
	.site-header .inner { 
		padding: 0.4rem 0.8rem; 
		gap: 0.25rem;
	}
	
	.logo { 
		font-size: 1.1rem; 
		font-weight: 800;
	}
	
	.header-right { 
		font-size: 0.85rem;
		font-weight: 500;
	}
	
	.profile-link {
		font-size: 0.85rem;
		padding: 0.25rem 0.4rem;
	}
	
	.header-right span {
		font-size: 0.85rem;
		font-weight: 500;
	}
}

/* Footer */
.site-footer { 
	margin-top: auto; 
	border-top: 1px solid var(--border); 
	background: #fff; 
	box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}
.site-footer .inner { 
	max-width: 90vw; 
	margin: 0 auto; 
	padding: 1rem; 
	display: flex; 
	align-items: center; 
	gap: .75rem; 
	color: var(--muted); 
	font-size: 0.9rem;
	font-weight: 500;
}
.site-footer a { 
	color: inherit; 
	text-decoration: none; 
	font-weight: 500;
	transition: color 0.2s ease;
}
.site-footer a:hover {
	color: var(--primary);
}
/* Ensure danger links in footer stay red */
.site-footer a.text-danger { 
	color: #dc2626; 
	font-weight: 500;
}
.site-footer a.text-danger:hover { 
	color: #b91c1c; 
}
.flex-spacer { 
	margin-left: auto; 
}

/* Mobile Footer Responsiveness */
@media (max-width: 768px) {
	.site-footer .inner {
		padding: 0.8rem 1rem;
		font-size: 0.95rem;
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
		text-align: center;
	}
	
	/* Buttons row - first row */
	.site-footer .inner > button,
	.site-footer .inner > a {
		font-size: 0.95rem;
		font-weight: 500;
		padding: 0.4rem 0.8rem;
		border-radius: 6px;
		transition: all 0.2s ease;
		text-align: center;
		display: inline-block;
		order: 1;
	}
	
	/* Button goes left */
	.site-footer .inner > button {
		float: left;
		width: 48%;
	}
	
	/* Link goes right */
	.site-footer .inner > a {
		float: right;
		width: 48%;
	}
	
	.site-footer .inner > button:hover,
	.site-footer .inner > a:hover {
		background: rgba(59, 130, 246, 0.08);
		color: var(--primary);
	}
	
	/* Copyright centered at bottom */
	.site-footer .inner > small {
		order: 2;
		clear: both;
		margin-top: 0.5rem;
		width: 100%;
		text-align: center;
		font-size: 0.9rem;
		color: var(--muted);
	}
	
	/* Hide flex-spacer on mobile */
	.flex-spacer {
		display: none;
	}
}

@media (max-width: 480px) {
	.site-footer .inner {
		padding: 0.7rem 0.8rem;
		font-size: 0.9rem;
		gap: 0.4rem;
	}
	
	.site-footer a {
		font-size: 0.9rem;
		font-weight: 500;
		padding: 0.35rem 0.6rem;
	}
	
	.flex-spacer {
		font-size: 0.85rem;
	}
}

/* Containers and cards */
.container { 
	max-width: 85vw; 
	margin: 0 auto; 
	padding: 0 1rem;
}
.card { 
	background: var(--panel); 
	border-radius: 16px; 
	box-shadow: var(--shadow); 
	border: 1px solid var(--border); 
	color: var(--text); 
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
	box-shadow: 0 8px 25px rgba(16, 24, 40, 0.12);
	transform: translateY(-2px);
}

/* Mobile Container Responsiveness */
@media (max-width: 768px) {
	.container { 
		max-width: 95vw; 
		padding: 0 0.8rem;
	}
	.card { 
		border-radius: 12px; 
		margin-bottom: 1rem;
	}
	
	/* Header improvements for mobile */
	.header {
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
	}
	
	.header h2 {
		font-size: 1.6rem;
		text-align: center;
		margin-bottom: 0.5rem;
	}
	
	.header .btn-new {
		width: 100%;
		justify-content: center;
	}
	
	/* Load more button improvements */
	.text-center .btn {
		width: 100%;
		max-width: 200px;
		margin: 0 auto;
	}
}

@media (max-width: 480px) {
	.container { 
		max-width: 100vw; 
		padding: 0 0.5rem;
	}
	.card { 
		border-radius: 10px; 
		margin-bottom: 0.8rem;
	}
}
.question-preview { 
    color: var(--text); 
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    overflow-wrap: break-word;
    line-height: 1.5;
}
.question-preview small { 
    color: var(--muted); 
    font-size: 0.95em;
}

/* Mobile question preview improvements */
@media (max-width: 768px) {
    .question-preview {
        font-size: 1.05rem;
        line-height: 1.6;
    }
    
    .question-preview small {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .question-preview {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .question-preview small {
        font-size: 0.85rem;
    }
}
.nowrap { white-space: nowrap; }
.timestamp-display {
    line-height: 1.3;
    font-size: 0.95em;
}
.timestamp-display div:first-child {
    font-weight: 600;
    color: var(--text);
    font-size: 1em;
}
.timestamp-display div:last-child {
    color: var(--muted);
    font-size: 0.9em;
}

/* Mobile timestamp improvements */
@media (max-width: 768px) {
    .timestamp-display {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .timestamp-display div:first-child {
        font-size: 1.05em;
        font-weight: 700;
    }
    
    .timestamp-display div:last-child {
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    .timestamp-display {
        font-size: 0.95rem;
        line-height: 1.3;
    }
    
    .timestamp-display div:first-child {
        font-size: 1em;
    }
    
    .timestamp-display div:last-child {
        font-size: 0.9em;
    }
}

/* Titles and text */
.title-strong { font-weight: 800; color: var(--text); }
.text-error-strong { color: #b91c1c; font-weight: 700; }

/* Width utilities */
.w-80 { width: 5rem; }
.w-120 { width: 7.5rem; }
.w-150 { width: 9.375rem; }
.w-200 { width: 12.5rem; }
.w-question { width: auto; min-width: 18.75rem; }

/* Max-width containers */
.maxw-460 { max-width: 28.75rem; }
.maxw-520 { max-width: 32.5rem; }

/* Admin and helper boxes */
.admin-box { background: #f8fafc; border-color: var(--border) !important; }
.center-card { max-width: 70vw; margin: 6rem auto; background: var(--panel); padding: 2rem; border-radius: 16px; box-shadow: var(--shadow); text-align: center; border: 1px solid var(--border); }

/* New conversation helpers */
.plus-btn { 
	width: 3rem; 
	height: 3rem; 
	border-radius: 0.75rem; 
	font-size: 2rem; 
	display: flex; 
	align-items: center; 
	justify-content: center; 
	background: linear-gradient(90deg, var(--primary-2), var(--primary)); 
	border: none; 
	color: #fff; 
	font-weight: 800; 
	box-shadow: var(--shadow); 
	transition: all 0.2s ease;
	cursor: pointer;
}
.plus-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(59,130,246,.35);
}
.profile-img-40 { 
	width: 2.5rem; 
	height: 2.5rem; 
	margin-right: 0.5rem; 
	border-radius: 50%;
	object-fit: cover;
}
.profile-selectable { 
	cursor: pointer; 
	transition: all 0.2s ease;
	border-radius: 8px;
}
.profile-selectable:hover {
	background: rgba(59, 130, 246, 0.05);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.selected-profile { 
	display: flex; 
	align-items: center; 
	background: var(--panel); 
	border: 1px solid var(--border); 
	border-radius: 20px; 
	padding: 2px 8px 2px 2px; 
	margin-bottom: .5rem; 
	box-shadow: var(--shadow); 
	color: var(--text); 
	transition: all 0.2s ease;
}
.selected-profile:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.tight-line { 
	line-height: 1; 
}

/* Mobile New Conversation Responsiveness */
@media (max-width: 768px) {
	.plus-btn {
		width: 3.5rem;
		height: 3.5rem;
		font-size: 2.2rem;
		border-radius: 1rem;
	}
	
	.profile-img-40 {
		width: 2.2rem;
		height: 2.2rem;
		margin-right: 0.4rem;
	}
	
	.selected-profile {
		padding: 4px 10px 4px 4px;
		margin-bottom: 0.4rem;
		border-radius: 16px;
	}
	
	.profile-selectable {
		padding: 0.8rem;
		margin-bottom: 0.5rem;
	}
}

@media (max-width: 480px) {
	.plus-btn {
		width: 3rem;
		height: 3rem;
		font-size: 2rem;
	}
	
	.profile-img-40 {
		width: 2rem;
		height: 2rem;
		margin-right: 0.3rem;
	}
	
	.selected-profile {
		padding: 3px 8px 3px 3px;
		margin-bottom: 0.3rem;
		border-radius: 12px;
		font-size: 0.9rem;
	}
}

/* Buttons */
.btn-new { 
	border-radius: 12px; 
	background: linear-gradient(90deg, var(--primary-2), var(--primary)); 
	border: none; 
	color: #fff; 
	font-weight: 700; 
	box-shadow: 0 6px 18px rgba(59,130,246,.25); 
	padding: 0.75rem 1.5rem;
	font-size: 1rem;
	transition: all 0.2s ease;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.btn-new:hover { 
	background: linear-gradient(90deg, #2d4dd4, #2563eb); 
	transform: translateY(-1px);
	box-shadow: 0 8px 25px rgba(59,130,246,.35);
}
.btn-outline-primary { 
	border-radius: 10px; 
	border-color: var(--primary); 
	color: var(--primary); 
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
	min-height: 40px;
	transition: all 0.2s ease;
}
.btn-outline-primary:hover { 
	background: var(--primary); 
	color: white;
	border-color: var(--primary);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.btn-outline-secondary { 
	border-radius: 10px; 
	border-color: var(--accent); 
	color: var(--accent); 
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
	min-height: 40px;
	transition: all 0.2s ease;
}
.btn-outline-secondary:hover { 
	background: var(--accent); 
	color: white;
	border-color: var(--accent);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* Mobile Button Responsiveness */
@media (max-width: 768px) {
	.btn-new {
		padding: 0.9rem 1.3rem;
		font-size: 1.1rem;
		min-height: 52px;
		width: 100%;
		margin-bottom: 0.5rem;
		font-weight: 700;
	}
	
	.btn-outline-primary,
	.btn-outline-secondary {
		padding: 0.7rem 1.1rem;
		font-size: 1rem;
		min-height: 48px;
		margin: 0.25rem;
		font-weight: 600;
	}
	
	.btn-sm {
		padding: 0.5rem 0.9rem;
		font-size: 0.95rem;
		min-height: 40px;
		font-weight: 600;
	}
}

@media (max-width: 480px) {
	.btn-new {
		padding: 0.8rem 1.1rem;
		font-size: 1.05rem;
		min-height: 50px;
	}
	
	.btn-outline-primary,
	.btn-outline-secondary {
		padding: 0.6rem 1rem;
		font-size: 0.95rem;
		min-height: 46px;
	}
	
	.btn-sm {
		padding: 0.45rem 0.8rem;
		font-size: 0.9rem;
		min-height: 38px;
	}
}

/* Conversation page */
.conv-container { 
	max-width: 80vw; 
	margin: 2rem auto; 
	background: var(--panel); 
	padding: 2rem 1rem 1rem 1rem; 
	border-radius: 18px; 
	box-shadow: var(--shadow); 
	border: 1px solid var(--border); 
}
.question { 
	font-weight: bold; 
	margin-bottom: 1rem; 
	font-size: 1.1em; 
	color: var(--text); 
	line-height: 1.4;
}
.meta { 
	color: var(--muted); 
	font-size: 0.95em; 
	margin-bottom: 1.2rem; 
}
.chat-area { 
	display: flex; 
	flex-direction: column; 
	gap: 0.7rem; 
	margin-top: 2rem; 
}
.bubble-row { 
	display: flex; 
	align-items: flex-end; 
	margin-bottom: 1rem;
}
.bubble-row.left { 
	justify-content: flex-start; 
}
.bubble-row.right { 
	justify-content: flex-end; 
}
.profile-img { 
	width: 2.75rem; 
	height: 2.75rem; 
	border-radius: 50%; 
	object-fit: cover; 
	margin: 0 0.7rem; 
	border: 2px solid var(--border); 
	background: #f2f4fa; 
	flex-shrink: 0;
}
.bubble { 
	max-width: 90%; 
	padding: 0.9em 1.2em; 
	border-radius: 18px; 
	background: var(--panel-2); 
	color: var(--text); 
	position: relative; 
	font-size: 1.05em; 
	box-shadow: 0 1px 6px rgba(16,24,40,.08); 
	word-break: break-word; 
	border: 1px solid var(--border); 
	line-height: 1.4;
}
.bubble-row.right .bubble { 
	background: #e9f7ff; 
}
.bubble .who { 
	font-weight: 700; 
	color: #1d4ed8; 
	margin-bottom: 0.2em; 
	display: block; 
}
.bubble-row.right .bubble .who { 
	color: #0f766e; 
}
.bubble .turn { 
	color: #6b7280; 
	font-size: 0.9em; 
	float: right; 
	font-weight: normal; 
}
.bubble .timestamp { 
	display: block; 
	color: #6b7280; 
	font-size: 0.85em; 
	margin-top: 0.5em; 
	text-align: right; 
}

/* Mobile Conversation Responsiveness */
@media (max-width: 768px) {
	.conv-container {
		max-width: 95vw;
		margin: 1rem auto;
		padding: 1.5rem 0.8rem 1rem 0.8rem;
		border-radius: 12px;
	}
	
	.question {
		font-size: 1.2em;
		line-height: 1.4;
		font-weight: 700;
	}
	
	.meta {
		font-size: 1em;
	}
	
	.chat-area {
		margin-top: 1.5rem;
		gap: 0.5rem;
	}
	
	.bubble-row {
		margin-bottom: 0.8rem;
	}
	
	.profile-img {
		width: 2.5rem;
		height: 2.5rem;
		margin: 0 0.5rem;
	}
	
	.bubble {
		max-width: 85%;
		padding: 1em 1.2em;
		font-size: 1.1em;
		border-radius: 15px;
		line-height: 1.5;
	}
	
	.bubble .who {
		font-size: 1.05em;
		margin-bottom: 0.3em;
	}
	
	.bubble .timestamp {
		font-size: 0.9em;
		margin-top: 0.6em;
	}
}

@media (max-width: 480px) {
	.conv-container {
		max-width: 100vw;
		margin: 0.5rem auto;
		padding: 1rem 0.5rem;
		border-radius: 0;
	}
	
	.question {
		font-size: 1.15em;
		line-height: 1.3;
		font-weight: 700;
	}
	
	.meta {
		font-size: 0.95em;
	}
	
	.profile-img {
		width: 2.25rem;
		height: 2.25rem;
		margin: 0 0.4rem;
	}
	
	.bubble {
		max-width: 80%;
		padding: 0.9em 1.1em;
		font-size: 1.05em;
		border-radius: 12px;
		line-height: 1.5;
	}
	
	.bubble .who {
		font-size: 1em;
	}
	
	.bubble .timestamp {
		font-size: 0.85em;
	}
}

/* Mobile Table Responsiveness */
@media (max-width: 768px) {
	.table-responsive {
		border-radius: 0;
		overflow: visible;
	}
	
	.table thead {
		display: none;
	}
	
	.table tbody tr {
		display: block;
		margin-bottom: 1.2rem;
		padding: 1.2rem;
		background: var(--panel);
		border-radius: 16px;
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
		border: 1px solid var(--border);
		transition: all 0.2s ease;
	}
	
	.table tbody tr:hover {
		box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
		transform: translateY(-1px);
	}
	
	.table tbody td {
		display: block;
		text-align: left !important;
		border: none;
		padding: 0.6rem 0;
	}
	
	.table tbody td:first-child {
		padding-top: 0;
	}
	
	.table tbody td:before {
		content: attr(data-label) ": ";
		font-weight: 700;
		color: var(--muted);
		display: block;
		margin-bottom: 0.4rem;
		font-size: 0.9rem;
		text-transform: uppercase;
		letter-spacing: 0.5px;
	}
	
	.table tbody td:last-child {
		text-align: center !important;
		padding: 1.2rem 0 0 0;
		border-top: 2px solid var(--border);
		margin-top: 0.8rem;
		background: rgba(59, 130, 246, 0.02);
		border-radius: 0 0 12px 12px;
		margin-left: -1.2rem;
		margin-right: -1.2rem;
		margin-bottom: -1.2rem;
		padding-left: 1.2rem;
		padding-right: 1.2rem;
		padding-bottom: 1.2rem;
	}
	
	.table tbody td:last-child:before {
		display: none;
	}
	
	/* Button improvements for mobile */
	.table tbody td:last-child .btn {
		margin: 0.2rem;
		min-width: 80px;
		font-weight: 600;
	}
	
	.w-question, .w-150, .w-120 {
		width: auto !important;
	}
	
	/* Question preview improvements */
	.table tbody td:first-child .question-preview {
		font-size: 1.1rem;
		line-height: 1.6;
		font-weight: 500;
		color: var(--text);
	}
	
	/* Timestamp improvements */
	.table tbody td .timestamp-display {
		font-size: 1rem;
	}
	
	.table tbody td .timestamp-display div:first-child {
		font-weight: 700;
		font-size: 1.05em;
	}
	
	.table tbody td .timestamp-display div:last-child {
		font-size: 0.95em;
		color: var(--muted);
	}
}

/* Additional mobile improvements for very small screens */
@media (max-width: 480px) {
	.table tbody tr {
		margin-bottom: 1rem;
		padding: 1rem;
		border-radius: 12px;
	}
	
	.table tbody td {
		padding: 0.5rem 0;
	}
	
	.table tbody td:last-child {
		padding: 1rem 0 0 0;
		margin-top: 0.6rem;
		margin-left: -1rem;
		margin-right: -1rem;
		margin-bottom: -1rem;
		padding-left: 1rem;
		padding-right: 1rem;
		padding-bottom: 1rem;
		border-radius: 0 0 8px 8px;
	}
	
	.table tbody td:before {
		font-size: 0.85rem;
		margin-bottom: 0.3rem;
	}
	
	.table tbody td:first-child .question-preview {
		font-size: 1.05rem;
		line-height: 1.5;
	}
	
	.table tbody td:last-child .btn {
		margin: 0.15rem;
		min-width: 70px;
		font-size: 0.9rem;
		padding: 0.6rem 0.8rem;
	}
	
	.table tbody td .timestamp-display {
		font-size: 0.95rem;
	}
}

@media (max-width: 1000px) {
	.conv-container { max-width: 100vw; border-radius: 0; padding: 1rem .4rem; }
	.bubble { max-width: 95vw; }
}

/* Loading page */
.loader { width: 3.5rem; height: 3.5rem; border-radius: 50%; border: 0.375rem solid #e2e8f0; border-top-color: var(--accent); animation: spin 1s linear infinite; margin-bottom: 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Report Issues Button */
.btn-report-issue {
	background: var(--panel-2);
	color: var(--muted);
	border: 1px solid var(--border);
	padding: 0.5rem 1rem;
	border-radius: 8px;
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	margin-right: 1rem;
}

.btn-report-issue:hover {
	background: var(--primary);
	color: white;
	border-color: var(--primary);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Modal Styles */
.modal-backdrop {
	background-color: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
}

.modal-content {
	background-color: var(--panel);
	margin: 5% auto;
	padding: 0;
	border-radius: 16px;
	width: 85%;
	max-width: 85vw;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
	border: 1px solid var(--border);
	animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
	from {
		opacity: 0;
		transform: translateY(-20px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.5rem 2rem 1rem 2rem;
	border-bottom: 1px solid var(--border);
}

.modal-header h3 {
	margin: 0;
	color: var(--text);
	font-size: 1.3rem;
	font-weight: 700;
}

.close {
	color: var(--muted);
	font-size: 2rem;
	font-weight: bold;
	cursor: pointer;
	line-height: 1;
	transition: color 0.2s ease;
}

.close:hover {
	color: var(--text);
}

.modal-body {
	padding: 2rem;
}

/* Form Styles */
.form-group {
	margin-bottom: 1.5rem;
}

.form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: var(--text);
	font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
	width: 100%;
	padding: 0.75rem;
	border: 2px solid var(--border);
	border-radius: 8px;
	font-size: 1rem;
	font-family: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	background: var(--panel);
	color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
	resize: vertical;
	min-height: 6.25rem;
}

.form-actions {
	display: flex;
	gap: 1rem;
	justify-content: flex-end;
	margin-top: 2rem;
}

.btn-cancel {
	background: transparent;
	color: var(--muted);
	border: 2px solid var(--border);
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-cancel:hover {
	background: var(--panel-2);
	color: var(--text);
	border-color: var(--muted);
}

.btn-submit {
	background: linear-gradient(90deg, var(--primary-2), var(--primary));
	color: white;
	border: none;
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-submit:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

/* Thank you modal specific styles */
#thankYouModal .modal-body {
	text-align: center;
}

#thankYouModal .modal-body p {
	font-size: 1.1rem;
	color: var(--text);
	margin-bottom: 2rem;
	line-height: 1.6;
}

/* Mobile Modal Responsiveness */
@media (max-width: 768px) {
	.modal-content {
		margin: 5% auto;
		width: 95%;
		max-width: 95vw;
		border-radius: 12px;
	}
	
	.modal-header {
		padding: 1.2rem 1.5rem 0.8rem 1.5rem;
	}
	
	.modal-header h3 {
		font-size: 1.4rem;
		font-weight: 700;
	}
	
	.modal-body {
		padding: 1.5rem;
		font-size: 1.05rem;
	}
	
	.form-actions {
		flex-direction: column;
		gap: 0.8rem;
	}
	
	.btn-cancel,
	.btn-submit {
		width: 100%;
		padding: 0.9rem 1.5rem;
		font-size: 1.1rem;
		min-height: 52px;
		font-weight: 600;
	}
}

@media (max-width: 480px) {
	.modal-content {
		margin: 2% auto;
		width: 98%;
		max-width: 98vw;
		border-radius: 8px;
	}
	
	.modal-header {
		padding: 1rem 1.2rem 0.6rem 1.2rem;
	}
	
	.modal-header h3 {
		font-size: 1.3rem;
		font-weight: 700;
	}
	
	.modal-body {
		padding: 1.2rem;
		font-size: 1rem;
	}
	
	.form-group {
		margin-bottom: 1.2rem;
	}
	
	.form-group label {
		font-size: 1rem;
		font-weight: 600;
	}
	
	.form-group input,
	.form-group textarea {
		padding: 0.9rem;
		font-size: 1.05rem;
		min-height: 50px;
	}
	
	.btn-cancel,
	.btn-submit {
		padding: 0.8rem 1.2rem;
		font-size: 1.05rem;
		min-height: 50px;
		font-weight: 600;
	}
}

/* Additional Mobile Utilities */
.mobile-only {
	display: none;
}

.desktop-only {
	display: block;
}

@media (max-width: 768px) {
	.mobile-only {
		display: block;
	}
	
	.desktop-only {
		display: none;
	}
	
	/* Improve spacing for mobile */
	.mb-mobile-3 {
		margin-bottom: 1rem;
	}
	
	.p-mobile-2 {
		padding: 0.8rem;
	}
	
	/* Mobile-friendly text alignment */
	.text-mobile-center {
		text-align: center;
	}
	
	/* Mobile-friendly flex utilities */
	.flex-mobile-column {
		flex-direction: column;
	}
	
	.flex-mobile-center {
		justify-content: center;
		align-items: center;
	}
	
	/* Mobile-friendly gaps */
	.gap-mobile-2 {
		gap: 0.8rem;
	}
	
	.gap-mobile-1 {
		gap: 0.5rem;
	}
}

/* Mobile-specific improvements for better UX */
@media (max-width: 768px) {
	/* Smooth scrolling */
	html {
		scroll-behavior: smooth;
	}
	
	/* Better focus states for mobile */
	*:focus {
		outline: 2px solid var(--primary);
		outline-offset: 2px;
	}
	
	/* Improve button press feedback */
	button:active {
		transform: scale(0.98);
	}
	
	/* Better link spacing for touch */
	a {
		padding: 0.2rem 0;
		display: inline-block;
	}
	
	/* Improve form field spacing */
	.form-control {
		margin-bottom: 1rem;
	}
	
	/* Better card spacing on mobile */
	.card {
		margin-bottom: 1rem;
	}
	
	/* Improve table responsiveness further */
	.table-responsive {
		-webkit-overflow-scrolling: touch;
	}
}

/* Dark mode support for mobile (if needed in future) */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
	:root {
		--bg: #0f172a;
		--panel: #1e293b;
		--panel-2: #334155;
		--text: #f1f5f9;
		--muted: #94a3b8;
		--border: #334155;
	}
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.btn-new,
	.btn-outline-primary,
	.btn-outline-secondary {
		border-width: 2px;
	}
	
	.card {
		border-width: 2px;
	}
}

/* Additional Button Hover Effects */
.btn-primary:hover {
	background: #2563eb;
	border-color: #2563eb;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-success:hover {
	background: #16a34a;
	border-color: #16a34a;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn-danger:hover {
	background: #dc2626;
	border-color: #dc2626;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-warning:hover {
	background: #d97706;
	border-color: #d97706;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.btn-info:hover {
	background: #0891b2;
	border-color: #0891b2;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.btn-dark:hover {
	background: #374151;
	border-color: #374151;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(55, 65, 81, 0.3);
}

.btn-light:hover {
	background: #e5e7eb;
	border-color: #e5e7eb;
	color: var(--text);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(229, 231, 235, 0.3);
}

.btn-outline-dark:hover {
	background: var(--text);
	color: white;
	border-color: var(--text);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(11, 16, 32, 0.3);
}

.btn-outline-success:hover {
	background: #16a34a;
	color: white;
	border-color: #16a34a;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn-outline-danger:hover {
	background: #dc2626;
	color: white;
	border-color: #dc2626;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-outline-warning:hover {
	background: #d97706;
	color: white;
	border-color: #d97706;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.btn-outline-info:hover {
	background: #0891b2;
	color: white;
	border-color: #0891b2;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.btn-outline-light:hover {
	background: #f9fafb;
	color: var(--text);
	border-color: #f3f4f6;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(249, 250, 251, 0.3);
}

/* Plus button hover enhancement */
.plus-btn:hover {
	background: linear-gradient(90deg, #7c3aed, #5b21b6);
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
	
	.plus-btn:hover,
	.btn-new:hover,
	.btn-outline-primary:hover,
	.btn-outline-secondary:hover,
	.btn-primary:hover,
	.btn-success:hover,
	.btn-danger:hover,
	.btn-warning:hover,
	.btn-info:hover,
	.btn-dark:hover,
	.btn-light:hover,
	.btn-outline-dark:hover,
	.btn-outline-success:hover,
	.btn-outline-danger:hover,
	.btn-outline-warning:hover,
	.btn-outline-info:hover,
	.btn-outline-light:hover {
		transform: none;
	}
}

/* Custom button styles for new conversation page */
#sendQuestionBtn.btn-disabled-custom {
	background-color: #6c757d;
	border-color: #6c757d;
	color: #fff;
	opacity: 0.6;
	cursor: not-allowed;
	transform: scale(0.95);
	box-shadow: none;
}

#sendQuestionBtn.btn-enabled-custom {
	background-color: #198754;
	border-color: #198754;
	color: #fff;
	box-shadow: 0 3px 6px rgba(25, 135, 84, 0.4);
	transform: scale(1);
	transition: all 0.3s ease;
}

#sendQuestionBtn.btn-enabled-custom:hover {
	background-color: #157347;
	border-color: #146c43;
	box-shadow: 0 5px 10px rgba(25, 135, 84, 0.5);
	transform: scale(1.05);
}


