@import url('https://fonts.googleapis.com/css?family=Nunito:300,400,500,600,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&display=swap');
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Kaushan+Script&display=swap');

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

@layer base {
  body {
    @apply font-nunito text-base leading-relaxed bg-white dark:bg-slate-900 text-gray-900 dark:text-white;
  }
  
  p {
    @apply leading-relaxed;
  }

  h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    @apply leading-normal font-semibold;
  }

  ::selection {
    @apply bg-indigo-600/90 text-white;
  }

  /* Form inputs base styles */
  .form-input {
    @apply bg-white dark:bg-slate-900 border-gray-200 dark:border-gray-800 focus:border-indigo-600 focus:ring-0;
  }
}

@layer components {
  /* Techwind Software Components */
  .container {
    @apply mx-auto px-4;
  }

  /* Buttons */
  .btn {
    @apply inline-flex items-center justify-center font-semibold tracking-wide border align-middle duration-500 text-base text-center rounded-md;
  }

  .btn-primary {
    @apply bg-indigo-600 hover:bg-indigo-700 border-indigo-600 hover:border-indigo-700 text-white;
  }

  .btn-orange {
    @apply bg-orange-500 hover:bg-orange-600 border-orange-500 hover:border-orange-600 text-white;
  }

  /* Feature Cards */
  .feature-card {
    @apply group relative hover:bg-white dark:hover:bg-slate-900 hover:shadow dark:hover:shadow-gray-800 p-6 duration-500 rounded-xl overflow-hidden text-center;
  }

  .feature-icon-bg {
    @apply size-28 fill-indigo-600/5 dark:fill-white/5 mx-auto bg-indigo-600/5 rounded-full;
  }

  /* Pricing Cards */
  .pricing-card {
    @apply p-6 bg-white dark:bg-slate-900 rounded-xl shadow dark:shadow-gray-800;
  }

  .pricing-card-featured {
    @apply shadow-xl rounded-xl p-6 bg-gradient-to-t from-indigo-600 to-indigo-500 scale-105;
  }

  /* Shape divider */
  .shape {
    @apply absolute sm:-bottom-px -bottom-[2px] start-0 end-0 overflow-hidden;
  }
}

@layer utilities {
  /* Hide scrollbar for Chrome, Safari and Opera */
  .scrollbar-hide::-webkit-scrollbar {
    display: none;
  }
  
  /* Hide scrollbar for IE, Edge and Firefox */
  .scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
  }

  /* Text utilities */
  .text-dark {
    color: #3c4858;
  }

  .text-black {
    color: #161c2d;
  }

  /* Background patterns */
  .bg-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");
  }
}

/* Broadcasts (Transmisiones) specific */
@layer components {
  .create-card { @apply flex items-center gap-4 p-4 rounded-lg border border-slate-200 bg-white hover:shadow-sm text-left; }
  .create-card .icon { @apply w-12 h-12 rounded-md flex items-center justify-center text-xl; }
  .tab-btn { @apply px-3 py-1 rounded-md text-sm text-slate-600 hover:bg-slate-50; }
  .tab-btn.active { @apply text-sky-600 border-b-2 border-sky-500; }
}

/* Nextream-style Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

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

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

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

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

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}

/* Marquee Animation */
@keyframes marquee {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-marquee {
  animation: marquee 30s linear infinite;
}

.pause-animation:hover {
  animation-play-state: paused;
}

/* Grid Pattern */
.bg-grid-pattern {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #9333ea, #3b82f6);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #7c3aed, #2563eb);
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 1000px;
  }
}

.animate-fadeIn {
  animation: fadeIn 0.2s ease-out;
}

.animate-slideDown {
  animation: slideDown 0.3s ease-out;
}

/* Techwind Helper Styles */
/* Cookies */
.cookie-popup-not-accepted {
  @apply block;
  animation: cookie-popup-in .5s ease forwards;
}

.cookie-popup-accepted {
  @apply hidden;
}

@keyframes cookie-popup-in {
  from {
    bottom: -6.25rem;
  }
  to {
    bottom: 1.25rem;
  }
}

/* Preloader */
#preloader {
  background-image: linear-gradient(45deg, #ffffff, #ffffff);
  z-index: 99999;
  @apply fixed inset-0;
}

#preloader #status {
  @apply absolute start-0 end-0 top-1/2 -translate-y-1/2;
}

#preloader #status .spinner {
  @apply size-10 relative my-[100px] mx-auto;
}

#preloader #status .spinner .double-bounce1,
#preloader #status .spinner .double-bounce2 {
  @apply w-full h-full rounded-full bg-indigo-600/60 absolute top-0 start-0;
  animation: sk-bounce 2.0s infinite ease-in-out;
}

#preloader #status .spinner .double-bounce2 {
  animation-delay: -1.0s;
}

@keyframes sk-bounce {
  0%, 100% { 
    transform: scale(0.0);
  } 
  50% { 
    transform: scale(1.0);
  }
}

/* Switcher */
.label .ball {
  transition: transform 0.2s linear;
  @apply translate-x-0;
}

.checkbox:checked + .label .ball {
  @apply translate-x-6;
}

/* Mover animation */
.mover {
  animation: mover 1.5s infinite alternate;
}

@keyframes mover {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(10px);
  }
}

/* Background effect for hero sections */
.background-effect .circles li {
  @apply absolute block -bottom-[150px] bg-indigo-600/30;
  animation: animate-circles 25s linear infinite;
}

.background-effect .circles li.brand-img:nth-child(1),
.background-effect .circles li.brand-img:nth-child(2),
.background-effect .circles li.brand-img:nth-child(3),
.background-effect .circles li.brand-img:nth-child(4),
.background-effect .circles li.brand-img:nth-child(5),
.background-effect .circles li.brand-img:nth-child(6),
.background-effect .circles li.brand-img:nth-child(7),
.background-effect .circles li.brand-img:nth-child(8),
.background-effect .circles li.brand-img:nth-child(9),
.background-effect .circles li.brand-img:nth-child(10) {
  @apply bg-transparent;
}

.background-effect .circles li:nth-child(1),
.background-effect .circles li:nth-child(2),
.background-effect .circles li:nth-child(3),
.background-effect .circles li:nth-child(4),
.background-effect .circles li:nth-child(5),
.background-effect .circles li:nth-child(6),
.background-effect .circles li:nth-child(7),
.background-effect .circles li:nth-child(8),
.background-effect .circles li:nth-child(9),
.background-effect .circles li:nth-child(10) {
  @apply size-12;
}

.background-effect .circles li:nth-child(1) {
  @apply start-1/4;
  animation-delay: 0s;
}

.background-effect .circles li:nth-child(2) {
  @apply start-[10%];
  animation-delay: 2s;
  animation-duration: 12s;
}

.background-effect .circles li:nth-child(3) {
  @apply start-[70%];
  animation-delay: 4s;
}

.background-effect .circles li:nth-child(4) {
  @apply start-[40%];
  animation-delay: 0s;
  animation-duration: 18s;
}

.background-effect .circles li:nth-child(5) {
  @apply start-[65%];
  animation-delay: 0s;
}

.background-effect .circles li:nth-child(6) {
  @apply start-3/4;
  animation-delay: 3s;
}

.background-effect .circles li:nth-child(7) {
  @apply start-[35%];
  animation-delay: 7s;
}

.background-effect .circles li:nth-child(8) {
  @apply start-1/2;
  animation-delay: 15s;
  animation-duration: 45s;
}

.background-effect .circles li:nth-child(9) {
  @apply start-[20%];
  animation-delay: 2s;
  animation-duration: 35s;
}

.background-effect .circles li:nth-child(10) {
  @apply start-[85%];
  animation-delay: 0s;
  animation-duration: 11s;
}

@keyframes animate-circles {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
    border-radius: 10px;
  }
  100% {
    transform: translateY(-1000px) rotate(720deg);
    opacity: 0;
  }
}

/* Kenburn Effect */
.image-wrap {
  animation: 100s ppb_kenburns linear infinite alternate;
}

@keyframes ppb_kenburns {
  0% {
    transform: scale(1.3) translate(-10%, 10%);
  }
  25% {
    transform: scale(1) translate(0, 0);
  }
  50% {
    transform: scale(1.3) translate(10%, 10%);
  }
  75% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.3) translate(-10%, 10%);
  }
}

/* Blob Animation for Hero Section */
@keyframes blob {
  0% {
    transform: translate(0px, 0px) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
  100% {
    transform: translate(0px, 0px) scale(1);
  }
}

.animate-blob {
  animation: blob 7s infinite;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}
