/*!
=========================================================================
  Smart Scroll-to-Top / Back-to-Top Widget
  Author: Placeofidea
  Version: 1.0
  Website: https://codecanyon.net/user/placeofidea
  License: Regular or Extended License on CodeCanyon
  Description: Styles for the customizable scroll-to-top button, including
               animations, position, and theme colors.
=========================================================================
 Copyright © 2025 Placeofidea. All rights reserved.
=========================================================================
*/


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

:root {
  --color-primary: #0070f3;
  --color-primary-hover: #0051cc;
  --color-accent: #7928ca;
  --color-accent-hover: #5e22a3;
  --color-secondary: #6b7280;
  --color-secondary-hover: #4b5563;
  --color-background: #ffffff;
  --color-card: #f9fafb;
  --color-border: #e5e7eb;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --radius: 0.5rem;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-small {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, rgba(0, 112, 243, 0.05), var(--color-background));
  padding: 2rem 1rem;
  position: relative;
}

.hero-content {
  max-width: 900px;
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.badge {
  background-color: var(--color-accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  animation: bounce 2s infinite;
}

.scroll-indicator p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Configuration Section */
.config-section {
  background-color: var(--color-card);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 4rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.config-card {
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.config-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.radio-label input[type="radio"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background-color: var(--color-background);
  cursor: pointer;
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.switch-label input[type="checkbox"] {
  width: 2.5rem;
  height: 1.25rem;
  cursor: pointer;
}

.switch-text {
  font-size: 0.875rem;
}

/* Features Section */
.features-section {
  padding: 4rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 112, 243, 0.1);
  border-radius: var(--radius);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

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

/* Usage Section */
.usage-section {
  background-color: rgba(0, 0, 0, 0.02);
  border-top: 1px solid var(--color-border);
  padding: 4rem 0;
}

.code-card {
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.code-block {
  background-color: var(--color-secondary);
  color: white;
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.875rem;
  font-family: "Courier New", monospace;
}

/* Content Section */
.content-section {
  padding: 4rem 0;
}

.content-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.content-text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.content-text p {
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Footer Section */
.footer {
  background-color: var(--color-card);
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-text {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.footer-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* Scroll to Top Button */
#scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: white;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  z-index: 1000;
}

#scroll-to-top:hover {
  transform: scale(1.1);
  background-color: var(--color-primary-hover);
}

#scroll-to-top:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

#scroll-to-top.visible {
  display: flex;
}

/* Size variations */
#scroll-to-top.size-sm {
  width: 2.5rem;
  height: 2.5rem;
}

#scroll-to-top.size-md {
  width: 3rem;
  height: 3rem;
}

#scroll-to-top.size-lg {
  width: 3.5rem;
  height: 3.5rem;
}

/* Position variations */
#scroll-to-top.position-left {
  left: 2rem;
  right: auto;
}

#scroll-to-top.position-right {
  right: 2rem;
  left: auto;
}

/* Color variations */
#scroll-to-top.color-primary {
  background-color: var(--color-primary);
}

#scroll-to-top.color-primary:hover {
  background-color: var(--color-primary-hover);
}

#scroll-to-top.color-accent {
  background-color: var(--color-accent);
}

#scroll-to-top.color-accent:hover {
  background-color: var(--color-accent-hover);
}

#scroll-to-top.color-secondary {
  background-color: var(--color-secondary);
}

#scroll-to-top.color-secondary:hover {
  background-color: var(--color-secondary-hover);
}

/* Animation variations */
#scroll-to-top.animation-fade {
  animation: fadeIn 0.3s ease-in-out;
}

#scroll-to-top.animation-slide.position-right {
  animation: slideInRight 0.3s ease-in-out;
}

#scroll-to-top.animation-slide.position-left {
  animation: slideInLeft 0.3s ease-in-out;
}

#scroll-to-top.animation-bounce {
  animation: bounceIn 0.5s ease-in-out;
}

/* Progress ring */
.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring-background {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  opacity: 0.2;
}

.progress-ring-progress {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s ease;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes bounceIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  #scroll-to-top {
    bottom: 1rem;
  }

  #scroll-to-top.position-left {
    left: 1rem;
  }

  #scroll-to-top.position-right {
    right: 1rem;
  }
}
