@import "tailwindcss";

@theme {
  --color-primary: #0057B8;
  --color-dark: #001B3A;
  --color-light-grey: #F4F6F8;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
}

@layer base {
  html {
    scroll-behavior: smooth;
  }
  body {
    @apply bg-white text-dark font-sans overflow-x-hidden;
  }
}

@layer components {
  .btn {
    @apply inline-block px-8 py-4 font-black uppercase tracking-widest transition-all cursor-pointer text-center;
  }
  .btn-primary {
    @apply bg-primary text-white hover:bg-dark active:scale-95 shadow-lg shadow-primary/20;
  }
  .btn-secondary {
    @apply bg-white text-dark border-2 border-white hover:bg-primary hover:text-white hover:border-primary active:scale-95 shadow-lg shadow-black/5;
  }
  .btn-outline {
    @apply border-2 border-dark text-dark hover:bg-dark hover:text-white active:scale-95;
  }
  .btn-outline-white {
    @apply border-2 border-white text-white hover:bg-white hover:text-dark active:scale-95;
  }
  .section-padding {
    @apply py-24 px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto;
  }

  /* Premium Product Card */
  .product-card {
    @apply relative bg-white transition-all duration-500 border border-transparent rounded-2xl overflow-hidden;
  }
  .product-card:hover {
    @apply -translate-y-2 border-primary/10;
    box-shadow: 0 30px 60px -12px rgba(0, 87, 184, 0.15), 0 18px 36px -18px rgba(0, 0, 0, 0.1);
  }
  .product-card-glow {
    @apply absolute inset-0 opacity-0 transition-opacity duration-500 pointer-events-none border border-primary/20 rounded-2xl;
  }
  .product-card:hover .product-card-glow {
    @apply opacity-100;
  }

  /* Portal Card */
  .portal-card {
    @apply bg-white p-8 border border-light-grey transition-all duration-500 flex flex-col items-center text-center rounded-2xl relative overflow-hidden;
  }
  .portal-card:hover {
    @apply border-primary bg-primary text-white -translate-y-2;
    box-shadow: 0 25px 50px -12px rgba(0, 87, 184, 0.25);
  }
  .portal-card .icon-box {
    @apply p-4 bg-light-grey rounded-full mb-6 transition-colors duration-500;
  }
  .portal-card:hover .icon-box {
    @apply bg-white/20;
  }

  /* Nav Links */
  .nav-link::after {
    content: '';
    @apply absolute bottom-0 left-0 w-full h-0.5 bg-primary scale-x-0 transition-transform duration-300 origin-right;
  }
  .nav-link:hover::after, .nav-link.active::after {
    @apply scale-x-100 origin-left;
  }
  .nav-link.active {
    @apply text-white;
  }
}

/* Navbar Scrolled State */
#navbar.scrolled {
  @apply bg-dark/90 backdrop-blur-md py-4 border-b border-white/5;
}

/* Mobile Menu Active State */
#mobileMenu.active {
  @apply opacity-100 pointer-events-auto translate-y-0;
}

/* Hero Gradient Animation */
@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero-gradient {
  background: linear-gradient(-45deg, #001B3A, #0057B8, #001B3A, #003366);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

/* Slideshow Engine */
.slideshow-container {
  @apply relative overflow-hidden w-full aspect-[16/9] sm:aspect-[21/9] bg-dark rounded-3xl;
}
.slideshow-progress {
  @apply absolute bottom-0 left-0 h-1 bg-primary z-20 transition-all duration-700;
}
.slideshow-track {
  @apply flex h-full transition-transform duration-700 ease-in-out;
}
.slide {
  @apply min-w-full h-full relative flex items-center justify-center text-white overflow-hidden;
}
.slide-content {
  @apply relative z-10 text-center px-4 max-w-3xl;
}
.slide-image {
  @apply absolute inset-0 w-full h-full object-cover opacity-60;
}

/* Motion Design System */
.reveal {
  @apply opacity-0 translate-y-10 transition-all duration-1000 ease-out;
}
.reveal.active {
  @apply opacity-100 translate-y-0;
}

/* Modal & Drawer Styles */
.modal-overlay {
  @apply fixed inset-0 bg-dark/80 backdrop-blur-md z-[100] flex items-center justify-center opacity-0 pointer-events-none transition-opacity duration-300;
}
.modal-overlay.active {
  @apply opacity-100 pointer-events-auto;
}
.modal-content {
  @apply bg-white w-full max-w-2xl p-8 sm:p-12 relative transform scale-90 transition-transform duration-300;
}
.modal-overlay.active .modal-content {
  @apply scale-100;
}

.cart-drawer {
  @apply fixed right-0 top-0 h-full w-full max-w-md bg-white z-[110] shadow-2xl transform translate-x-full transition-transform duration-500 ease-in-out flex flex-col;
}
.cart-drawer.active {
  @apply translate-x-0;
}
.cart-overlay {
  @apply fixed inset-0 bg-dark/60 backdrop-blur-sm z-[105] opacity-0 pointer-events-none transition-opacity duration-300;
}
.cart-overlay.active {
  @apply opacity-100 pointer-events-auto;
}

/* Toast Notification */
.active-toast {
  @apply opacity-100 translate-y-0 pointer-events-auto;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

.hidden {
  display: none !important;
}

/* Checkout Button Disabled State */
#checkoutBtn:disabled {
  @apply opacity-50 cursor-not-allowed grayscale pointer-events-none;
}

/* Custom Scrollbar for Order Preview */
#orderPreview::-webkit-scrollbar {
  width: 4px;
}
#orderPreview::-webkit-scrollbar-track {
  @apply bg-transparent;
}
#orderPreview::-webkit-scrollbar-thumb {
  @apply bg-dark/10 rounded-full;
}

/* MATCH CARDS (PHASE 5) */
.match-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
}

.match-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(0, 87, 184, 0.3);
}

.match-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.match-card:hover::before {
  transform: scaleX(1);
}

.match-card .team-logo {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.match-card .vs-badge {
  font-size: 10px;
  font-weight: 900;
  color: var(--primary);
  background: rgba(0, 87, 184, 0.1);
  padding: 2px 8px;
  border-radius: 99px;
  margin: 0 8px;
}

.match-card .match-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.match-card .match-venue {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.5rem;
}

.match-card .price-tag {
  font-size: 14px;
  font-weight: 700;
  color: white;
}

/* FIXTURES TOGGLE ACTIVE STATE */
#toggleUpcoming.active, #togglePast.active {
  background: var(--primary);
  color: white;
}

/* TICKET MODAL SPECIFIC */
.ticket-type-card {
  border: 2px solid #f3f4f6;
  border-radius: 1rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ticket-type-card.selected {
  border-color: var(--primary);
  background: rgba(0, 87, 184, 0.05);
}

/* CART ITEM TICKET BADGE */
.ticket-badge {
  background: #0057B8;
  color: white;
  font-size: 8px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-right: 6px;
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 768px) {
  .match-card {
    padding: 1.5rem;
  }
}
