@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Roboto:wght@400;500&display=swap');

* { box-sizing: border-box; }

body {
  font-family: 'Google Sans', 'Roboto', Arial, sans-serif;
  margin: 0;
  background-color: #ffffff;
  color: #3c4043;
}

/* Hlavička */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  height: 64px;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 4px;
}
.menu-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #5f6368;
}
.menu-icon:hover { background: #f1f3f4; }
.logo-container {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 22px;
  color: #5f6368;
  padding-left: 8px;
}
.google-logo {
  height: 26px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #5f6368;
}
.icon-btn:hover { background: #f1f3f4; }

.btn-login {
  background-color: #0b57d0;
  color: white;
  padding: 10px 24px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 14px;
  border: none;
  cursor: pointer;
  margin-left: 8px;
  transition: background-color .2s;
  font-family: inherit;
}
.btn-login:hover { background-color: #0842a0; }
.btn-login.active-test { background-color: #3c4043; }

/* Hlavní kontejner */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 80px;
}

/* Mode buttons */
.mode-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.mode-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
  height: 40px;
  border-radius: 20px;
  border: 1px solid #dadce0;
  font-size: 14px;
  font-weight: 500;
  color: #3c4043;
  cursor: pointer;
  background: white;
  user-select: none;
}
.mode-btn:hover { background: #f8f9fa; }
.mode-btn.active {
  background-color: #d3e3fd;
  color: #0b57d0;
  border-color: #d3e3fd;
}
.mode-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* Lang bar */
.lang-bar {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #dadce0;
}
.lang-group {
  display: flex;
  flex: 1;
  align-items: center;
  position: relative;
}
.lang-tab {
  font-size: 14px;
  font-weight: 500;
  color: #5f6368;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  user-select: none;
  white-space: nowrap;
}
.lang-tab:hover {
  color: #3c4043;
}
.lang-tab.active {
  color: #0b57d0;
  border-bottom: 3px solid #0b57d0;
}
.lang-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #5f6368;
  cursor: pointer;
  border-radius: 50%;
  margin-left: auto;
  margin-right: 4px;
}
.lang-dropdown-btn:hover { background: #f1f3f4; }

.swap-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5f6368;
  cursor: pointer;
  margin: auto 8px;
  align-self: center;
}
.swap-btn:hover { background: #f1f3f4; }

/* Translation area */
.translation-area {
  display: flex;
  gap: 12px;
  min-height: 220px;
  margin-top: 12px;
}
.box {
  flex: 1;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 220px;
}
.box.input-box {
  border: 1px solid #dadce0;
  background: #ffffff;
}
.box.input-box:focus-within {
  border-color: #0b57d0;
  border-width: 2px;
  padding: 0;
  margin: -1px;
}
.box.output-box {
  background: #f1f3f4;
  border: 1px solid transparent;
}
textarea {
  flex: 1;
  background: transparent;
  border: none;
  padding: 20px;
  padding-bottom: 0;
  font-size: 24px;
  line-height: 32px;
  font-family: inherit;
  resize: none;
  outline: none;
  color: #202124;
  width: 100%;
}
textarea::placeholder {
  color: #70757a;
}
.box-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  color: #5f6368;
  min-height: 56px;
}
.footer-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
}
.footer-icon:hover { background: rgba(0,0,0,0.06); }

.feedback-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.feedback-row a {
  color: #5f6368;
  font-size: 12px;
  text-decoration: none;
}
.feedback-row a:hover { text-decoration: underline; }

/* History */
.history-bar {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 80px;
}
.history-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #5f6368;
  font-size: 14px;
  cursor: pointer;
}
.history-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid #dadce0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  color: #5f6368;
}
.history-icon:hover { background: #f8f9fa; }

.loading-text {
  position: absolute;
  bottom: 72px;
  left: 20px;
  font-size: 14px;
  color: #70757a;
  display: none;
}

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 100;
  padding: 8px 0;
  display: none;
}
.dropdown-menu.show { display: block; }
.dropdown-item {
  padding: 10px 20px;
  font-size: 14px;
  color: #3c4043;
  cursor: pointer;
  user-select: none;
}
.dropdown-item:hover { background: #f1f3f4; }
.dropdown-item.selected {
  color: #0b57d0;
  font-weight: 500;
}