:root {
  --primary: #00d2ff;
  --theme-green: #0d652d;
  --theme-light-green: #eaffea;
  --theme-border-green: #0f9d58;
}

body {
  font-family: 'Product Sans', sans-serif;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.top-bar {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 100;
}

.lang-dropdown {
  position: relative;
}

.grid-icon {
  color: #0d652d;
  cursor: pointer;
  font-size: 28px;
  transition: transform 0.2s;
}

.grid-icon:hover {
  transform: scale(1.1);
}

.lang-menu {
  position: absolute;
  top: 40px;
  right: 0;
  background: white;
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  width: 160px;
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.lang-menu div {
  padding: 10px 15px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  border-bottom: 1px solid #f1f3f4;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-menu div:last-child {
  border-bottom: none;
}

.lang-menu div:hover {
  background: #f8f9fa;
}

.login-btn {
  background-color: #0f9d58 !important;
  color: #ffffff !important;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.login-btn:hover {
  background-color: #0b8043 !important;
  transform: scale(1.03);
}

.logout-btn {
  background: #f1f3f4;
  border: 1px solid #dadce0;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}

.user-greeting { font-weight: bold; color: #333; margin-right: 10px; }

.custom-float-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  cursor: grab;
  background: #fff;
  border: 2px solid var(--primary);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  animation: pulse-minute 30s infinite;
}

.custom-float-btn img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
  z-index: 2;
  animation: constant-wave 2s infinite linear;
}

.custom-float-btn::before, .custom-float-btn::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  z-index: 1;
  animation: ripple-wave 3s infinite linear;
  pointer-events: none;
}
.custom-float-btn::after { animation-delay: 1.5s; }

@keyframes ripple-wave {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}
@keyframes pulse-minute {
  0%, 95%, 100% { transform: scale(1); box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
  97.5% { transform: scale(1.15); box-shadow: 0 0 25px var(--primary); }
}
@keyframes constant-wave {
  0% { transform: translateY(0px); }
  25% { transform: translateY(-2px); }
  50% { transform: translateY(0px); }
  75% { transform: translateY(2px); }
  100% { transform: translateY(0px); }
}

.container {
  text-align: center;
  width: 100%;
  max-width: 650px;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
}

.logo-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 350px;
  margin: 0 auto 20px auto;
}

#mainLogo {
  width: 100%;
  max-width: 350px;
  height: auto;
  display: block;
  animation: wave-logo-min 60s infinite;
}

.subtitle {
  text-align: left;
  font-size: 14px;
  font-weight: bold;
  color: #0d652d;
  margin-top: 4px;
  margin-left: 12px;
  position: relative;
  z-index: 2;
  white-space: nowrap;
}

@keyframes wave-logo-min {
  0%, 98%, 100% { transform: translateY(0px) rotate(0deg); }
  98.5% { transform: translateY(-5px) rotate(-3deg); }
  99% { transform: translateY(0px) rotate(0deg); }
  99.5% { transform: translateY(5px) rotate(3deg); }
}

.search-wrapper {
  position: relative;
  width: 100%;
  margin-top: 10px;
}

.search-container {
  display: flex;
  align-items: center;
  border: 2px solid var(--theme-border-green);
  border-radius: 30px;
  padding: 0 8px 0 16px;
  background: #ffffff;
  height: 52px;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.search-prefix {
  color: #0d652d;
  font-size: 24px;
  margin-right: 10px;
}

#search-input {
  flex: 1;
  height: 100%;
  border: none !important;
  outline: none !important;
  font-size: 16px;
  min-width: 20%;
  background: transparent !important;
  color: #333;
}

.icons-right {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.mic-btn, .lens-btn, .ia-btn {
  cursor: pointer;
  color: #0d652d;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.mic-btn:hover, .lens-btn:hover, .ia-btn:hover {
  transform: scale(1.15);
}

.submit-arrow-btn {
  background: var(--theme-border-green);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: white;
  transition: background 0.2s;
}

.submit-arrow-btn:hover { background: #0b8043; }
.submit-arrow-btn .material-icons { font-size: 20px; }

#history-list {
  list-style: none;
  padding: 10px 0;
  margin: 0;
  text-align: left;
  background: white;
  border: 2px solid var(--theme-border-green);
  border-top: none;
  border-radius: 0 0 24px 24px;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  position: absolute;
  top: 50px;
  left: 0;
  right: 0;
  box-shadow: 0 6px 10px rgba(0,0,0,0.1);
  z-index: 5;
}

#history-list li {
  padding: 8px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #333;
}

#history-list li::before {
  content: 'history';
  font-family: 'Material Icons';
  color: #9aa0a6;
  font-size: 18px;
}
#history-list li:hover { background: #f1f3f4; }

.action-buttons-row {
  margin-top: 35px;
  display: flex;
  gap: 15px;
  justify-content: center;
  width: 100%;
}

.action-card {
  flex: 1;
  background: var(--theme-light-green);
  border: none;
  border-radius: 12px;
  padding: 15px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--theme-green);
  transition: transform 0.2s, background 0.2s;
  min-width: 0; 
}

.action-card:hover {
  transform: translateY(-2px);
  background: #dcf2e0;
}

.action-card .material-icons {
  font-size: 32px;
  margin-bottom: 8px;
}

.action-text {
  font-size: clamp(12px, 3.5vw, 16px);
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.modal-content {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  position: relative;
  text-align: center;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #5f6368;
}

.modal h2 { margin-top: 0; font-size: 20px; color: var(--theme-green); }

.custom-select, .modal input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid var(--theme-border-green);
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
}

.modal-action-btn {
  background: var(--theme-border-green);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
}

.modal-action-btn:hover { background: #0b8043; }

.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
  border-bottom: 1px solid #dadce0;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
  font-size: 16px;
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: var(--theme-border-green);
  border-bottom: 2px solid var(--theme-border-green);
  font-weight: bold;
}

#authMsg { margin-top: 10px; font-size: 14px; color: #d93025; }
.hidden { display: none !important; }

.simple-footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  text-align: center;
  padding: 10px;
  font-size: 12px;
  color: #888;
  background-color: transparent;
}

@media (max-width: 480px) {
  .logo-area { max-width: 250px; }
  #mainLogo { max-width: 250px; }
  .subtitle { font-size: 12px; margin-left: 6px; }
  .search-container { padding: 0 6px 0 12px; }
  .search-prefix { font-size: 20px; margin-right: 5px; }
  .icons-right { gap: 8px; }
  .mic-btn, .lens-btn, .ia-btn { font-size: 20px; }
  .submit-arrow-btn { width: 32px; height: 32px; }
  
  .action-buttons-row {
      gap: 10px; 
  }
  .action-card {
      padding: 10px 2px;
  }
  .action-card .material-icons {
      font-size: 26px;
  }
  .action-text {
      font-size: 11px; 
      white-space: normal; 
  }
}