:root {
  --primary: #fb8500;
  --primary-dark: #219ebc;
  --secondary: #ffb703;
  --dark: #023047;
  --light: #f8f9fa;
  --transition: all 0.3s ease;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #023047, #074b6e);
  color: var(--light);
  line-height: 1.6;
  padding: 0;
  margin: 0;
}

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

header {
  background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
  padding: 2rem 0;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 3rem;
}

h1 {
  font-size: 2.5rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.tagline {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.add-influencer {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

h2 {
  color: var(--secondary);
  margin-bottom: 1.2rem;
  font-size: 1.5rem;
}

.form-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 1rem;
}

input {
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  font-size: 1rem;
  flex: 1;
  min-width: 240px;
  outline: none;
  transition: all 0.3s ease;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

input:focus {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px var(--primary);
}

button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  min-width: 150px;
}

button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

#fetchButton {
  background: var(--secondary);
  display: block;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  padding: 14px 28px;
}

#fetchButton:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(253, 121, 168, 0.3);
}

#rankingList {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

#rankingList h3 {
  color: var(--secondary);
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.4rem;
}

.ranking-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.ranking-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.rank {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  width: 40px;
  text-align: center;
}

.influencer-info {
  flex: 1;
  padding-left: 1rem;
  text-align: left;
}

.influencer-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.subscriber-count {
  font-size: 1rem;
  color: var(--success);
  font-weight: 500;
}

.empty-state {
  text-align: center;
  padding: 3rem 0;
  color: rgba(255, 255, 255, 0.7);
}

.error-message {
  color: #ff7675;
  text-align: center;
  padding: 1rem;
  background: rgba(255, 118, 117, 0.1);
  border-radius: 8px;
}

@media (max-width: 768px) {
  .form-group {
    flex-direction: column;
  }

  input,
  button {
    width: 100%;
  }

  h1 {
    font-size: 2rem;
  }
}

/* Loading Animation */
.loader {
  width: 48px;
  height: 48px;
  border: 5px solid var(--primary);
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
  margin: 2rem auto;
  display: none;
}

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