/* =============== Global Button System =============== */
/* 
 * Centralized button styles for maintainability
 * Button variants: primary, secondary, outline, ghost, danger, icon
 */

/* =============== Base Button Styles =============== */
button,
.btn {
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  border: none;
  transition: all 0.3s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  line-height: 1;
}

button:disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* =============== Primary Button (Main Actions) =============== */
.btn-primary {
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
  color: white !important;
  border: none;
  box-shadow: 0 4px 10px rgba(155, 89, 182, 0.4);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(155, 89, 182, 0.6);
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  color: white !important;
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(155, 89, 182, 0.5);
}

/* =============== Secondary Button (Alternative Actions) =============== */
.btn-secondary {
  background-color: var(--accent-color);
  color: white;
  border: none;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: var(--accent-color-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
}

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

/* =============== Outline Button (Less Emphasis) =============== */
.btn-outline {
  background: rgba(155, 89, 182, 0.15);
  border: 2px solid var(--accent-color);
  color: var(--text-color);
  text-decoration: none;
}

.btn-outline:hover {
  background: rgba(155, 89, 182, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
}

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

/* =============== Ghost Button (Minimal Styling) =============== */
.btn-ghost {
  background-color: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-color);
  text-decoration: none;
}

.btn-ghost:hover {
  background-color: var(--hover-bg);
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-2px);
}

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

/* =============== Danger Button (Destructive Actions) =============== */
.btn-danger {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border: none;
  box-shadow: 0 4px 10px rgba(231, 76, 60, 0.4);
  text-decoration: none;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(231, 76, 60, 0.6);
  background: linear-gradient(135deg, #c0392b, #e74c3c);
}

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

/* =============== Icon Button (Small, Icon-Only) =============== */
.btn-icon {
  padding: 10px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background: rgba(155, 89, 182, 0.15);
  border: none;
  color: var(--text-color);
}

.btn-icon:hover {
  background: rgba(155, 89, 182, 0.3);
  transform: scale(1.1);
}

.btn-icon:active {
  transform: scale(0.95);
}

/* =============== Button Sizes =============== */
.btn-small {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.125rem;
}

/* =============== Button Shapes =============== */
.btn-rounded {
  border-radius: 25px;
}

.btn-square {
  border-radius: 4px;
}

/* =============== Full Width Button =============== */
.btn-block {
  width: 100%;
  display: flex;
}

/* =============== Button Groups =============== */
.button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.button-group.align-left {
  justify-content: flex-start;
}

.button-group.align-right {
  justify-content: flex-end;
}

/* =============== Special Purpose Buttons =============== */

/* Floating Action Button */
.btn-floating {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--accent-color);
  color: white;
  border: none;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(155, 89, 182, 0.6);
  z-index: 100;
}

.btn-floating:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 18px rgba(155, 89, 182, 0.8);
}

/* Link-style button (looks like link but is button) */
.btn-link {
  background: none;
  border: none;
  color: #a879ff;
  padding: 0;
  text-decoration: underline;
  font-weight: normal;
}

.btn-link:hover {
  color: var(--accent-color);
  transform: none;
}

/* Back button with arrow - minimalistic style */
.btn-back {
  background: transparent;
  border: none;
  color: var(--accent-color);
  font-weight: 500;
  padding: 10px 0;
  text-decoration: none;
  gap: 8px;
}

.btn-back:hover {
  color: var(--accent-hover);
  transform: translateX(-5px);
  box-shadow: none;
}

/* Tag remove button */
.btn-remove {
  background: none;
  border: none;
  color: #e74c3c;
  padding: 0 0.3rem;
  font-size: 1.2rem;
  margin-left: 0.5rem;
}

.btn-remove:hover {
  opacity: 0.8;
  transform: scale(1.1);
}

/* YouTube button (red) */
.btn-youtube {
  display: inline-block;
  padding: 15px 40px;
  background: #FF0000;
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
  border: none;
}

.btn-youtube:hover {
  background: #CC0000;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.6);
}

/* Hero secondary button (adaptive variant for light and dark modes) */
.hero-secondary {
  background: transparent;
  color: var(--text-color) !important;
  border: 2px solid var(--text-color);
  text-decoration: none;
}

.hero-secondary:hover {
  background: var(--accent-color);
  color: white !important;
  border-color: var(--accent-color);
  text-decoration: none;
}

/* =============== Responsive Adjustments =============== */
@media screen and (max-width: 768px) {
  button,
  .btn {
    padding: 10px 20px;
    font-size: 0.95rem;
  }

  .btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .btn-large {
    padding: 14px 28px;
    font-size: 1.05rem;
  }

  .button-group {
    gap: 0.75rem;
  }

  .btn-floating {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}
