/* Modern CSS for Hashtag Generator - Matching Index.php Design */

:root {
  /* Color Scheme */
  --primary: #4f46e5;       /* Indigo 600 */
  --primary-dark: #4338ca;  /* Indigo 700 */
  --primary-light: #818cf8; /* Indigo 400 */
  --primary-bg: #f5f7ff;    /* Light indigo background */
  
  --secondary: #1e293b;     /* Slate 800 */
  --secondary-light: #334155; /* Slate 700 */
  
  --accent-1: #ec4899;      /* Pink 500 */
  --accent-2: #8b5cf6;      /* Violet 500 */
  --accent-3: #06b6d4;      /* Cyan 500 */
  --accent-4: #10b981;      /* Emerald 500 */
  
  /* Neutral colors */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
body {
  font-family: var(--font-sans);
  background-color: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1.5rem;
  color: var(--gray-600);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-2) 100%);
  position: relative;
  overflow: hidden;
  color: white;
  padding: 5rem 0;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(255,255,255,0.05)" d="M0,0 L100,0 L100,100 L0,100 Z"></path></svg>');
  background-size: cover;
  opacity: 0.3;
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1.5rem;
}

.hero-section p.lead {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
}

/* Card Styles */
.card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  overflow: hidden;
  background-color: var(--white);
  margin-bottom: 1.5rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  background-color: var(--white);
}

.card-header.bg-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
  color: white;
}

.card-header.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-2) 100%);
  color: white;
}

.card-header.bg-gradient-accent {
  background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-3) 100%);
  color: white;
}

.card-body {
  padding: 1.5rem;
}

/* Button Styles */
.btn {
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-outline-light {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: white;
  background-color: transparent;
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Form Styles */
.form-control {
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  transition: all var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

.form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
}

.form-range {
  width: 100%;
  height: 1.5rem;
  padding: 0;
  background-color: transparent;
  -webkit-appearance: none;
}

.form-range:focus {
  outline: none;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: -0.6rem;
  background-color: var(--primary);
  border: none;
  border-radius: 1rem;
  transition: all var(--transition-fast);
}

.form-range::-moz-range-thumb {
  width: 1.5rem;
  height: 1.5rem;
  background-color: var(--primary);
  border: none;
  border-radius: 1rem;
  transition: all var(--transition-fast);
}

.form-range::-ms-thumb {
  width: 1.5rem;
  height: 1.5rem;
  background-color: var(--primary);
  border: none;
  border-radius: 1rem;
  transition: all var(--transition-fast);
}

.form-range::-webkit-slider-runnable-track {
  width: 100%;
  height: 0.3rem;
  cursor: pointer;
  background: var(--gray-200);
  border-radius: 1rem;
}

.form-range::-moz-range-track {
  width: 100%;
  height: 0.3rem;
  cursor: pointer;
  background: var(--gray-200);
  border-radius: 1rem;
}

.form-range::-ms-track {
  width: 100%;
  height: 0.3rem;
  cursor: pointer;
  background: transparent;
  border-color: transparent;
  color: transparent;
}

/* Hashtag Styles */
.hashtags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.hashtags-list .badge {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all var(--transition-fast);
  background-color: var(--gray-100);
  color: var(--gray-800);
}

.hashtags-list .badge:hover {
  background-color: var(--primary) !important;
  color: white !important;
  transform: translateY(-2px);
}

.hashtag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.hashtag-cloud .badge {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  transition: all var(--transition-fast);
  background-color: var(--gray-100);
  color: var(--gray-700);
}

.hashtag-cloud .badge:hover {
  background-color: var(--primary) !important;
  color: white !important;
  transform: translateY(-2px);
}

/* Feature Cards */
.feature-card {
  height: 100%;
  transition: all var(--transition-normal);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  border-radius: 0.75rem;
}

.feature-card h4 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

/* Step Cards */
.step-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  height: 100%;
  text-align: center;
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.step-number {
  position: absolute;
  top: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--primary);
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-card .icon-wrapper {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.step-card h4 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

/* Testimonial Cards */
.testimonial-card {
  height: 100%;
  padding: 2rem;
  border-radius: 0.75rem;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.testimonial-card .stars {
  color: #fbbf24;
  margin-bottom: 1rem;
}

.testimonial-card p {
  font-style: italic;
  margin-bottom: 1.5rem;
}

.testimonial-card .author {
  display: flex;
  align-items: center;
}

.testimonial-card .author img {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  margin-right: 1rem;
}

.testimonial-card .author-info h5 {
  margin-bottom: 0.25rem;
}

.testimonial-card .author-info p {
  margin-bottom: 0;
  color: var(--gray-500);
  font-style: normal;
}

/* Alert Styles */
.alert {
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: none;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: none;
}

/* Progress Bar */
.progress {
  height: 0.5rem;
  border-radius: 0.25rem;
  background-color: var(--gray-200);
}

.progress-bar {
  background-color: var(--primary);
  transition: width 0.6s ease;
}

.progress-bar.bg-success {
  background-color: var(--accent-4);
}

.progress-bar.bg-danger {
  background-color: var(--danger);
}

/* List Groups */
.list-group-item {
  border: 1px solid var(--gray-200);
  padding: 0.75rem 1.25rem;
}

.list-group-item:first-child {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.list-group-item:last-child {
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

/* Carousel */
.carousel-control-prev,
.carousel-control-next {
  width: 3rem;
  height: 3rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}

.carousel-control-prev {
  left: 1rem;
}

.carousel-control-next {
  right: 1rem;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .hero-section h1 {
    font-size: 2.5rem;
  }
  
  .hero-section p.lead {
    font-size: 1.125rem;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 0;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .hero-section h1 {
    font-size: 1.75rem;
  }
  
  .btn-lg {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
  }
  
  .card-body {
    padding: 1.25rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

/* Utility Classes */
.text-white-80 {
  color: rgba(255, 255, 255, 0.8);
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-2) 100%);
}

.bg-gradient-accent {
  background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-3) 100%);
}

/* Custom Range Input */
#count-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
}

/* Ripple Effect for Buttons */
.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn:active::after {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}