/* Reset and Base Styles */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	min-height: 100vh;
	animation: fadeIn 1s ease-out;
}

/* Animations */
@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

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

@keyframes glow {
	from { text-shadow: 0 4px 8px rgba(0,0,0,0.3); }
	to { text-shadow: 0 4px 20px rgba(255,255,255,0.4); }
}

@keyframes bounce {
	0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
	40% { transform: translateY(-10px); }
	60% { transform: translateY(-5px); }
}

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

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

@keyframes shimmer {
	0% { left: -100%; }
	100% { left: 100%; }
}

/* Layout */
.container {
	max-width: 900px;
	margin: 0 auto;
	padding: 20px;
	animation: slideUp 0.8s ease-out;
}

/* Header */
.header {
	text-align: center;
	margin: 40px 0;
	color: white;
}

.header h1 {
	font-size: 3rem;
	font-weight: 700;
	margin-bottom: 10px;
	text-shadow: 0 4px 8px rgba(0,0,0,0.3);
	animation: glow 2s ease-in-out infinite alternate;
}

.header p {
	font-size: 1.2rem;
	opacity: 0.9;
	margin-bottom: 20px;
}

.ai-icon {
	font-size: 4rem;
	margin-bottom: 20px;
	animation: bounce 2s infinite;
}

/* Main Card */
.main-card {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	border-radius: 20px;
	padding: 40px;
	box-shadow: 0 20px 40px rgba(0,0,0,0.1);
	border: 1px solid rgba(255,255,255,0.2);
	animation: slideUp 0.8s ease-out 0.2s both;
}

/* Guidelines */
.guidelines {
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
	color: white;
	padding: 25px;
	border-radius: 15px;
	margin: 20px 0 30px 0;
	animation: slideUp 0.8s ease-out 0.3s both;
}

.guidelines h3 {
	font-size: 1.5rem;
	margin-bottom: 15px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.guidelines ul {
	list-style: none;
}

.guidelines li {
	padding: 8px 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.guidelines li:before {
	content: "✨";
	font-size: 1.2rem;
}

/* Form */
.form-container {
	animation: slideUp 0.8s ease-out 0.5s both;
}

.input-group {
	margin-bottom: 25px;
}

.input-group label {
	display: block;
	font-weight: 600;
	color: #333;
	margin-bottom: 10px;
	font-size: 1.1rem;
}

textarea {
	width: 100%;
	min-height: 120px;
	padding: 20px;
	border: 2px solid #e1e8ed;
	border-radius: 15px;
	font-size: 1rem;
	font-family: inherit;
	resize: vertical;
	transition: all 0.3s ease;
	background: #f8fafc;
}

textarea:focus {
	outline: none;
	border-color: #667eea;
	background: white;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
	transform: translateY(-2px);
}

/* Buttons */
.submit-btn {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	border: none;
	padding: 15px 40px;
	font-size: 1.1rem;
	font-weight: 600;
	border-radius: 50px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 auto;
	position: relative;
	overflow: hidden;
}

.submit-btn:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
	transform: translateY(-1px);
}

.submit-btn:before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
	transition: left 0.5s;
}

.submit-btn:hover:before {
	left: 100%;
}

.new-question-btn {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	border: none;
	padding: 12px 30px;
	font-size: 1rem;
	font-weight: 600;
	border-radius: 25px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 8px;
}

.new-question-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Loading */
.loading {
	display: none;
	text-align: center;
	margin: 20px 0;
}

.spinner {
	display: inline-block;
	width: 40px;
	height: 40px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid #667eea;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

.modal-loading {
	display: none;
	text-align: center;
	padding: 40px;
	color: #667eea;
}

.modal-loading .spinner {
	width: 50px;
	height: 50px;
	border-width: 4px;
	margin: 0 auto 20px;
}

/* Modal */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(8px);
	z-index: 1000;
	display: none;
	opacity: 0;
	transition: all 0.3s ease;
}

.modal-overlay.active {
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 1;
}

.modal {
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
	backdrop-filter: blur(20px);
	border-radius: 25px;
	max-width: 800px;
	width: 90%;
	max-height: 80vh;
	overflow: hidden;
	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
	border: 1px solid rgba(255, 255, 255, 0.3);
	transform: scale(0.8) translateY(50px);
	opacity: 0;
	transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active {
	transform: scale(1) translateY(0);
	opacity: 1;
}

.modal-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 25px 30px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	position: relative;
	overflow: hidden;
}

.modal-header::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
	animation: shimmer 3s infinite;
}

.modal-title {
	font-size: 1.5rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
}

.modal-close {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: white;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
	transition: all 0.3s ease;
	backdrop-filter: blur(10px);
}

.modal-close:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: rotate(90deg) scale(1.1);
}

.modal-body {
	padding: 0;
	max-height: calc(80vh - 140px);
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #667eea rgba(0,0,0,0.1);
}

.modal-body::-webkit-scrollbar {
	width: 8px;
}

.modal-body::-webkit-scrollbar-track {
	background: rgba(0,0,0,0.05);
}

.modal-body::-webkit-scrollbar-thumb {
	background: linear-gradient(135deg, #667eea, #764ba2);
	border-radius: 4px;
}

.modal-footer {
	padding: 20px 30px;
	background: rgba(0, 0, 0, 0.02);
	display: flex;
	justify-content: center;
}

/* Modal Content Sections */
.question-section {
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
	color: white;
	padding: 25px 30px;
	border-bottom: 1px solid rgba(255,255,255,0.1);
}

.answer-section {
	background: linear-gradient(135deg, #3f6280 0%, #0f3f41 100%);
	color: white;
	padding: 25px 30px;
}

.error-section {
	background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
	color: white;
	padding: 25px 30px;
}

.question-section h3,
.answer-section h3,
.error-section h3 {
	margin: 0 0 15px 0;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.2rem;
}

.question-text,
.answer-text,
.error-text {
	background: rgba(255, 255, 255, 0.15);
	padding: 15px 20px;
	border-radius: 12px;
	backdrop-filter: blur(5px);
	font-size: 1rem;
	line-height: 1.6;
	margin: 0;
}

.answer-text {
	padding: 20px;
}

.answer-text strong {
	font-weight: 700;
	color: rgba(255, 255, 255, 0.95);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Content Actions */
.content-actions {
	display: flex;
	gap: 10px;
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #dee2e6;
}

.report-btn {
	background: #dc3545;
	color: white;
	border: none;
	padding: 8px 16px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 5px;
	transition: background 0.3s;
}

.report-btn:hover {
	background: #c82333;
}

.flag-btn {
	background: #fd7e14;
	color: white;
	border: none;
	padding: 8px 16px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 5px;
	transition: background 0.3s;
}

.flag-btn:hover {
	background: #e8690b;
}

/* Report Modal */
.report-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 1001;
}

.report-modal.active {
	display: flex;
}

.report-form {
	background: white;
	padding: 30px;
	border-radius: 12px;
	max-width: 500px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
}

.report-form h3 {
	color: #dc3545;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	font-weight: 500;
	margin-bottom: 5px;
	color: #495057;
}

.form-group select,
.form-group textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ced4da;
	border-radius: 6px;
	font-size: 14px;
}

.form-group textarea {
	resize: vertical;
	height: 100px;
}

.report-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

.btn-cancel {
	background: #6c757d;
	color: white;
	border: none;
	padding: 10px 20px;
	border-radius: 6px;
	cursor: pointer;
}

.btn-submit {
	background: #dc3545;
	color: white;
	border: none;
	padding: 10px 20px;
	border-radius: 6px;
	cursor: pointer;
}

/* Info Messages */
.content-warning {
	background: #fff3cd;
	color: #856404;
	padding: 15px;
	border-radius: 8px;
	margin: 10px 0 20px 0;
	border-left: 4px solid #ffc107;
}

.success-message {
	background: #d4edda;
	color: #155724;
	padding: 15px;
	border-radius: 8px;
	margin-top: 15px;
	display: none;
}

.model-used {
	background: #cce5ff;
	color: #004085;
	padding: 8px 12px;
	border-radius: 6px;
	margin-bottom: 10px;
	font-size: 14px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.api-info {
	display: flex;
	gap: 15px;
	align-items: center;
}

.api-badge {
	background: #28a745;
	color: white;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: bold;
}

/* Tips Section */
.tips {
	background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
	padding: 20px;
	border-radius: 15px;
	margin-top: 30px;
	animation: slideUp 0.8s ease-out 0.7s both;
}

.tips h4 {
	color: #8b4513;
	margin-bottom: 15px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.tips p {
	color: #5d4e37;
	line-height: 1.6;
}

/* Utility Classes */
.pulse {
	animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
	.header h1 {
		font-size: 2rem;
	}
	
	.main-card {
		padding: 20px;
	}
	
	.guidelines {
		padding: 20px;
	}
	
	.modal {
		width: 95%;
		max-height: 90vh;
		margin: 20px;
	}
	
	.modal-header,
	.question-section,
	.answer-section,
	.error-section {
		padding: 20px;
	}
	
	.modal-title {
		font-size: 1.3rem;
	}
	
	.content-actions {
		flex-direction: column;
	}
	
	.modal-body {
		padding: 20px;
	}
}