* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #343a40;
  background-color: #ffffff;
  min-height: 100vh;
} */


                .container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2rem;
}

header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
  background:linear-gradient(219deg, #FB0E76 0%, #910694 100%);
  color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(233, 30, 99, 0.1);
}

header h1 {
  font-size: 45px !important;
  font-weight: 700 !important;
  margin-bottom: 0.5rem;
	    color: white !important;
/*     font-family: inherit; */
	}

.subtitle {
  font-size: 1.2rem;
  color: white;
  font-weight: 400;
}

.main-content {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

.input-card, .results-card {
  background: #ffffff !important;
  border-radius: 16px !important;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 107, 157, 0.1);
  transition: all 0.3s ease;
}

.input-card:hover, .results-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.input-label {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: #343a40 !important;
  margin-bottom: 1rem;
}

.text-input {
  width: 100%;
  padding: 1.5rem;
  border: 2px solid #e9ecef !important;
  border-radius: 12px !important;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.text-input:focus {
  outline: none !important;
  border-color: #ff6b9d!important;
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
  background: #ffffff;
}

.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.calculate-btn, .clear-btn, .copy-btn {
  padding: 1rem 2rem;
  border: none !important;
  border-radius: 12px !important;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
}

.calculate-btn {
 background:linear-gradient(219deg, #FB0E76 0%, #910694 100%);
  color: #ffffff;
  flex: 1;
  justify-content: center;
}

.calculate-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(255, 107, 157, 0.3);
}

.calculate-btn:active {
  transform: translateY(0);
}

.clear-btn {
  background: #f8f9fa !important;
  color: #6c757d !important;
  border: 2px solid #e9ecef !important;
}

.clear-btn:hover {
  background: #e9ecef;
  color: #343a40;
  transform: translateY(-2px) !important;
}

.copy-btn {
  background:linear-gradient(219deg, #FB0E76 0%, #910694 100%);
  color: #ffffff;
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
}

.copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 139, 171, 0.3);
}

.btn-icon {
  font-size: 1.2rem;
}

.results-section {
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.results-title {
  font-size: 2rem;
  font-weight: 700;
  color: #343a40;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
 background:linear-gradient(219deg, #FB0E76 0%, #910694 100%);
  border-radius: 12px;
  color: #ffffff;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.frequency-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #e9ecef !important;
  border-radius: 12px !important;
  background: #f8f9fa;
}

.frequency-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
  transition: all 0.2s ease;
}

.frequency-item:last-child {
  border-bottom: none;
}

.frequency-item:hover {
  background: #ffffff;
  transform: translateX(5px);
}

.word {
  font-weight: 600;
  color: #343a40;
  flex: 1;
}

.count {
  background: linear-gradient(135deg, #ff6b9d, #e74c3c);
  color: #ffffff;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 50px;
  text-align: center;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background:linear-gradient(219deg, #FB0E76 0%, #910694 100%) !important;
  color: #ffffff !important;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  transform: translateX(400px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateX(0);
}

.toast-icon {
  font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0px !important;
  }
  
  .title {
    font-size: 35px !important;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .input-card, .results-card {
    padding: 1.5rem;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  .calculate-btn, .clear-btn {
    flex: none;
  }
  
  .results-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .results-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .frequency-item {
    padding: 0.8rem 1rem;
  }
  
  .toast {
    right: 15px;
    bottom: 15px;
    left: 15px;
    transform: translateY(100px);
  }
  
  .toast.show {
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 2rem;
  }
  
  .input-card, .results-card {
    padding: 1rem;
  }
  
  .text-input {
    padding: 1rem;
  }
  
  .calculate-btn, .clear-btn, .copy-btn {
    padding: 0.8rem 1.5rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .frequency-item:hover {
    transform: none;
  }
}

/* Custom scrollbar for frequency list */
.frequency-list::-webkit-scrollbar {
  width: 8px;
}

.frequency-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.frequency-list::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ff6b9d, #e74c3c);
  border-radius: 10px;
}

.frequency-list::-webkit-scrollbar-thumb:hover {
  background: #c0392b;
}
