/* Main Content */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  min-height: 100vh;
}

.tips-container {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--lm-backgroundOffset);
  position: relative;
}

/* Input Screen */
.input-screen {
  display: block;
}

.input-screen.hidden {
  display: none;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--lm-text);
}

.profile-section {
  text-align: center;
  margin-bottom: 3rem;
}

.avatar-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--lm-background);
  padding: 1rem 1.5rem;
  border-radius: 50px;
  display: inline-flex;
}

.avatar:first-child {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary_color),
    var(--tertiary_color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.username-display {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--lm-text);
  text-transform: capitalize;
}

.amount-section {
  margin-bottom: 2.5rem;
}

.amount-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 120px;
}

.dollar-sign {
  font-size: 80px;
  color: var(--lm-text);
  font-weight: 300;
  line-height: 1;
}

.amount-input {
  background: transparent;
  border: none;
  color: var(--lm-text);
  font-size: 80px;
  font-weight: 300;
  width: 3ch;
  min-width: 1ch;
  text-align: left;
  outline: none;
  font-family: inherit;
  padding: 0;
}

.amount-input::placeholder {
  color: #999;
}

.tip-button {
  width: 100%;
  padding: 1.2rem;
  background: var(--lm-backgroundOffset);
  color: #999;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: not-allowed;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
  font-family: var(--description_font);
}

.tip-button.active {
  background: linear-gradient(
    135deg,
    var(--primary_color),
    var(--tertiary_color)
  );
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(3, 117, 246, 0.3);
}

.tip-button.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(3, 117, 246, 0.4);
}

.currency-button {
  width: 100%;
  padding: 0.8rem;
  background: transparent;
  border: 1px solid var(--lm-backgroundOffset);
  color: var(--lm-text);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  font-family: var(--description_font);
}

.currency-button:hover {
  border-color: var(--primary_color);
  color: var(--primary_color);
}

/* Currency Dropdown */
.currency-dropdown {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  border-radius: 24px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10;
}

.currency-dropdown.active {
  max-height: 100%;
  opacity: 1;
}

.currency-search {
  width: calc(100% - 2rem);
  margin: 1rem;
  padding: 1rem;
  background: var(--lm-background);
  border: 1px solid var(--lm-backgroundOffset);
  border-radius: 12px;
  color: var(--lm-text);
  outline: none;
  font-family: var(--description_font);
  font-size: 1rem;
}

.currency-search:focus {
  border-color: var(--primary_color);
}

.currency-list {
  max-height: calc(100% - 100px);
  overflow-y: auto;
  padding: 0 1rem 1rem;
}

.currency-item {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 8px;
}

.currency-item:hover {
  background: var(--lm-background);
}

.currency-code {
  color: var(--lm-text);
  font-weight: 600;
}

.currency-name {
  color: var(--lm-text);
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Invoice Screen */
.invoice-screen {
  display: none;
}

.invoice-screen.active {
  display: flex;
  flex-direction: column;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--lm-backgroundOffset);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.avatar:last-child {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary_color),
    var(--tertiary_color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
}

.amount-badge {
  background: var(--lm-background);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--lm-text);
}

.tips-container .qr-wrapper {
  width: 90%;
  max-width: 330px;
  background: var(--lm-background);
  border-radius: 16px;
  padding: 3%;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  align-self: center;
}

#invoice-qr-code {
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
  padding: 6%;
  border-radius: 12px;
}

.qr-hint {
  color: var(--lm-text);
  font-size: 0.8rem;
  text-align: center;
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.qr-hint svg {
  width: 18px;
  height: 18px;
}

.verify-text {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--lm-text);
  font-size: 0.9rem;
  opacity: 0.8;
}

.verify-text.success {
  color: #22c55e;
  font-weight: 600;
  font-size: 1.1rem;
  opacity: 1;
}

.info-section {
  background: var(--lm-background);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-row:not(:last-child) {
  border-bottom: 1px solid #e0e0e0;
}

.info-label {
  color: var(--lm-text);
  font-size: 0.95rem;
  opacity: 0.8;
}

.info-value {
  color: var(--lm-text);
  font-size: 0.95rem;
  font-weight: 600;
}

.action-button {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 0.8rem;
  font-family: var(--description_font);
}

.action-button.primary {
  background: linear-gradient(
    135deg,
    var(--primary_color),
    var(--tertiary_color)
  );
  color: white;
  box-shadow: 0 4px 15px rgba(3, 117, 246, 0.3);
}

.action-button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(3, 117, 246, 0.4);
}

.action-button.secondary {
  background: transparent;
  color: var(--lm-text);
  border: 1px solid var(--lm-backgroundOffset);
}

.action-button.secondary:hover {
  background: var(--lm-background);
}

/* Footer */
footer {
  background: var(--lm-backgroundOffset);
  padding: 3rem 2rem 2rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: var(--primary_color);
}

.footer-brand p {
  opacity: 0.8;
  line-height: 1.7;
  font-size: 0.95rem;
}

.footer-links h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--lm-text);
  text-decoration: none;
  opacity: 0.8;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--primary_color);
  opacity: 1;
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #d0d0d0;
  opacity: 0.7;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .tips-container {
    padding: 2rem 1.5rem;
  }

  .page-title {
    font-size: 1.6rem;
  }

  .dollar-sign,
  .amount-input {
    font-size: 60px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  main {
    padding: 6rem 1rem 2rem;
  }
}

/* Loading State */
.tip-button:disabled {
  opacity: 0.7;
}
