:root {
  --tg-theme-bg-color: #17212b;
  --tg-theme-secondary-bg-color: #232e3c;
  --tg-theme-text-color: #ffffff;
  --tg-theme-hint-color: #7d8b99;
  --tg-theme-button-color: #5288c1;
  --tg-theme-button-text-color: #ffffff;

  --bg: var(--tg-theme-bg-color);
  --card-bg: var(--tg-theme-secondary-bg-color);
  --text: var(--tg-theme-text-color);
  --hint: var(--tg-theme-hint-color);
  --accent: var(--tg-theme-button-color);
  --accent-text: var(--tg-theme-button-text-color);
  --gold: #f59e0b;
  --purple: #a855f7;
  --danger: #ef4444;
  --success: #22c55e;
  --border-glass: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 12px calc(80px + env(safe-area-inset-bottom, 0px)) 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

button, select {
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto !important;
  touch-action: manipulation;
}

input, textarea {
  user-select: text;
  -webkit-user-select: text;
  pointer-events: auto !important;
  touch-action: manipulation;
}

input, textarea, select, button {
  font-family: inherit !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-viewport {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-around;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px)) 4px;
  z-index: 100;
  max-width: 480px;
  margin: 0 auto;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--hint);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: color 0.15s ease, transform 0.12s ease;
}

.tab-btn:active {
  transform: scale(0.92);
}

.tab-btn.active {
  color: var(--accent);
}

.tab-content {
  display: none;
  animation: tabFadeIn 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.tab-content.active {
  display: block;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translate3d(0, 6px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-box {
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 11px;
  color: var(--hint);
  margin-bottom: 4px;
}

.stat-val {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.coin-icon {
  width: 15px;
  height: 15px;
  min-width: 15px;
  display: inline-block;
  vertical-align: middle;
}

.svg-tag-icon {
  width: 32px;
  height: 32px;
  display: inline-block;
}

#feedback-text-input {
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.1px;
}