
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
}

:root {
  --main-radius: 12px;
  --transition: 0.2s;
}


.hidden {
  display: none !important;
}


.header {
  background-color: #45a149;
  padding: 10px 20px;
  margin: 10px;
  border-radius: var(--main-radius);
  display: flex;
  justify-content: space-between;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.nav-btn, .login-btn {
  background-color: white;
  color: #45a149;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  margin-right: 5px;
  border-radius: var(--main-radius);
  transition: background-color var(--transition), color var(--transition);
}
.nav-btn:hover, .login-btn:hover {
  background-color: #ddd;
  color: #45a149;
}


.public-info {
  text-align: center;
  margin-top: 120px;
  margin-left: auto;
  margin-right: auto;
  max-width: 600px;
}
.public-info h1 {
  font-size: 26px;
  margin-bottom: 15px;
}
.public-info p {
  font-size: 16px;
  color: #555;
}


.login-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 400px;
  width: 90%;
  background: white;
  padding: 20px 30px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  border-radius: var(--main-radius);
}
.login-container h2 {
  margin-top: 0;
  text-align: center;
}
.login-container input {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 10px;
  border-radius: var(--main-radius);
  border: 1px solid #ccc;
}
.login-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.login-actions button {
  flex: 1;
  padding: 10px;
  color: #fff;
  background-color: #45a149;
  border: none;
  border-radius: var(--main-radius);
  cursor: pointer;
  transition: background-color var(--transition);
}
.login-actions button:hover {
  background-color: #45a149;
}
.forgot-password {
  color: #4CAF50;
  text-align: center;
  margin-top: 10px;
  cursor: pointer;
  transition: color var(--transition);
}
.forgot-password:hover {
  text-decoration: underline;
  color: #45a149;
}


.register-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 400px;
  width: 90%;
  background: white;
  padding: 20px 30px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  border-radius: var(--main-radius);
  text-align: center;
}
.register-container h2 {
  margin-top: 0;
}
.register-container input {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 10px;
  border-radius: var(--main-radius);
  border: 1px solid #ccc;
}
.register-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.register-actions button {
  flex: 1;
  padding: 10px;
  color: #fff;
  background-color: #45a149;
  border: none;
  border-radius: var(--main-radius);
  cursor: pointer;
  transition: background-color var(--transition);
}
.register-actions button:hover {
  background-color: #45a149;
}


#content {
  padding: 20px;
}


.topics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1500px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .topics-grid {
    grid-template-columns: 1fr;
  }
}


.card {
  background: white;
  border-radius: var(--main-radius);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 20px;
  
  cursor: move;
  transition: transform var(--transition);
  position: relative;
}
.card.dragging {
  opacity: 0.5;
  transform: scale(1.02);
}
.card:hover {
  transform: translateY(-3px);
}
.card-header {
  font-weight: bold;
  margin-bottom: 8px;
  color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-body p {
  margin: 0;
  color: #666;
}

.delete-btn {
  float: right;
  color: #f44336;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 18px;
  margin-left: 10px;
}
.delete-btn:hover {
  background-color: #ffeeee;
}


#course-details {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background: white;
  border-radius: var(--main-radius);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#course-title {
  font-size: 24px;
  margin: 0;
  margin-bottom: 10px;
}
.add-task-btn {
  background-color: #45a149;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--main-radius);
  cursor: pointer;
  margin-bottom: 20px;
  transition: background-color var(--transition);
}
.add-task-btn:hover {
  background-color: #45a049;
}
.assignments-list .card {
  margin-bottom: 15px;
  position: relative;
}
.assignments-list .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}


#account-management {
  margin: 20px;
  padding: 20px;
  background: white;
  border-radius: var(--main-radius);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.account-container {
  display: flex;
  gap: 20px;
}
.account-nav {
  width: 200px;
  background-color: #fff;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-radius: var(--main-radius);
}
.account-nav button {
  width: 100%;
  margin-bottom: 10px;
  padding: 12px;
  border: none;
  cursor: pointer;
  background: #45a149;
  color: #fff;
  border-radius: var(--main-radius);
  transition: background-color var(--transition);
}
.account-nav button:hover {
  background: #45a149;
}

.account-content {
  
  flex: 1;
  background-color: #fff;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-radius: var(--main-radius);
  max-width: 400px;
  margin: auto;
  text-align: left;
}


.update-btn {
  display: block;
  width: 100%;
  background-color: #45a149;
  color: white;
  border: none;
  padding: 10px;
  margin-top: 10px;
  border-radius: 8px; 
  cursor: pointer;
  transition: background-color 0.2s;
}
.update-btn:hover {
  background-color: #45a149;
}


.account-content input {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 8px; 
  box-sizing: border-box;
}


.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-content {
  background: #fff;
  padding: 20px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  border-radius: var(--main-radius);
}
.modal-content h2 {
  margin-top: 0;
  margin-bottom: 15px;
}
.modal-content label {
  display: block;
  margin: 10px 0 5px;
  font-weight: 500;
  color: #333;
}
.modal-content input,
.modal-content textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  margin-bottom: 10px;
  border-radius: var(--main-radius);
  border: 1px solid #ccc;
}
.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.modal-actions button {
  flex: 1;
  padding: 10px;
  background-color: #45a149;
  color: #fff;
  border: none;
  border-radius: var(--main-radius);
  cursor: pointer;
  transition: background-color 0.2s;
}
.modal-actions button:hover {
  background-color: #45a149;
}


.question-block {
  background: white;
  padding: 10px;
  margin: 10px 0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


.test-btn {
  background: #45a149;
  color: black;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 10px;
}
.test-btn:hover {
  background: #45a149;
}

#test-interface {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}
.test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #45a149;
  color: white;
}
.test-actions button {
  background: white;
  color: #45a149;
  border: none;
  padding: 10px 16px;
  margin-left: 10px;
  border-radius: 8px;
  cursor: pointer;
}
.test-actions button:hover {
  background: #ddd;
}
.test-content {
  padding: 20px;
  overflow-y: auto;
}
.question-block {
  background: white;
  padding: 10px;
  margin: 10px 0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.radio-group div {
  display: flex;
  align-items: center;
  gap: 10px;
}


.create-course-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 400px;
  width: 90%;
  background: white;
  padding: 20px 30px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  border-radius: 12px;
}
.create-course-container h2 {
  margin-top: 0;
  text-align: center;
}
.create-course-container label {
  margin-top: 10px;
  display: block;
}
.create-course-container input,
.create-course-container select {
  width: 100%;
  margin: 8px 0;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}


.course-details {
  max-width: 900px;
  margin: 20px auto;
  padding: 10px;
  font-family: Arial, sans-serif;
}

.course-header {
  background: #45a149; 
  color: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.course-header h1 {
  margin: 0;
  font-size: 24px;
}

.course-header p {
  margin: 5px 0 0 0;
  font-weight: 300;
}


.create-test-btn {
  .back-btn {
    background-color: #45a149;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background-color 0.3s;
  }
  .back-btn:hover {
    background-color: #3c8c40;
  }
  
}
.create-test-btn:hover {
  background: #45a149;
}


.tests-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


.test-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 15px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.test-info {
  font-size: 18px;
  font-weight: 500;
}


.test-actions {
  display: flex;
  gap: 8px;
}


.test-btn {
  background: #f0f0f0;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.test-btn:hover {
  background: #ddd;
}


.delete-test-btn {
  background: none;
  border: none;
  color: red;
  font-size: 20px;
  cursor: pointer;
  transition: 0.2s;
}
.delete-test-btn:hover {
  transform: scale(1.1);
}

#create-assignment-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  background: white;
  padding: 20px 30px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  border-radius: 12px;
  z-index: 999;
  text-align: center; 
}

#create-assignment-container h2 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 22px;
  color: #333;
}

.create-assignment-container label {
  display: block;
  text-align: left; 
  margin: 10px 0 5px;
  font-weight: 500;
  color: #333;
}

.create-assignment-container input {
  width: 100%;
  margin: 8px 0;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  font-size: 14px;
  outline: none;
}


.actions-row {
  display: flex;
  justify-content: space-around; 
  margin-top: 20px;
}


.actions-row button {
  flex: 1; 
  margin: 0 5px;
  padding: 10px 0;
  background-color: #45a149;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.actions-row button:hover {
  background-color: #45a149;
}


.test-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999; 
  background: #fff;
  width: 500px;
  max-width: 90%;
  padding: 20px 30px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  border-radius: 12px;
}

.test-modal .nav-buttons,
.test-modal .bottom-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  justify-content: center;
}

.test-modal .answer-item {
  width: 100%;
  margin: 8px 0;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}


.user-manager {
  border: 2px solid #ccc;
  padding: 20px;
  margin-top: 30px;
  border-radius: 12px;
  background-color: #f9f9f9;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  position: relative;
  
}


#user-list-container {
  margin-top: 20px;
}


.user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 12px;
  border: 2px solid black;
  border-radius: 14px;
  background-color: white;
}

.user-row span {
  flex: 1;
  font-weight: 500;
}

.user-row select {
  border: 2px solid #45a149;
  border-radius: 12px;
  padding: 6px 10px;
  margin-left: 10px;
  min-width: 140px;
  font-weight: bold;
  background-color: white;
  cursor: pointer;
}

.user-row select:focus {
  outline: none;
  border-color: #00b140;
}


.create-group-top-btn {
  
  background-color: #45a149;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}
.create-group-top-btn:hover {
  background-color: #45a149;
}



button {
  background-color: #45a149;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}
button:hover {
  background: #45a149;
}

.back-btn {
  background-color: #45a149;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 10px; 
  transition: background-color 0.3s;
}
.back-btn:hover {
  background-color: #3c8c40;
}


.test-type-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}


.test-btn.wide-btn {
  width: 100%;
  text-align: left; 
  border-radius: 8px;
  background: #f0f0f0; 
}
.test-btn.wide-btn:hover {
  background: #ddd;
}

.answer-item {
  border: 2px solid #00b140; 
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 10px;
}

.test-type-card {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.test-type-card h3 {
  margin-top: 0;
  font-size: 18px;
  color: #333;
}
.test-type-card button {
  background-color: #45a149;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.test-type-card button:hover {
  background-color: #3a8f3e;
}


.text-questions-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex; 
  justify-content: center;
  align-items: center;
  z-index: 9999; 
  overflow: hidden;
}


.text-questions-modal {
  background-color: #fff;
  border-radius: 12px;
  width: 500px;
  max-width: 90%;
  padding: 20px 30px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  position: relative;
  max-height: 80vh;   
  overflow-y: auto;
}

.text-questions-modal h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 20px;
  text-align: center;
}


.text-questions-modal .nav-buttons,
.text-questions-modal .bottom-buttons {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.text-questions-modal label {
  margin-top: 10px;
  font-weight: 500;
  color: #333;
  display: block;
}

.text-questions-modal input[type="text"] {
  width: 100%;
  margin: 6px 0;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
}


.text-questions-modal .answer-item {
  background-color: #f9f9f9;
  border: 2px dashed #45a149;
  border-radius: 6px;
  padding: 10px;
  margin-top: 8px;
}

.text-questions-modal .answer-item label {
  margin-top: 0;
  font-weight: 500;
}

.text-questions-modal button {
  background-color: #45a149;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-weight: 500;
}
.text-questions-modal button:hover {
  background-color: #3a8f3e;
}
.text-questions-modal textarea {
  width: 100%;           
  min-height: 120px;     
  max-height: 500px;     
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 8px;
  box-sizing: border-box;
  resize: vertical;      
  font-family: inherit;  
  font-size: 14px;
  line-height: 1.3;
}

.test-controls-row {
  margin-bottom: 15px; 
}


.test-controls-left {
  display: flex;
  align-items: center;
  gap: 10px; 
}


.single-choice-answer {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  gap: 8px;
}


.single-choice-answer input[type="radio"] {
  accent-color: orange; 
}


.single-choice-answer input[type="radio"]:hover {
  cursor: pointer;
}


.sc-answer-item {
  background-color: #f9f9f9;
  border: 2px dashed #45a149;
  border-radius: 6px;
  padding: 10px;
  margin-top: 8px;
}


.sc-single-choice-answer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}


.sc-single-choice-answer input[type="radio"] {
  accent-color: orange;
}


.support-footer{
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #000000;
  z-index: 1000;          
}

.support-footer img{
  height: 65px;           
  object-fit: contain;
}
@media(max-width: 600px){
  .support-footer img{
    height: 40px;
}
}


.multi-choice-answer {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  gap: 8px;
}


.multi-choice-answer input[type="checkbox"]:hover {
  cursor: pointer;
}


.mc-answer-item {              
  background-color: #f9f9f9;
  border: 2px dashed #45a149;  
  border-radius: 6px;
  padding: 10px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}


.mc-answer-item input[type="text"] {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #bbb;
  border-radius: 6px;
}


.matching-modal textarea,
.matching-pair {
  width: 100%;
  box-sizing: border-box;
}

.matching-pair {
  display: flex;
  gap: 15px;
  padding: 12px;
  margin: 10px 0;
  border: 2px dashed #45a149;   
  border-radius: 8px;
}

.matching-left,
.matching-right {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.matching-left label,
.matching-right label {
  font-weight: bold;
  font-size: 20px;
  min-width: 20px;
}

.matching-left input,
.matching-right input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.matching-right input.short-number {
  max-width: 60px;               
}


#test-interface {
  position: fixed;              
  top: 20px;                    
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 800px;             
  background: white;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-radius: var(--main-radius);
  z-index: 1000;
  display: block;               
  padding-bottom: 20px;
  overflow: auto;
}


#test-interface .test-header {
  background-color: #45a149;
  padding: 10px 20px;
  margin: 0;                     
  border-radius: var(--main-radius) var(--main-radius) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.1);
}


#test-interface .test-content {
  padding: 20px;
}


#test-interface .test-actions button {
  background-color: white;
  color: #45a149;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  border-radius: var(--main-radius);
  transition: background-color var(--transition), color var(--transition);
}
#test-interface .test-actions button:hover {
  background-color: #ddd;
}
#test-interface.studenttest {
  background: transparent !important; 
  height: auto         !important;     
}

