@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 221.2 83.2% 53.3%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 221.2 83.2% 53.3%;
    --radius: 0.5rem;
    --brand-purple: 265 83% 45%;
    --brand-purple-solid: #7c4dff;
  }

  .dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;
    --primary: 217.2 91.2% 59.8%;
    --primary-foreground: 222.2 47.4% 11.2%;
    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 224.3 76.3% 48%;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
  }
}

/* Change the text gradient to match the "Xem công ty" button (purple-to-pink) */
.text-gradient {
  background: linear-gradient(to right, #7c4dff, #c94fc9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Enhanced button gradient for prominent buttons */
.btn-gradient {
  background: linear-gradient(to right, #7c4dff, #c94fc9);
  color: white;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-gradient:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124, 77, 255, 0.4);
}

.btn-gradient:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(124, 77, 255, 0.4);
}

/* Add a subtle shine effect on hover */
.btn-gradient::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-gradient:hover::after {
  opacity: 1;
}

/* Enhanced interview button gradient */
.interview-btn-gradient {
  background: linear-gradient(to right, #4f46e5, #3b82f6);
  color: white;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

.interview-btn-gradient:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(79, 70, 229, 0.3);
}

.interview-btn-gradient:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* Enhanced apply button */
.apply-btn {
  background-color: #16a34a;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.2);
}

.apply-btn:hover {
  background-color: #15803d;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(22, 163, 74, 0.3);
}

.apply-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

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

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

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

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.animate-fade-in {
  animation: fadeIn 1s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.8s ease-out forwards;
}

.animate-slide-down {
  animation: slideDown 0.8s ease-out forwards;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animation-delay-200 {
  animation-delay: 200ms;
}

.animation-delay-400 {
  animation-delay: 400ms;
}

.animation-delay-600 {
  animation-delay: 600ms;
}

/* Thêm pattern grid cho background */
.bg-grid-pattern {
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Hiệu ứng hover cho card */
.card-hover-effect {
  transition: all 0.3s ease;
}

.card-hover-effect:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Hiệu ứng gradient mới */
.bg-gradient-brand {
  background: linear-gradient(135deg, #7c4dff 0%, #c94fc9 100%);
}

/* Hiệu ứng shine cho button */
.btn-shine {
  position: relative;
  overflow: hidden;
}

.btn-shine::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% {
    left: -100%;
    opacity: 0;
  }
  20% {
    left: 100%;
    opacity: 0.6;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

/* Hiệu ứng pulse mượt hơn */
@keyframes smooth-pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.animate-smooth-pulse {
  animation: smooth-pulse 2s infinite ease-in-out;
}

/* Hiệu ứng float */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Hiệu ứng glow cho các phần tử quan trọng */
.glow-effect {
  box-shadow: 0 0 15px rgba(124, 77, 255, 0.4);
}

/* Hiệu ứng gradient text nâng cao */
.text-gradient-enhanced {
  background: linear-gradient(to right, #7c4dff, #c94fc9, #7c4dff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 3s linear infinite;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Hiệu ứng scale cho hình ảnh */
.img-scale-effect {
  transition: transform 0.5s ease;
}

.img-scale-effect:hover {
  transform: scale(1.05);
}

/* Hiệu ứng border gradient */
.border-gradient {
  border: 2px solid transparent;
  background-clip: padding-box;
  background-image: linear-gradient(white, white), linear-gradient(to right, #7c4dff, #c94fc9);
  background-origin: border-box;
  background-clip: content-box, border-box;
}

/* Hiệu ứng ripple cho button */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 0.8s;
}

.btn-ripple:active::after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

/* Thêm các hiệu ứng và animation mới vào cuối file */

/* Hiệu ứng gradient text với glow */
.text-gradient-glow {
  background: linear-gradient(to right, #fff, #f0f0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 0 20px rgba(124, 77, 255, 0.3);
}

/* Hiệu ứng text glow */
.text-glow {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 0 20px rgba(124, 77, 255, 0.3);
}

/* Hiệu ứng shadow glow */
.shadow-glow {
  box-shadow: 0 0 15px rgba(124, 77, 255, 0.5), 0 0 30px rgba(124, 77, 255, 0.3);
}

/* Hiệu ứng card 3D */
.card-3d {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: all 0.3s ease;
}

.card-3d:hover {
  transform: translateY(-10px) rotateX(5deg);
}

/* Hiệu ứng float với các delay khác nhau */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
  animation: float 8s ease-in-out 1s infinite;
}

/* Hiệu ứng pulse chậm */
@keyframes pulse-slow {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
}

.animate-pulse-slow {
  animation: pulse-slow 6s ease-in-out infinite;
}

.animate-pulse-slow-delay {
  animation: pulse-slow 6s ease-in-out 2s infinite;
}

/* Hiệu ứng pulse nhanh */
@keyframes pulse-fast {
  0% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.5;
  }
}

.animate-pulse-fast {
  animation: pulse-fast 1.5s ease-in-out infinite;
}

/* Hiệu ứng float cho các particle */
@keyframes float-particle {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(10px, 10px);
  }
  50% {
    transform: translate(0, 20px);
  }
  75% {
    transform: translate(-10px, 10px);
  }
  100% {
    transform: translate(0, 0);
  }
}

.animate-float-particle {
  animation: float-particle 10s ease-in-out infinite;
}

.animate-float-particle-delay {
  animation: float-particle 12s ease-in-out 1s infinite;
}

.animate-float-particle-delay-2 {
  animation: float-particle 14s ease-in-out 2s infinite;
}

.animate-float-particle-delay-3 {
  animation: float-particle 16s ease-in-out 3s infinite;
}

/* Hiệu ứng gradient animation */
.bg-size-200 {
  background-size: 200% auto;
}

@keyframes gradient-x {
  0% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
  100% {
    background-position: 0% center;
  }
}

.animate-gradient-x {
  animation: gradient-x 3s ease infinite;
}

/* Hiệu ứng hero pattern */
.bg-hero-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-color: #f8f9fa;
}

/* Variant button glow */
.btn-glow {
  background: linear-gradient(to right, #7c4dff, #c94fc9);
  color: white;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-glow:hover {
  box-shadow: 0 0 20px rgba(124, 77, 255, 0.6);
  transform: translateY(-2px);
}

.btn-glow:active {
  transform: translateY(0);
}

/* Badge variant glow */
.badge-glow {
  background: linear-gradient(to right, #7c4dff, #c94fc9);
  color: white;
  box-shadow: 0 0 10px rgba(124, 77, 255, 0.4);
}

/* Hiệu ứng ripple nâng cao */
.ripple-effect {
  position: relative;
  overflow: hidden;
}

.ripple-effect:after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 0.8s;
}

.ripple-effect:active:after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

/* Hiệu ứng shine cho các phần tử */
.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 100%);
  transform: skewX(-25deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% {
    left: -75%;
  }
  20% {
    left: 125%;
  }
  100% {
    left: 125%;
  }
}

/* Thêm class mới cho hero section */
.hero-gradient {
  background: linear-gradient(135deg, #7c4dff 0%, #9d4eff 100%);
}

/* Gradient background for loading and result states */
.bg-change-gradient {
  background: linear-gradient(134.58deg, #EFF6FF 18.9%, #FAF5FF 84.4%);
}
