* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: white;
  color: #333;
  display: flex;
  min-height: 100vh;
  text-align: center;
  padding: 20px;
  flex-direction: column;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #ddd;
  background: white;
  z-index: 1000;
}

.home-icon {
  position: absolute;
  left: 20px;
  display: flex;
  align-items: center;
  height: 100%;
}

.home-icon img {
  height: 25px;
  width: 25px;
}

.header-title {
  font-size: 20px;
  font-weight: 600;
  color: #3c4043;
}

.container {
  padding-top: 50px;
}

.title {
  font-size: 64px;
  font-weight: 900;
  margin-top: 20px;
  margin-bottom: 20px;
  color: #1a1a1a;
}

.subtitle {
  font-size: 18px;
  color: #5f6368;
  margin-bottom: 40px;
}

.form {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.form-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
}

select, input {
  padding: 16px 20px;
  border: none;
  border-radius: 40px;
  background-color: #eef3fb;
  font-size: 16px;
  width: 240px;
  color: #333;
}

select:focus, input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #cbdffd;
}

.generate-btn {
  margin-top: 10px;
  padding: 16px 40px;
  border: none;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
  border: 1px solid #1a73e8;
  color: #1a73e8;
  transition: all 0.8s;
}

.generate-btn:hover {
  background: #1a73e8;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.section-title {
  font-size: 24px;
  margin: 40px 0 20px;
  color: #1a1a1a;
}

.vocab-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 0 20px;
  justify-content: center;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 16px;
}

.card {
  background-color: #eef3fb;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  font-size: 16px;
  line-height: 1.4;
  word-wrap: break-word;
}

.vocab-grid,
.phrase-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 0 20px;
  justify-content: center;
  margin-bottom: 16px;
}

.tip {
  background-color: #eef3fb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  text-align: left;
  max-width: 900px;
  width: 100%;
  margin: 0 auto 20px;
}

.tip-card {
  margin-bottom: 20px;
}

.tip-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 12px;
  color: #1a73e8;
}

.tip-text {
  font-size: 16px;
  margin-bottom: 20px;
  color: #333;
  line-height: 1.6;
}

.example-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #555;
}

.tip-examples-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  column-gap: 20px;
  row-gap: 20px;
}

.card.example {
  background-color: #dce8f8;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  font-size: 16px;
  line-height: 1.4;
  text-align: center;
}

.card.example small {
  color: #777;
  display: block;
  margin-top: 8px;
}

#tipList {
  display: flex;
  flex-direction: column;
  gap: 16px;
}


.toggle-btn {
  margin: 20px auto 40px;
  padding: 14px 24px;
  width: calc(100% - 40px);
  max-width: 680px;
  border-radius: 30px;
  border: 1px solid #1a73e8;
  color: #1a73e8;
  background-color: white;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  display: block;
  font-size: 16px;
}

.toggle-btn:hover {
  background-color: #1a73e8;
  color: white;
}

.speak-btn {
  margin-left: 8px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #1a73e8;
}

#speaker-img{
  width: 20px;
  height: 20px;
}


.hidden {
  display: none;
}

#loading {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

#loading-gif {
  margin-top: 200px;
  width: 110px;
  height: 110px;
}

#backBtn {
  position: absolute;
}

#backBtn-img {
  width: 35px;
  height: 35px;
}

.languageSwitcher {
  position: absolute;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 15px;
  white-space: nowrap;
}

.languageSwitcher select {
  width: 120px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: white;
  cursor: pointer;
  font-size: 15px;
}

.languageSwitcher select:hover {
  background-color: #f0f0f0;
}

.user-menu {
  position: absolute;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  z-index: 1500;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f0f4f9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  border: 1px solid #c7c7c7;
  transition: background 0.3s;
}

.avatar:hover {
  background: #e8f0fe;
}

.user-popup {
  position: absolute;
  top: 55px;
  right: 0;
  width: 280px;
  background: white;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  padding: 16px;
}

.hidden {
  display: none;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.tab-btn {
  flex: 1;
  padding: 6px 0;
  border-radius: 20px;
  border: 1px solid #1a73e8;
  background: white;
  cursor: pointer;
  font-weight: bold;
}

.tab-btn.active {
  background: #1a73e8;
  color: white;
}

.auth-form input {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.full {
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
}

.divider {
  text-align: center;
  font-size: 13px;
  color: #5f6368;
  margin: 10px 0;
}

.google-btn {
  width: 100%;
  background: white;
  border: 1px solid #1a73e8;
  color: #1a73e8;
  border-radius: 30px;
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.8s;
}

.google-btn:hover {
  background: #1a73e8;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.user-name {
  font-weight: bold;
  margin-bottom: 4px;
}

.user-email {
  font-size: 13px;
  color: #5f6368;
  margin-bottom: 12px;
}

.logout {
  border-color: #d93025;
  color: #d93025;
}

.logout:hover {
  background: #d93025;
  color: white;
}

.save-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #1a73e8;
}

.save-btn:hover {
  transform: translateY(-50%) scale(1.2);
}

.save-btn.saved {
  color: gold;
}

@media (max-width: 768px) {

  .languageLabel{
    visibility: hidden;
  }

  .languageSwitcher select {
    font-size: 13px;
  }

  .header-title {
    font-size: 13px;
  }
}