* {
	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;
}

.container {
	max-width: 900px;
	margin: 0 auto;
	background: white;
	border-radius: 20px;
	box-shadow: 0 20px 40px rgba(0,0,0,0.1);
	overflow: hidden;
}

.header {
	background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
	color: white;
	padding: 30px;
	text-align: center;
}

.header h1 {
	font-size: 2.5rem;
	margin-bottom: 10px;
}

.header p {
	font-size: 1.1rem;
	opacity: 0.9;
}

.main-content {
	padding: 40px;
}

.category-selection {
	background: #f8f9fa;
	border-radius: 15px;
	margin-bottom: 30px;
	text-align: center;
}

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

.category-card {
	background: white;
	border: 2px solid #e9ecef;
	border-radius: 12px;
	padding: 20px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-align: center;
}

.category-card:hover {
	border-color: #4facfe;
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(79, 172, 254, 0.2);
}

.category-card.selected {
	border-color: #4facfe;
	background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
	color: white;
}

.category-card h3 {
	font-size: 1.2rem;
	margin-bottom: 8px;
}

.category-card .question-count {
	color: #666;
	font-size: 0.9rem;
}

.category-card.selected .question-count {
	color: rgba(255,255,255,0.8);
}

/* Enhanced Question Limit Selector */
.question-limit-section {
	background: white;
	border-radius: 15px;
	padding: 25px;
	margin: 25px 0;
	border: 2px solid #e9ecef;
	transition: all 0.3s ease;
}

.question-limit-section:hover {
	border-color: #4facfe;
}

.question-limit-section h3 {
	color: #333;
	margin-bottom: 15px;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.1rem;
}

.question-limit-options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 12px;
}

.limit-option {
	background: #f8f9fa;
	border: 2px solid #e9ecef;
	border-radius: 10px;
	padding: 15px 10px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-align: center;
	font-weight: 600;
	color: #666;
}

.limit-option:hover {
	border-color: #4facfe;
	background: #e7f3ff;
	transform: translateY(-2px);
}

.limit-option.selected {
	border-color: #4facfe;
	background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
	color: white;
	box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.start-quiz-section {
	margin-top: 30px;
	padding: 20px 0;
	border-top: 2px solid #e9ecef;
}

.quiz-section {
	background: #f8f9fa;
	border-radius: 15px;
	padding: 10px;
	margin-bottom: 30px;
}

.question-display {
	font-size: 1.3rem;
	line-height: 1.6;
	color: #333;
	margin-bottom: 20px;
	min-height: 80px;
	display: flex;
	align-items: center;
}

.options-display {
	background: white;
	border-radius: 10px;
	padding: 10px;
	margin: 20px 0;
	border: 1px solid #e9ecef;
}

.options-display h4 {
	color: #666;
	font-size: 1rem;
	margin-bottom: 15px;
	text-align: center;
}

.options-list {
	display: grid;
	gap: 10px;
}

.option-item {
	background: #f8f9fa;
	padding: 12px 15px;
	border-radius: 8px;
	border-left: 4px solid #4facfe;
	font-size: 1rem;
	color: #333;
}

.controls {
	display: flex;
	gap: 15px;
	justify-content: center;
	flex-wrap: wrap;
	margin: 20px 0;
}

.btn {
	padding: 12px 24px;
	border: none;
	border-radius: 25px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 8px;
}

.btn:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	margin: 0 auto;
	width: 250px                            
}

.btn-success {
	background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
	color: white;
}

.btn-warning {
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
	color: white;
}

.btn-info {
	background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
	color: white;
}

.btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.status-display {
	text-align: center;
	padding: 20px;
	border-radius: 10px;
	margin: 20px 0;
	font-weight: 600;
}

.status-listening {
	background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
	color: #721c24;
}

.status-processing {
	background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
	color: #0c4128;
}

.status-speaking {
	background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
	color: #8b4513;
}

.feedback-section {
	background: white;
	border-radius: 15px;
	margin-top: 20px;
	box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.feedback-correct {
	border-left: 5px solid #28a745;
	background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
	padding: 10px;
}

.feedback-incorrect {
	border-left: 5px solid #dc3545;
	background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
	padding: 10px;
}

.score-display {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 20px;
	border-radius: 15px;
	text-align: center;
	margin-bottom: 20px;
}

.score-display h3 {
	font-size: 1.5rem;
	margin-bottom: 10px;
}

.progress-bar {
	width: 100%;
	height: 8px;
	background: rgba(255,255,255,0.3);
	border-radius: 4px;
	overflow: hidden;
	margin-top: 10px;
}

.progress-fill {
	height: 100%;
	background: white;
	transition: width 0.3s ease;
}

.question-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	font-size: 0.9rem;
}

.voice-indicator {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.voice-wave {
	width: 4px;
	height: 20px;
	background: #4facfe;
	animation: wave 1s infinite ease-in-out;
}

.voice-wave:nth-child(2) { animation-delay: 0.1s; }
.voice-wave:nth-child(3) { animation-delay: 0.2s; }
.voice-wave:nth-child(4) { animation-delay: 0.3s; }

@keyframes wave {
	0%, 40%, 100% { transform: scaleY(0.4); }
	20% { transform: scaleY(1); }
}

.hidden {
	display: none;
}

.settings-panel {
	background: #f8f9fa;
	padding: 20px;
	border-radius: 10px;
	margin-bottom: 20px;
}

.setting-group {
	margin-bottom: 15px;
}

.setting-group label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
	color: #333;
}

.setting-group select, .setting-group input {
	width: 100%;
	padding: 8px 12px;
	border: 2px solid #ddd;
	border-radius: 8px;
	font-size: 1rem;
}

.loading {
	text-align: center;
	padding: 40px;
	color: #666;
}

.loading::after {
	content: '';
	width: 40px;
	height: 40px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #4facfe;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	display: inline-block;
	margin-left: 10px;
}

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

/* Enhanced Results Section */
.results-section {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	border-radius: 20px;
	padding: 40px;
	text-align: center;
	margin-bottom: 30px;
	box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
}

.results-header {
	margin-bottom: 30px;
}

.results-header h1 {
	font-size: 3rem;
	margin-bottom: 15px;
}

.results-header p {
	font-size: 1.2rem;
	opacity: 0.9;
}

.results-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	margin: 30px 0;
}

.stat-card {
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	border-radius: 15px;
	padding: 25px;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
	font-size: 2.5rem;
	font-weight: bold;
	display: block;
	margin-bottom: 8px;
}

.stat-label {
	font-size: 1rem;
	opacity: 0.8;
}

.performance-gauge {
	margin: 30px 0;
}

.gauge-container {
	position: relative;
	width: 200px;
	height: 100px;
	margin: 0 auto;
}

.gauge-bg {
	width: 200px;
	height: 100px;
	border-radius: 100px 100px 0 0;
	background: rgba(255, 255, 255, 0.1);
	position: relative;
	overflow: hidden;
}

.gauge-fill {
	width: 200px;
	height: 100px;
	border-radius: 100px 100px 0 0;
	position: absolute;
	top: 0;
	left: 0;
	transition: transform 2s ease-in-out;
	transform-origin: bottom center;
}

.gauge-text {
	position: absolute;
	bottom: 10px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 1.8rem;
	font-weight: bold;
}

.performance-message {
	margin: 20px 0;
	padding: 20px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 15px;
	font-size: 1.1rem;
}

.results-actions {
	display: flex;
	gap: 15px;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 30px;
}

.results-btn {
	padding: 15px 30px;
	border: 2px solid white;
	background: transparent;
	color: white;
	border-radius: 25px;
	font-size: 1.1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 10px;
}

.results-btn:hover {
	background: white;
	color: #667eea;
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.results-btn.primary {
	background: white;
	color: #667eea;
}

.results-btn.primary:hover {
	background: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
	.container {
		margin: 10px;
		border-radius: 10px;
	}
	
	.header h1 {
		font-size: 2rem;
	}
	
	.main-content {
		padding: 20px;
	}
	
	.controls {
		flex-direction: column;
		align-items: center;
	}
	
	.btn {
		width: 80%;
		justify-content: center;
	}

	.category-grid {
		grid-template-columns: 1fr;
	}

	.question-limit-options {
		grid-template-columns: repeat(2, 1fr);
	}

	.results-header h1 {
		font-size: 2.2rem;
	}

	.results-stats {
		grid-template-columns: 1fr;
	}

	.results-actions {
		flex-direction: column;
		align-items: center;
	}

	.results-btn {
		width: 80%;
		justify-content: center;
	}
}