body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to right, #f0f4f8, #e8f0ff);
  margin: 0;
  padding: 0;
}

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

.header {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  font-size: 48px;
  display: block;
}

h1 {
  font-family: 'Orbitron', sans-serif;
  color: black;
}

.search-container {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

input {
  flex: 1;
  min-width: 0;
  padding: 14px;
  font-size: 16px;
  border: 2px solid #000;
  border-radius: 6px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  width: 100%;
}

input:focus {
  border-color: green;
  outline: none;
  background-color: #f8fcff;
}

button {
  width: 60px;
  height: 60px;
  font-size: 8px;
  background-color: #000;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 3px 5px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Кнопка ішіндегі сілтеменің түсін ақ қылу */
button a {
  color: white;
  text-decoration: none; /* Астындағы сызықты алып тастайды */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Сілтеме басылғаннан кейін де түсі өзгермеуі үшін */
button a:visited {
  color: white;
}

button:hover {
  background-color: green;
}

#result {
  white-space: pre-line; /* \n жаңа жолға айналады */
}

/* Әр топты жаңа жолға шығару */
#result {
  margin: 5px 0;
}

/* Қатысушы аттары жасыл түспен */
#result {
  color: green;
}

/* Топ атаулары (қою түспен) */
#result {
  color: #000;
}


.typing-text {
  background: #ffffff;
  padding: 10px 10px;
  margin: 0;
  border-left: 5px solid #FFFFFF;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  font-size: 18px;
  font-weight: 700;
  color: #000000;
  line-height: 1.6;
  white-space: pre-line;
}

/* Бас кнопка */
.quick-toggle {
  text-align: center;
  margin-top: 20px;
}

.quick-toggle button {
  background: #fff;
  color: #000;
  border: none;
  padding: 6px 32px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.quick-toggle button:hover {
  background: #333;
  color: #fff;
}

/*  Жасырын тұрған командалар + анимация */
.quick-commands {
  margin-top: 15px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 4px 60px;
  border-radius: 6px;
  text-decoration: none;

  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.5s ease;
}

.quick-commands.show {
  max-height: 400px;
  opacity: 1;
}

#zerek-bilim {
  position: relative;
  max-width: 600px;
  margin: auto;
}

#camera {
  width: 600px;      /* ұзындығын ұлғайту */
  height: 380px;     /* биіктігін кішірейту */
  object-fit: cover;/* бейне созылып кетпей, дұрыс қиылады */
  border-radius: 14px;
}


#questionBubble {
  position: absolute;
  background: #ffffffee;
  padding: 10px 16px;
  border-radius: 20px;
  font-weight: bold;
  transform: translate(-50%, -100%);
  z-index: 20;
  pointer-events: auto;
}


#answerInput {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
}

#submitAnswer {
  width: 80px;        /* кішкентай ені */
  height: 36px;        /* аласа биіктік */

  padding: 0;          /* артық кеңістікті алып тастау */
  font-size: 15px;     /* ҮЛКЕН жазу */
  font-weight: 800;

  border-radius: 18px;
  border: none;
  background: #000;
  color: white;
  cursor: pointer;

  display: block;
  margin: 8px auto 0;  /* ортасына қою */
  line-height: 36px;   /* мәтінді дәл орталау */
}


#cameraWrapper {
  position: relative;
  display: inline-block;
}

.subject-box {
  max-width: 360px;
  margin: 20px auto;
  text-align: center;
}

.subject-box label {
  display: block;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #000;
}

#subjectSelect {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 600;

  border-radius: 14px;
  border: 2px solid #000;
  background: linear-gradient(135deg, #ffffff, #f1f6ff);
  cursor: pointer;

  box-shadow: 0 6px 14px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

#subjectSelect:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

#subjectSelect:focus {
  outline: none;
  border-color: green;
}

.result-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.result-buttons button {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 18px;
  border: none;
  cursor: pointer;
}

.result-buttons button:first-child {
  background: #007bff;
  color: #fff;
}

.result-buttons button:last-child {
  background: #28a745;
  color: #fff;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {

  body {
    padding: 0;
  }

  #zerek-bilim {
    padding: 10px;
  }

  /* Пән таңдау */
  #subjectSelect {
    width: 100%;
    font-size: 18px;
    padding: 12px;
    border-radius: 16px;
  }

  /* Камера */
  #cameraWrapper {
    width: 100%;
  }

  #camera {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 16px;
  }

  /* Сұрақ bubble */
  #questionBubble {
    font-size: 14px;
    padding: 8px 12px;
    max-width: 90%;
  }

  /* Жауап input */
  #answerInput {
    font-size: 18px;
    padding: 10px;
    margin-top: 10px;
  }

  /* Жауап беру кнопкасы */
  #submitAnswer {
    width: 120px;
    height: 34px;
    font-size: 18px;
    line-height: 34px;
    margin: 8px auto;
  }

  /* Нәтиже кнопкалары */
  .result-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .result-buttons button {
    width: 160px;
    font-size: 16px;
  }
}
