@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: #f8f9fc;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  color: #1e293b;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(
      circle at 20% 50%,
      rgba(120, 119, 198, 0.03) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(147, 197, 253, 0.03) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 20%,
      rgba(167, 139, 250, 0.03) 0%,
      transparent 50%
    );
  animation: float 20s ease-in-out infinite;
  z-index: 0;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(5deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(-5deg);
  }
}

/* Common Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Common Header Style */
.header {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeIn 1s ease-out;
}

.header h1 {
  font-size: 3.5em;
  font-weight: 700;
  background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.header p {
  color: #64748b;
  font-size: 1.1em;
  font-weight: 400;
  letter-spacing: 0.01em;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Common Controls/Search Input Style */
.controls {
  max-width: 800px;
  margin: 0 auto 48px; /* Index.html sẽ ghi đè margin-bottom */
  animation: fadeIn 1s ease-out 0.2s both;
}

.search-wrapper {
  position: relative;
  margin-bottom: 24px;
}

.search-input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  border: 1px solid rgba(226, 232, 240, 0.6);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  font-size: 1em;
  font-family: 'Inter', sans-serif;
  color: #1e293b;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.search-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.08);
  background: rgba(255, 255, 255, 0.9);
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #64748b;
  pointer-events: none;
}

/* Tùy chỉnh cho người dùng thích giảm chuyển động */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Media query chung cho header/container */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2.5em;
  }

  .header p {
    font-size: 1em;
  }
}
