/* ============================================================================
   BUTTON COMPONENTS - Modern & Beautiful Design
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
  font-family: inherit;
  line-height: 1.5;
  min-height: 48px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:active {
  transform: translateY(1px);
}

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

.btn:disabled:hover::before {
  left: -100%;
}

/* ============================================================================
   BUTTON VARIANTS
   ============================================================================ */

/* Primary Button */
.btn-primary {
  background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
  color: #000;
  border-color: #00ff88;
  box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #00cc6a 0%, #00ff88 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

/* Secondary Button */
.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Success Button */
.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-color: #10b981;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Warning Button */
.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border-color: #f59e0b;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

/* Danger Button */
.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border-color: #ef4444;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* Info Button */
.btn-info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border-color: #3b82f6;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-info:hover {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* ============================================================================
   BUTTON SIZES
   ============================================================================ */

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  min-height: 36px;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
  min-height: 56px;
}

.btn-xl {
  padding: 1.25rem 2.5rem;
  font-size: 1.25rem;
  min-height: 64px;
}

/* ============================================================================
   BUTTON STYLES
   ============================================================================ */

/* Outline Button */
.btn-outline {
  background: transparent;
  border-width: 2px;
}

.btn-outline.btn-primary {
  color: #00ff88;
  border-color: #00ff88;
}

.btn-outline.btn-primary:hover {
  background: rgba(0, 255, 136, 0.1);
  color: #00ff88;
}

.btn-outline.btn-secondary {
  color: var(--color-text-primary);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-text-primary);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Icon Button */
.btn-icon {
  padding: 0.75rem;
  min-width: 48px;
  min-height: 48px;
  border-radius: 12px;
}

.btn-icon.btn-sm {
  padding: 0.5rem;
  min-width: 36px;
  min-height: 36px;
}

.btn-icon.btn-lg {
  padding: 1rem;
  min-width: 56px;
  min-height: 56px;
}

/* ============================================================================
   BUTTON GROUPS
   ============================================================================ */

.btn-group {
  display: inline-flex;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-group .btn {
  border-radius: 0;
  margin: 0;
  border-right-width: 1px;
}

.btn-group .btn:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.btn-group .btn:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  border-right-width: 2px;
}

.btn-group .btn:not(:last-child) {
  border-right-color: rgba(255, 255, 255, 0.2);
}

/* ============================================================================
   LOADING STATE
   ============================================================================ */

.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    min-height: 44px;
  }
  
  .btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    min-height: 52px;
  }
  
  .btn-xl {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    min-height: 60px;
  }
  
  .btn-group {
    flex-direction: column;
    border-radius: 12px;
  }
  
  .btn-group .btn {
    border-radius: 0;
    border-right-width: 2px;
    border-bottom-width: 1px;
  }
  
  .btn-group .btn:first-child {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom-left-radius: 0;
  }
  
  .btn-group .btn:last-child {
    border-top-right-radius: 0;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    border-bottom-width: 2px;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
    min-height: 40px;
  }
  
  .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    min-height: 32px;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    min-height: 48px;
  }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
  
  .btn::before {
    display: none;
  }
  
  .btn.loading::after {
    animation: none;
  }
}

@media (prefers-contrast: high) {
  .btn {
    border-width: 3px;
  }
  
  .btn-outline {
    border-width: 3px;
  }
}

/* ============================================================================
   FOCUS STATES
   ============================================================================ */

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 255, 136, 0.3);
}

.btn:focus:not(:focus-visible) {
  box-shadow: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 255, 136, 0.3);
}

/* ============================================================================
   PREMIUM BUTTON
   ============================================================================ */

.btn-premium, 
.btn.btn-premium {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #18181b;
  border-color: #ffd700;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-premium:hover,
.btn.btn-premium:hover {
  background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
  filter: brightness(1.1);
}

.btn-premium:active,
.btn.btn-premium:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-premium:focus,
.btn.btn-premium:focus {
  box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.3);
}

/* Premium Outline Variant */
.btn-outline.btn-premium {
  background: transparent;
  color: #ffd700;
  border-color: #ffd700;
}

.btn-outline.btn-premium:hover {
  background: rgba(255, 215, 0, 0.1);
  color: #ffd700;
  border-color: #ffd700;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}