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

/* RESET & BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #f4f7fc, #dde6ff, #fff0f0);
  background-size: 300% 300%;
  animation: gradientBG 12s ease infinite;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* PREMIUM FULL GLOW SEARCH BOX */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 550px;
  max-width: 100%;
  margin: 30px auto;
}

.search-box input {
  width: 100%;
  padding: 10px 45px 10px 18px; /* top/right/bottom/left */
  font-size: 16px;
  font-weight: 500;
  border-radius: 30px;
  border: 1px solid #ff4d6d;
  background: linear-gradient(145deg, #ffffff, #f5f7fa);
  
  /* Full pink glow on all sides */
  box-shadow: 
    0 0 10px rgba(255,77,109,0.5),   /* inner glow */
    0 0 20px rgba(255,77,109,0.3),   /* outer glow */
    0 4px 15px rgba(255,77,109,0.2), /* downward shadow/glow */
    0 8px 30px rgba(255,77,109,0.15); /* bigger soft shadow */
  
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  
  /* Intensify glow on focus */
  box-shadow: 
    0 0 15px rgba(255,77,109,0.7),
    0 0 25px rgba(255,77,109,0.5),
    0 6px 20px rgba(255,77,109,0.25),
    0 10px 35px rgba(255,77,109,0.2);
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  cursor: pointer;
  transition: transform 0.3s ease, stroke 0.3s ease;
}

.search-icon svg {
  width: 20px;
  height: 20px;
  stroke: #ff4d6d;
  stroke-width: 2;
  fill: none;
}

.search-icon:hover {
  transform: translateY(-50%) scale(1.2);
  stroke: #ff99aa;
}

/* MOBILE FULL WIDTH */
@media(max-width:768px){
  .search-box {
    width: 100%;
    padding: 0 15px;
    margin: 20px auto;
  }

  .search-box input {
    width: 100% !important;
    padding: 8px 50px 8px 18px;
    font-size: 16px;
  }

  .search-icon {
    right: 25px;
  }
}


/* ======================= */
/* BUBBLE MENU PREMIUM */
/* ======================= */
.bubble-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px; /* spacing between bubbles */
  padding: 20px 15px; /* top-bottom, left-right */
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 30px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  margin: 20px auto;
  max-width: 1100px;
  transition: all 0.4s ease;
}

.bubble-menu button {
  border: none;
  background: #f4f7fc;
  color: #333;
  padding: 14px 24px; /* larger padding for premium feel */
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.bubble-menu button:hover {
  background: linear-gradient(135deg, #ff4d6d, #ff9900);
  color: #fff;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(255, 77, 109, 0.3);
}

.bubble-menu button.active {
  background: linear-gradient(45deg, #ff4d6d, #ff9900);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 77, 109, 0.4);
}

.bubble-menu button::before {
  content: "";
  position: absolute;
  width: 120%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 77, 109, 0.2) 0%, transparent 70%);
  top: -50%;
  left: -10%;
  transform: rotate(25deg);
  transition: all 0.5s ease;
}

.bubble-menu button:hover::before {
  top: 100%;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .bubble-menu {
    gap: 10px;
    padding: 20px 10px;
  }
  .bubble-menu button {
    padding: 12px 20px;
    font-size: 14px;
  }
}

/* CONTAINER */
.container {
  width: 100%;
  max-width: 1100px;
  background: rgba(255,255,255,0.9);
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0,0,0,0.12);
  backdrop-filter: blur(16px);
  margin: 20px auto;
  display: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.container.active {
  display: block;
  opacity: 1;
}

/* TITLE SECTION */
.title-section {
  background: linear-gradient(135deg,#ff4d4d,#ff9900,#000);
  background-size: 200% 200%;
  animation: gradientMove 5s ease infinite;
  color: white;
  padding: clamp(15px, 3vw, 25px) 20px;
  text-align: center;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.title-section h2 {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: bold;
  margin: 0;
  font-family: 'Merienda', cursive;
  background: linear-gradient(to right, #ff0000, #000);
  background-size: 150% auto;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  animation: flicker 1.5s infinite linear;
}

.title-section p {
  font-size: clamp(14px, 2vw, 16px);
  margin-top: 5px;
}

/* CONTENT */
.content {
  padding: clamp(20px, 4vw, 30px) 15px;
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(15px, 3vw, 22px);
}

/* TOOL CARD */
.tool-card {
  display: flex;
  align-items: center;
  background: linear-gradient(145deg,#ffffff,#f2f2f2);
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #eee;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transform: translateY(20px);
  opacity: 0;
}

.tool-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.tool-card:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 15px 35px rgba(255,77,109,0.3);
}

/* TOOL IMAGE */
.tool-card img {
  width: clamp(45px, 12vw, 60px);
  height: clamp(45px, 12vw, 60px);
  margin-right: 15px;
  filter: drop-shadow(0px 3px 6px rgba(0,0,0,0.2));
  transition: transform 0.35s ease;
}

.tool-card:hover img {
  transform: rotate(-6deg) scale(1.08);
}

/* TOOL NAME */
.tool-name {
  font-size: clamp(16px, 3vw, 18px);
  font-weight: 600;
}

/* TAG */
.tool-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #ff4d6d, #ff9900);
  color: white;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* SEARCH OVERLAY */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  z-index: 3000;
}

.search-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

.search-overlay-content {
  width: 90%;
  max-width: 800px;
  background: rgba(255,255,255,0.95);
  padding: 30px;
  border-radius: 20px;
  animation: slideDown 0.4s ease forwards;
  text-align: center;
}

.close-search {
  position: absolute;
  top: -30px;
  right: -30px;
  font-size: 30px;
  cursor: pointer;
  color: #ff4d6d;
  transition: 0.3s;
}

.close-search:hover {
  transform: scale(1.2);
}

#overlaySearchInput {
  width: 100%;
  padding: 14px 18px;
  font-size: 18px;
  border: 2px solid #ff4d6d;
  border-radius: 30px;
  margin-bottom: 30px;
  outline: none;
  box-shadow: 0 0 20px rgba(255,77,109,0.2);
  transition: 0.3s;
}

#overlaySearchInput:focus {
  box-shadow: 0 0 30px rgba(255,77,109,0.4);
}

.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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