:root {
  --bg-primary: #f2f2f7;
  --bg-secondary: #ffffff;
  --text-primary: #000000;
  --text-secondary: #6e6e73;
  --accent: #00A99D;
  --accent-hover: #007A70;
  --success: #34c759;
  --error: #ff3b30;
  --border: #c6c6c8;
  --popular: #ff9500;
  --bg-elevated: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #000000;
    --bg-secondary: #1c1c1e;
    --text-primary: #ffffff;
    --text-secondary: #8e8e93;
    --accent: #00C2B2;
    --accent-hover: #00A99D;
    --success: #30d158;
    --error: #ff453a;
    --border: #38383a;
    --popular: #ffd60a;
    --bg-elevated: #1c1c1e;
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.artist-header {
  text-align: center;
  padding: 30px 20px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 15px;
}

.artist-photo {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px;
  border: 4px solid var(--bg-elevated);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.artist-name {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.venue-info {
  color: var(--text-secondary);
  font-size: 14px;
  font-style: italic;
}

.bio-section {
  margin-top: 15px;
}

.bio-toggle {
  color: var(--accent);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.bio-content {
  /*display: none;*/
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  max-width: 400px;
  margin: 0 auto;
}

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

.container {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  flex: 1;
}

.social-proof {
  background: var(--bg-elevated);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--border);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(48,209,88,0.7); }
  70% { box-shadow: 0 0 0 10px rgba(48,209,88,0); }
  100% { box-shadow: 0 0 0 0 rgba(48,209,88,0); }
}

.section-header {
  text-align: center;
  margin-bottom: 24px;
}

.section-header .section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-header .section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 320px;
  margin: 0 auto;
}

.amount-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.amount-btn {
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 24px 16px;
  cursor: pointer;
  transition: all .2s;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.amount-btn:active {
  transform: scale(.95);
}

.amount-btn.selected {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.amount-btn.selected .amount-context {
  color: rgba(255,255,255,0.9);
}

.amount-btn.popular {
  border-color: var(--popular);
}

.popular-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--popular);
  color: black;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.amount-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.amount-context {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.custom-amount {
  width: 100%;
  padding: 20px;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: 16px;
  font-size: 18px;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 16px;
  -webkit-appearance: none;
  transition: border-color .2s ease;
}

.custom-amount:focus,
.custom-amount.selected {
  outline: none;
  border-color: var(--accent);
}

.custom-amount::placeholder {
  color: var(--text-secondary);
}

/* Styles for the message explaining the tip limit */
.custom-amount-message {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 10px 16px;
  background-color: var(--bg-elevated);
  border-radius: 12px;
  margin-top: -10px; /* Pulls it closer to the input field */
  margin-bottom: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  line-height: 1.4;
}

/* Shake animation for the input field */
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}
.shake-animation {
  animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
}

.fee-disclaimer {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 20px;
}

.pay-button {
  width: 100%;
  padding: 18px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 20px;
}

.pay-button:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: scale(1.02);
}

.pay-button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-secondary);
  font-size: 12px;
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

.payment-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-radius: 24px 24px 0 0;
  padding: 20px 20px 32px;
  transform: translateY(100%);
  transition: transform .3s ease-out;
  z-index: 1000;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
}

.payment-sheet.active {
  transform: translateY(0);
}

.sheet-indicator {
  width: 36px;
  height: 5px;
  background: var(--text-secondary);
  border-radius: 3px;
  margin: 0 auto 20px;
  opacity: .5;
}

.selected-amount-display {
  text-align: center;
  margin-bottom: 24px;
}

.amount-value-large {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.change-amount {
  color: var(--accent);
  font-size: 16px;
  text-decoration: none;
  font-weight: 500;
}

#payment-request-button {
  margin-bottom: 20px;
  min-height: 56px;
}

.payment-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
  color: var(--text-secondary);
  font-size: 14px;
}

.payment-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
  z-index: -1;
}

.payment-divider span {
  background: var(--bg-secondary);
  padding: 0 16px;
  position: relative;
}

.card-button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 18px 32px;
  border-radius: 28px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all .2s;
  min-height: 56px;
}

.card-button:active {
  transform: scale(.98);
}

#card-element {
  background: var(--bg-elevated);
  padding: 16px;
  border-radius: 12px;
  border: 2px solid var(--border);
  margin-bottom: 20px;
  transition: opacity .3s ease-in-out;
}

#pay-now-button {
  transition: opacity .3s ease-in-out;
}

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all .3s;
  z-index: 999;
}

.backdrop.active {
  opacity: 1;
  visibility: visible;
}

.loading {
  color: var(--text-secondary);
  text-align: center;
  padding: 20px;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.goal-tracker {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
}

.goal-label {
  color: var(--text-primary);
}

.goal-progress-text {
  color: var(--text-secondary);
}

.progress-bar-background {
  width: 100%;
  height: 8px;
  background-color: var(--bg-primary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--accent);
  border-radius: 4px;
  transition: width .5s ease-out;
}
