* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #FFFFFF;
  color: #000000;
  overflow-x: hidden;
}

#whitelabel {
  width: 100%;
  min-height: 100vh;
  background-color: #FFFFFF;
  /* Offset for Telegram header in fullscreen mode */
  padding-top: calc(var(--tg-content-safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px));
}

#whitelabel iframe {
  border: none;
  width: 100%;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #FFFFFF;
  border-top: 1px solid #E5E5E5;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 1000;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #8E8E93;
  font-size: 10px;
  padding: 8px 16px;
}

.nav-item.active {
  color: #94CA21;
}

.nav-icon {
  font-size: 24px;
  margin-bottom: 2px;
}

.nav-label {
  font-weight: 500;
}

/* Profile Page */
#profile-container {
  padding-top: calc(var(--tg-content-safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px) + 16px);
  padding-bottom: 80px;
  padding-left: 16px;
  padding-right: 16px;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #94CA21;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.profile-name {
  font-size: 20px;
  font-weight: 600;
}

.profile-section {
  margin-bottom: 24px;
}

.section-title {
  font-size: 13px;
  color: #8E8E93;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-left: 4px;
}

.profile-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #F5F5F5;
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
}

.profile-item:active {
  background: #EBEBEB;
}

.profile-icon {
  width: 24px;
  margin-right: 12px;
  text-align: center;
}

.profile-item span:nth-child(2) {
  flex: 1;
  font-size: 16px;
}

.profile-arrow {
  color: #C7C7CC;
  font-size: 20px;
}

/* Language Modal */
.language-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: flex-end;
  z-index: 2000;
}

.language-modal.open {
  display: flex;
}

.language-modal-content {
  background: #FFFFFF;
  width: 100%;
  max-height: 70vh;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.language-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #E5E5E5;
  font-weight: 600;
  font-size: 17px;
}

.language-close {
  font-size: 28px;
  color: #8E8E93;
  cursor: pointer;
}

.language-list {
  max-height: calc(70vh - 60px);
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.language-item {
  padding: 14px 20px;
  font-size: 16px;
  cursor: pointer;
}

.language-item:active {
  background: #F5F5F5;
}

.language-item.active {
  color: #94CA21;
  font-weight: 600;
}

/* Adjust whitelabel container for navigation */
body[data-step="search"] #whitelabel,
body[data-step="results"] #whitelabel {
  padding-bottom: 70px;
}
