@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

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

body {
  font-family: "Poppins", sans-serif;
  background-color: #e8ecef;
  min-height: 100vh;
  color: #333;
  padding-bottom: 80px;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

/* Profile Section */
.profile-section {
  background: white;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

.profile-info h2 {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.profile-info p {
  font-size: 13px;
  color: #6b7280;
}

/* Section */
.section {
  margin-bottom: 20px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tests List */
.tests-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.test-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.test-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.test-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.test-code {
  font-weight: 600;
  color: #2563eb;
  font-size: 15px;
}

.test-grade {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.grade-a {
  background: #dcfce7;
  color: #16a34a;
}
.grade-b {
  background: #dbeafe;
  color: #2563eb;
}
.grade-c {
  background: #fef3c7;
  color: #f59e0b;
}
.grade-f {
  background: #fee2e2;
  color: #dc2626;
}

.test-card-body {
  font-size: 13px;
  color: #6b7280;
}

.test-dropdown {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  display: none;
}

.test-dropdown.open {
  display: block;
}

.test-detail {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.test-detail span:first-child {
  color: #6b7280;
}

.test-detail span:last-child {
  color: #1f2937;
  font-weight: 500;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 14px;
}

/* Bottom Menu */
.bottom-menu {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 16px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  padding: 12px 20px;
  background: #f3f4f6;
  color: #374151;
  border: none;
  border-radius: 10px;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #374151;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: rgba(0, 0, 0, 0.05);
}

.btn-small {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 8px;
}

/* Input Group */
.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  transition: border-color 0.2s;
}

.input-group input:focus,
.input-group textarea:focus {
  outline: none;
  border-color: #2563eb;
}

.input-group textarea {
  min-height: 80px;
  resize: vertical;
}

/* Error Message */
.error-message {
  color: #dc2626;
  font-size: 13px;
  margin-top: 8px;
  padding: 10px;
  background: #fee2e2;
  border-radius: 8px;
  display: none;
}

.error-message.show {
  display: block;
}

/* Fullscreen Modal (Test Taking) */
.fullscreen-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #e8ecef;
  z-index: 1000;
  display: none;
  flex-direction: column;
}

.fullscreen-modal.open {
  display: flex;
}

.test-header {
  background: white;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.test-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.test-timer {
  background: #fee2e2;
  color: #dc2626;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.test-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.test-footer {
  background: white;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}

#questionCounter {
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
}

/* Question Card */
.question-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.question-number {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 6 variantli savollar uchun grid layout (33-35 savollar) */
.question-options-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.question-options-6 .option-btn {
  text-align: center;
  padding: 16px 12px;
}

.option-btn {
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.option-btn:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.option-btn.selected {
  border-color: #2563eb;
  background: #2563eb;
  color: white;
}

.input-answer {
  width: 100%;
  padding: 14px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
}

.input-answer:focus {
  outline: none;
  border-color: #2563eb;
}

/* Two Input Fields (Questions 40-44) */
.dual-input {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dual-input label {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
}

/* Single Input Field (Questions 36-39 - kalitli savollar) */
.single-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.single-input label {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.single-input .input-answer {
  width: 100%;
  padding: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  text-align: center;
}

.single-input .input-answer:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Question 45 - User Score Input */
.score-input-group {
  text-align: center;
}

.score-input-group p {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 12px;
}

.score-input {
  width: 120px;
  padding: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-family: "Poppins", sans-serif;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
}

.score-input:focus {
  outline: none;
  border-color: #2563eb;
}

/* Result Modal */
.result-modal .modal-body {
  text-align: center;
}

.result-grade {
  font-size: 64px;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 20px;
}

.result-details {
  background: #f3f4f6;
  border-radius: 12px;
  padding: 16px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

.result-item:last-child {
  border-bottom: none;
}

.result-item span {
  color: #6b7280;
  font-size: 14px;
}

.result-item strong {
  color: #1f2937;
  font-size: 15px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c4c4c4;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}
