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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.popup-container {
  width: 260px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

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

.header h3 {
  color: #2d3748;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.status-message {
  background: #fed7d7;
  color: #c53030;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  border: 1px solid #feb2b2;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.button-row {
  display: flex;
  gap: 8px;
}

.half-width {
  flex: 1;
}

.copy-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: white;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  font-weight: 500;
  color: #2d3748;
  min-height: 46px;
  position: relative;
  overflow: hidden;
}

.copy-btn:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.copy-btn:active {
  transform: translateY(0);
  transition: transform 0.1s ease;
}

.copy-btn.copying {
  background: linear-gradient(135deg, #48bb78, #38a169);
  border-color: #38a169;
  color: white;
  transform: scale(0.98);
}

.copy-btn.success {
  background: linear-gradient(135deg, #48bb78, #38a169);
  border-color: #38a169;
  color: white;
}

.copy-btn.error {
  background: linear-gradient(135deg, #f56565, #e53e3e);
  border-color: #e53e3e;
  color: white;
}

.copy-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-icon {
  font-size: 15px;
  margin-right: 6px;
}

.btn-text {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0; /* Allow shrinking */
}

.copy-btn:not(.half-width) {
  justify-content: center;
}

.copy-btn:not(.half-width) .btn-text {
  text-align: center;
}

.btn-status {
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
}

.copy-btn.copying .btn-status,
.copy-btn.success .btn-status,
.copy-btn.error .btn-status {
  opacity: 1;
}

/* Ripple effect */
.copy-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(102, 126, 234, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.copy-btn:active::before {
  width: 300px;
  height: 300px;
}