:root {
  --primary: #0066ff;
  --primary-dark: #0052cc;
  --primary-light: #4d94ff;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 600px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-alt);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px;
}

header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.logo span {
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 16px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-danger {
  background: var(--error);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.2s;
  background: var(--bg);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
  font-size: 0.875rem;
}

.card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

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

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.form-group {
  margin-bottom: 20px;
}

.error {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 8px;
  display: none;
}

.error.visible {
  display: block;
}

.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  display: none;
}

.alert.visible {
  display: block;
}

.alert-error {
  background: #fef2f2;
  color: var(--error);
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: var(--success);
  border: 1px solid #bbf7d0;
}

.link-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  cursor: grab;
}

.link-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.link-card-content {
  flex: 1;
  min-width: 0;
}

.link-card-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.link-card-url {
  color: var(--text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-card-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all 0.2s;
}

.icon-btn:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.icon-btn.delete:hover {
  background: #fef2f2;
  color: var(--error);
}

.drag-handle {
  cursor: grab;
  color: var(--text-muted);
  padding-right: 12px;
}

.drag-handle:active {
  cursor: grabbing;
}

.pricing-card {
  text-align: center;
  padding: 32px;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  margin: 16px 0;
}

.pricing-price span {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin: 24px 0;
}

.pricing-features li {
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background: var(--success);
  border-radius: 50%;
  flex-shrink: 0;
}

.public-profile {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

.profile-header {
  text-align: center;
  padding: 40px 20px;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--bg-alt);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.profile-bio {
  color: var(--text-muted);
  line-height: 1.5;
}

.profile-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.profile-link {
  display: block;
  padding: 16px 24px;
  background: var(--bg);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}

.profile-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.profile-socials {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 32px;
}

.profile-socials a {
  font-size: 1.5rem;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.profile-socials a:hover {
  opacity: 1;
}

.powered-by {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.powered-by a {
  color: var(--primary);
  text-decoration: none;
}

.landing-hero {
  text-align: center;
  padding: 60px 20px;
}

.landing-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text);
}

.landing-hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.feature-card {
  background: var(--bg);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.wallet-address {
  background: var(--bg-alt);
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  word-break: break-all;
  font-family: monospace;
  font-size: 0.875rem;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 480px) {
  .container {
    padding: 16px;
  }
  
  .landing-hero h1 {
    font-size: 2rem;
  }
  
  .card {
    padding: 20px;
  }
  
  .link-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .link-card-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
