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

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
	color: #333;
	line-height: 1.6;
	min-height: 100vh;
}

.container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 20px;
}
header {
	margin-bottom: 20px;
}

.tab:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(42,82,152,0.25);
}

h1 {
	font-size: 2.5rem;
	/* Improved contrast on dark background */
	color: #ffffff;
	text-shadow: 0 2px 8px rgba(0,0,0,0.6);
	margin-bottom: 10px;
	font-weight: 700;
}

.subtitle {
	font-size: 1.1rem;
	/* lighter subtitle for readability */
	color: rgba(255,255,255,0.9);
	margin-bottom: 30px;
}

.tabs {
	display: flex;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	margin-bottom: 30px;
	overflow: hidden;
}

.tab {
	flex: 1;
	padding: 15px 20px;
	background: transparent;
	border: none;
	color: white;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.tab.active {
	background: rgba(255, 255, 255, 0.95);
	color: #1e3c72;
}

.tab-content {
	display: none;
}

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

.input-section {
	background: rgba(255, 255, 255, 0.95);
	padding: 30px;
	border-radius: 15px;
	margin-bottom: 30px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(10px);
}

.form-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin-bottom: 20px;
}

.input-group {
	display: flex;
	flex-direction: column;
}

label {
	font-weight: 600;
	margin-bottom: 8px;
	color: #333;
	display: flex;
	align-items: center;
	gap: 5px;
}

.tooltip {
	position: relative;
	cursor: help;
	color: #2a5298;
	font-size: 0.9rem;
}

.tooltip::after {
	content: attr(data-tooltip);
	position: absolute;
	bottom: 125%;
	left: 50%;
	transform: translateX(-50%);
	background: #333;
	color: white;
	padding: 8px 12px;
	border-radius: 6px;
	font-size: 0.8rem;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s;
	z-index: 1000;
}

.tooltip:hover::after {
	opacity: 1;
}

input, textarea, select {
	padding: 12px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 1rem;
	transition: all 0.3s ease;
	background: white;
}

input:focus, textarea:focus, select:focus {
	outline: none;
	border-color: #2a5298;
	box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

textarea {
	min-height: 100px;
	resize: vertical;
}

.advanced-options {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 20px;
	margin: 20px 0;
}

.advanced-toggle {
	background: none;
	border: none;
	color: #2a5298;
	font-weight: 600;
	cursor: pointer;
	margin-bottom: 15px;
	display: flex;
	align-items: center;
	gap: 5px;
}

.advanced-content {
	display: none;
}

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

.checkbox-group {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 10px;
	margin: 15px 0;
}

.checkbox-item {
	display: flex;
	align-items: center;
	gap: 8px;
}

.checkbox-item input[type="checkbox"] {
	width: auto;
	margin: 0;
}

.button-group {
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
}

.btn {
	padding: 15px 30px;
	font-size: 1.1rem;
	font-weight: 600;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	flex: 1;
	min-width: 200px;
}

.btn-primary {
	background: linear-gradient(135deg, #1e3c72, #2a5298);
	color: white;
}

.btn-secondary {
	background: #6c757d;
	color: white;
}

.btn-success {
	background: #28a745;
	color: white;
}

.btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.llm-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 20px;
	margin-bottom: 40px;
}

.llm-card {
	background: rgba(255, 255, 255, 0.95);
	border-radius: 15px;
	padding: 25px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
	border: 3px solid transparent;
	cursor: pointer;
	position: relative;
	overflow: hidden;
}

.llm-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(42, 82, 152, 0.1), transparent);
	transition: left 0.5s;
}

.llm-card:hover::before {
	left: 100%;
}

.llm-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.llm-card.selected {
	/* Stronger background and white text for high contrast when selected */
	border-color: #1e90ff;
	background: linear-gradient(180deg, rgba(26,50,95,0.96), rgba(20,40,78,0.96));
	color: #ffffff;
	box-shadow: 0 12px 36px rgba(10,20,40,0.55);
}

.llm-card.selected .llm-name {
	color: #ffffff;
}

.llm-card.selected .llm-description {
	color: rgba(255,255,255,0.9);
}

.llm-card.selected .strength-tag {
	background: rgba(255,255,255,0.08);
	color: #ffffff;
	border: 1px solid rgba(255,255,255,0.08);
}

.llm-card.selected .llm-badge {
	background: rgba(255,255,255,0.12);
	color: #ffffff;
}

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

.llm-name {
	font-size: 1.4rem;
	font-weight: 700;
	color: #1e3c72;
}

.llm-badge {
	background: #2a5298;
	color: white;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 500;
}

.llm-strengths {
	margin-bottom: 15px;
}

.strength-tag {
	display: inline-block;
	background: #f0f0f0;
	color: #333;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 0.85rem;
	margin: 3px 3px;
	border: 1px solid #ddd;
}

.llm-description {
	color: #666;
	font-size: 0.95rem;
}

.output-section {
	background: rgba(255, 255, 255, 0.95);
	padding: 30px;
	border-radius: 15px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	margin-bottom: 30px;
	display: none;
	backdrop-filter: blur(10px);
}

.output-section.active {
	display: block;
}

.prompt-container {
	margin-bottom: 30px;
	border: 1px solid #e9ecef;
	border-radius: 12px;
	overflow: hidden;
}

.prompt-header {
	background: #f8f9fa;
	padding: 15px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #e9ecef;
}

.prompt-title {
	font-weight: 600;
	color: #1e3c72;
	font-size: 1.1rem;
}

.prompt-actions {
	display: flex;
	gap: 10px;
}

.action-btn {
	background: none;
	border: 1px solid #ddd;
	padding: 6px 12px;
	border-radius: 5px;
	cursor: pointer;
	font-size: 0.85rem;
	transition: all 0.3s ease;
}

.action-btn:hover {
	background: #f8f9fa;
}

.prompt-output {
	background: white;
	padding: 20px;
	font-family: 'Courier New', monospace;
	white-space: pre-wrap;
	color: #333;
	position: relative;
	max-height: 300px;
	overflow-y: auto;
}

.prompt-stats {
	background: #f8f9fa;
	padding: 10px 20px;
	font-size: 0.85rem;
	color: #666;
	border-top: 1px solid #e9ecef;
}

.template-library {
	background: rgba(255, 255, 255, 0.95);
	border-radius: 15px;
	padding: 30px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	margin-bottom: 30px;
}

.template-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 15px;
}

.template-item {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 15px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.template-item:hover {
	background: #e9ecef;
	transform: translateY(-2px);
}

.template-name {
	font-weight: 600;
	margin-bottom: 5px;
	color: #1e3c72;
}

.template-desc {
	font-size: 0.9rem;
	color: #666;
}

.comparison-table {
	background: rgba(255, 255, 255, 0.95);
	border-radius: 15px;
	padding: 30px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 20px;
}

th, td {
	padding: 15px;
	text-align: left;
	border-bottom: 1px solid #ddd;
}

th {
	background: #1e3c72;
	color: white;
	font-weight: 600;
	position: sticky;
	top: 0;
}

tr:hover {
	background: rgba(42, 82, 152, 0.05);
}

.progress-bar {
	width: 100%;
	height: 4px;
	background: #e9ecef;
	border-radius: 2px;
	overflow: hidden;
	margin: 20px 0;
}

.progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #1e3c72, #2a5298);
	transition: width 0.3s ease;
	width: 0%;
}

.notification {
	position: fixed;
	top: 20px;
	right: 20px;
	background: #28a745;
	color: white;
	padding: 15px 20px;
	border-radius: 8px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
	transform: translateX(400px);
	transition: transform 0.3s ease;
	z-index: 1000;
}

.notification.show {
	transform: translateX(0);
}

.search-box {
	position: relative;
	margin-bottom: 20px;
}

.search-box input {
	width: 100%;
	padding: 12px 40px 12px 15px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 1rem;
}

.search-icon {
	position: absolute;
	right: 15px;
	top: 50%;
	transform: translateY(-50%);
	color: #666;
}

@media (max-width: 768px) {
	h1 {
		font-size: 2rem;
	}

	.form-row {
		grid-template-columns: 1fr;
	}

	.llm-cards {
		grid-template-columns: 1fr;
	}

	.container {
		padding: 10px;
	}

	.tabs {
		flex-direction: column;
	}

	.button-group {
		flex-direction: column;
	}

	.btn {
		min-width: auto;
		flex: none;
	}

	header, .input-section, .output-section, .comparison-table, .template-library {
		padding: 20px;
	}

	table {
		font-size: 0.9rem;
	}

	th, td {
		padding: 10px 8px;
	}
}

.fade-in {
	animation: fadeIn 0.5s ease-in;
}

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

.loading {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 2px solid #f3f3f3;
	border-top: 2px solid #2a5298;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}