@layer base {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

@layer components {
  /* The core Bento Tile styling */
  .bento-tile {
    /* Glassmorphism base */
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  }

  /* Hover Effects */
  .bento-tile:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 243, 255, 0.3); /* Neon glow border */
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 
                0 0 20px rgba(0, 243, 255, 0.1) inset;
  }

  /* Specific neon glow on active internal elements */
  .button-glow {
    position: relative;
    overflow: hidden;
  }
  
  .button-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.2), transparent);
    transition: left 0.5s ease;
  }

  .button-glow:hover::before {
    left: 100%;
  }

  /* Custom scrollbar for modal */
  .custom-scrollbar::-webkit-scrollbar {
    width: 8px;
  }
  .custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
  }
  .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
  }
  .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 243, 255, 0.3);
  }
}

/* Modal specific animation classes added via JS */
.modal-active #image-modal {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: scale(1) !important;
}

.modal-active #modal-backdrop {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -20px, 0);
  }
  to {
    opacity: 1;
    transform: translateZ(0);
  }
}

.animate-fade-in-down {
  animation: fadeInDown 0.8s ease-out forwards;
}
