/* Reset styles and base settings */
* {
	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;
	color: #333;
	line-height: 1.6;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

/* Header */
header {
	text-align: center;
	margin-bottom: 30px;
	background: rgba(255, 255, 255, 0.95);
	padding: 30px;
	border-radius: 15px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

header h1 {
	font-size: 2.5rem;
	margin-bottom: 10px;
	background: linear-gradient(135deg, #667eea, #764ba2);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

header p {
	font-size: 1.1rem;
	color: #666;
}

/* Main sections */
main {
	display: flex;
	flex-direction: column;
	gap: 25px;
}

.upload-section,
.settings-section,
.action-section,
.results-section {
	background: rgba(255, 255, 255, 0.95);
	padding: 25px;
	border-radius: 15px;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

h2 {
	margin-bottom: 20px;
	color: #333;
	font-size: 1.4rem;
}

/* File upload */
.file-input-wrapper {
	position: relative;
	margin-bottom: 15px;
}

#fileInput {
	position: absolute;
	left: -9999px;
}

.file-label {
	display: inline-block;
	padding: 15px 30px;
	background: linear-gradient(135deg, #667eea, #764ba2);
	color: white;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	border: 2px solid transparent;
	font-weight: 500;
}

.file-label:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.file-info {
	padding: 10px;
	background: #f8f9fa;
	border-radius: 8px;
	font-size: 0.9rem;
	color: #666;
}

.file-info span {
	margin-right: 15px;
}

/* Search settings */
.settings-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 20px;
}

.setting-item {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.setting-item label {
	font-weight: 500;
	color: #555;
}

.setting-item input[type='text'],
.setting-item input[type='number'] {
	padding: 12px;
	border: 2px solid #e1e5e9;
	border-radius: 8px;
	font-size: 1rem;
	transition: border-color 0.3s ease;
}

.setting-item input[type='text']:focus,
.setting-item input[type='number']:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.setting-item input[type='checkbox'] {
	margin-right: 8px;
	transform: scale(1.2);
}

/* Analysis button */
.action-section {
	text-align: center;
}

.analyze-btn {
	padding: 15px 40px;
	background: linear-gradient(135deg, #667eea, #764ba2);
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 1.1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.analyze-btn:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.analyze-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* Results */
.results-section {
	min-height: 200px;
}

.results-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	flex-wrap: wrap;
	gap: 10px;
}

.results-controls {
	display: flex;
	align-items: center;
	gap: 15px;
}

#resultsCount {
	font-size: 0.9rem;
	color: #666;
	font-weight: 500;
}

.copy-btn {
	padding: 8px 16px;
	background: #28a745;
	color: white;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 0.9rem;
	transition: background-color 0.3s ease;
}

.copy-btn:hover {
	background: #218838;
}

#results {
	width: 100%;
	min-height: 300px;
	padding: 15px;
	border: 2px solid #e1e5e9;
	border-radius: 8px;
	font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
	font-size: 0.9rem;
	line-height: 1.5;
	resize: vertical;
	background: #fafafa;
}

#results:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Footer */
footer {
	text-align: center;
	margin-top: 30px;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.9rem;
}

/* Responsiveness */
@media (max-width: 768px) {
	.container {
		padding: 15px;
	}

	header h1 {
		font-size: 2rem;
	}

	.settings-grid {
		grid-template-columns: 1fr;
	}

	.results-header {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* Animations */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.upload-section,
.settings-section,
.action-section,
.results-section {
	animation: fadeIn 0.6s ease-out;
}

/* Loading indicator */
.loading {
	position: relative;
	pointer-events: none;
}

.loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid #ffffff;
	border-top: 2px solid transparent;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}
