:root {
	--primary-color: #0077cc;
	--secondary-color: #ff5a8a;
	--success-color: #1a9a3a;
	--error-color: #c92a2a;
	--muted-color: #666;
	--bg-color: #f6f7f9;
}

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

body {
	font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background: var(--bg-color);
	color: #333;
	line-height: 1.6;
}

.container {
	max-width: 1000px;
	margin: 0 auto;
	padding: 20px;
}

.quiz-header {
	background: white;
	padding: 15px 30px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	display: flex;
	justify-content: space-between;
	align-items: center;
	position: sticky;
	top: 0;
	z-index: 100;
}

.quiz-logo img {
	height: 40px;
}

#quiz-timer {
	font-weight: bold;
	color: var(--primary-color);
	font-size: 18px;
}

.page {
	display: none;
	animation: fadeIn 0.5s ease-in;
}

.page.active {
	display: block;
}

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

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

.progress {
	height: 100%;
	background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
	transition: width 0.3s ease;
}

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

.card {
	background: white;
	border-radius: 12px;
	padding: 30px;
	box-shadow: 0 8px 25px rgba(0,0,0,0.1);
	width: 100%;
	max-width: 800px;
}

h1 {
	color: var(--primary-color);
	text-align: center;
	margin-bottom: 20px;
	font-size: 2.5em;
}

h2 {
	color: var(--primary-color);
	margin: 20px 0;
	font-size: 2em;
}

.intro-text {
	text-align: center;
	margin: 30px 0;
	font-size: 1.1em;
	line-height: 1.8;
}

.intro-text ul {
	background: #f8f9fa;
	padding: 20px;
	border-radius: 8px;
	border-left: 4px solid var(--primary-color);
}

.navigation {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 30px;
	gap: 15px;
}

.btn {
	padding: 12px 24px;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	display: inline-block;
	font-size: 16px;
}

.btn-primary {
	background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
	color: white;
}

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

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

.subtitle {
	background: #e3f2fd;
	padding: 15px;
	border-radius: 8px;
	margin-bottom: 20px;
	border-left: 4px solid var(--primary-color);
}

.audio-section {
	margin: 20px 0;
}
    
.audio-info {
	background: white;
	padding: 15px;
	border-radius: 8px;
	margin: 15px 0;
}

.playing-indicator {
      font-weight: bold;
      color: red;
}
#startAudioBtn {
	padding: 12px 24px;
	font-size: 16px;
	background: linear-gradient(135deg, #4CAF50, #2196F3);
	color: white;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	margin-top: 10px;
}
#startAudioBtn:disabled {
	background: gray;
	cursor: not-allowed;
}
.card { background: #e3f2fd; padding: 18px; border-radius: 8px; }
.status-indicator { display:flex; gap:8px; align-items:center; margin-bottom:8px; }
.playing-indicator { font-weight: bold; color: #c62828; }
#startAudioBtn { padding:10px 14px; border-radius:6px; cursor:pointer; background:#1976d2; color:#fff; border:none; }
#startAudioBtn[disabled] { opacity:0.5; cursor:not-allowed; }
#nextSectionBtn { margin-left:12px; padding:8px 12px; border-radius:6px; border:none; }

.audio-status {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: white;
	padding: 15px;
	border-radius: 8px;
	margin: 15px 0;
	border: 2px solid #ddd;
}

.status-indicator {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: bold;
}

.audio-timer {
	color: var(--primary-color);
	font-weight: bold;
}

.audio-warning {
	background: #ffebee;
	padding: 15px;
	border-radius: 8px;
	margin: 15px 0;
	border: 2px solid #f44336;
}

#listeningList {
	padding: 0;
}

#listeningList li {
	margin: 20px;
	font-size: 16px;
	line-height: 1.8;
	gap: 10px;
}

#listeningList input {
	margin: 0 8px;
	padding: 8px 12px;
	border: 2px solid #ddd;
	border-radius: 4px;
	font-size: 16px;
	min-width: 150px;
	background: #fafafa;
}

#listeningList input:focus {
	background: white;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(0,119,204,0.1);
}
.LL-sub {
	padding: 0 0 0 20px;
}

@keyframes pulse {
	0% { opacity: 1; }
	50% { opacity: 0.5; }
	100% { opacity: 1; }
}

.playing-indicator {
	animation: pulse 1.5s infinite;
}
input[type="text"] {
	padding: 10px 15px;
	border: 2px solid #ddd;
	border-radius: 6px;
	font-size: 16px;
	transition: border-color 0.3s;
	min-width: 200px;
}

input[type="text"]:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(0,119,204,0.1);
}

.passage {
	background: #f8f9fa;
	padding: 20px;
	border-radius: 8px;
	margin: 20px 0;
	border-left: 4px solid var(--secondary-color);
}
.passage h3 {
	text-align: center;
	padding-bottom: 15px;
}
.passage p {
	padding-bottom: 15px;
}
.passage-sub {
	margin-left: 25px;
}
.summary-questions {
	border: 1px solid black;
}


.summary ul {
	margin: 15px;
	padding: 10px;
	background: #f8f9fa;
	border-radius: 6px;
}

.blank {
	display: inline-block;
	margin: 0 5px;
}

.blank input {
	min-width: 120px;
	border-bottom: 2px solid var(--primary-color);
	border-top: none;
	border-left: none;
	border-right: none;
	border-radius: 0;
	background: transparent;
}

.writing-task {
	margin: 20px 0;
}

.task-prompt {
	background: #fff3cd;
	padding: 20px;
	border-radius: 8px;
	border-left: 4px solid #ffc107;
	margin-bottom: 20px;
}

.writing-textarea {
	width: 100%;
	min-height: 400px;
	padding: 15px;
	border: 2px solid #ddd;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	line-height: 1.5;
	resize: vertical;
}

.word-count {
	text-align: right;
	margin-top: 10px;
	color: var(--muted-color);
	font-size: 14px;
}

.writing-tips {
	background: #d1ecf1;
	padding: 20px;
	border-radius: 8px;
	border-left: 4px solid #17a2b8;
	margin-top: 20px;
}

.speaking-info {
	line-height: 1.7;
}

.speaking-parts {
	margin: 20px 0;
}

.speaking-part {
	background: #f8f9fa;
	padding: 20px;
	margin: 15px 0;
	border-radius: 8px;
	border-left: 4px solid var(--primary-color);
}

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

.criterion {
	background: white;
	padding: 15px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.examiner-note {
	background: #fff3cd;
	padding: 20px;
	border-radius: 8px;
	border-left: 4px solid #ffc107;
	margin: 20px 0;
}

.note, .hint {
	color: var(--muted-color);
	font-style: italic;
	text-align: center;
	margin: 15px 0;
}

/* Results Page Styles */
.scoreRow {
	display: flex;
	gap: 15px;
	justify-content: center;
	margin: 20px 0;
	flex-wrap: wrap;
}

.scoreBox {
	background: #f8f9fa;
	border-radius: 12px;
	padding: 20px;
	min-width: 200px;
	text-align: center;
	border: 2px solid #e9ecef;
	transition: transform 0.3s ease;
}

.scoreBox:hover {
	transform: translateY(-5px);
}

.scoreBox .score-label {
	font-size: 14px;
	color: var(--muted-color);
	margin-bottom: 10px;
}

.scoreBox .score-value {
	font-size: 28px;
	font-weight: 800;
	color: var(--primary-color);
}

.total {
	font-size: 24px;
	font-weight: 800;
	margin: 20px 0;
	text-align: center;
	color: var(--primary-color);
}

.details {
	margin: 30px 0;
}

.sectionTitle {
	font-weight: 700;
	margin: 25px 0 15px 0;
	color: #333;
	font-size: 18px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--primary-color);
}

table {
	width: 100%;
	border-collapse: collapse;
	margin: 15px 0;
	background: white;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

th {
	background: var(--primary-color);
	color: white;
	font-weight: 600;
}

tr.correct td {
	background: rgba(26,154,58,0.1);
	border-left: 4px solid var(--success-color);
}

tr.wrong td {
	background: rgba(201,42,42,0.05);
	border-left: 4px solid var(--error-color);
}

.user {
	font-weight: 600;
	color: #333;
}

.correctAns {
	color: var(--success-color);
	font-weight: 600;
}

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

.btn-restart {
	background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
	color: white;
}

.btn-results {
	background: var(--success-color);
	color: white;
}

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

.btn-download {
	background: #6f42c1;
	color: white;
}

.ielts-info {
	background: #e3f2fd;
	padding: 20px;
	border-radius: 8px;
	margin: 20px 0;
	text-align: center;
}

@media (max-width: 768px) {
	.container {
		padding: 10px;
	}
	
	.quiz-header {
		padding: 10px 15px;
	}
	
	.card {
		padding: 20px;
	}
	
	.scoreRow {
		flex-direction: column;
	}
	
	.scoreBox {
		min-width: auto;
	}
	
	.navigation {
		flex-direction: column;
		gap: 10px;
	}
	
	.btn {
		width: 100%;
	}
}