/* Ensure popup is hidden initially */
.cookie-popup {
    display: none; 
    position: fixed;
    bottom: 30px;
    left: 30px;
    max-width: 380px;
    background: rgba(10, 12, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 
                0 0 0 1px rgba(139, 92, 246, 0.2) inset,
                0 0 30px rgba(139, 92, 246, 0.2);
    z-index: 9999;
    opacity: 0;
    /* Zoom/Pop Effect for Desktop */
    transform: scale(0.9);
    animation: cookiePopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transition: all 0.3s ease;
}

@keyframes cookiePopIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.cookie-popup:hover {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6), 
              0 0 0 1px rgba(139, 92, 246, 0.3) inset,
              0 0 40px rgba(139, 92, 246, 0.3);
}

/* Cookie Icon Section */
.cookie-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.cookie-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #6D28D9, #8B5CF6);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  box-shadow: 0 10px 20px -8px #6D28D9;
  position: relative;
  overflow: hidden;
}

.cookie-icon::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  opacity: 0.5;
  animation: cookieGlow 3s ease-in-out infinite;
}

@keyframes cookieGlow {
  0%, 100% { transform: translate(-30%, -30%); }
  50% { transform: translate(30%, 30%); }
}

.cookie-title h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: white;
  margin: 0 0 4px 0;
}

.cookie-title p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.cookie-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 16px 0;
}

.cookie-link {
  color: #8B5CF6;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cookie-preferences {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.cookie-pref-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  cursor: pointer;
}

.cookie-pref-header span {
  font-weight: 600;
  color: white;
  font-size: 0.95rem;
}

.cookie-pref-options {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.cookie-pref-options.show {
  max-height: 200px;
}

.cookie-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.cookie-toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.cookie-toggle input { opacity: 0; width: 0; height: 0; }

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 34px;
  transition: all 0.3s ease;
}

.cookie-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

input:checked + .cookie-toggle-slider {
  background: linear-gradient(90deg, #6D28D9, #8B5CF6);
  border-color: #8B5CF6;
}

input:checked + .cookie-toggle-slider:before { transform: translateX(20px); }

.cookie-buttons { display: flex; gap: 12px; margin-bottom: 16px; }

.cookie-btn {
  flex: 1;
  padding: 14px 0;
  border-radius: 60px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
  border: none;
  font-family: inherit;
}

.cookie-btn-accept { background: linear-gradient(135deg, #6D28D9, #8B5CF6); color: white; }
.cookie-btn-decline { background: transparent; color: white; border: 1px solid rgba(139, 92, 246, 0.5); }

.cookie-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

.cookie-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

/* ===== MOBILE DEAD-CENTERED VIEW (ZOOM/FADE POP EFFECT) ===== */
@media (max-width: 480px) {
  .cookie-popup {
    bottom: auto !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    
    width: 230px; 
    max-width: 85%;
    padding: 16px;
    border-radius: 20px;
    
    /* Center it and set the starting scale for the pop */
    transform: translate(-50%, -50%) scale(0.85) !important;
    animation: mobileCookiePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
  }

  /* Zoom-in Pop Animation for centered mobile */
  @keyframes mobileCookiePop {
    0% {
      transform: translate(-50%, -50%) scale(0.7);
      opacity: 0;
    }
    100% {
      transform: translate(-50%, -50%) scale(1);
      opacity: 1;
    }
  }

  /* Inner Scaling */
  .cookie-icon { width: 32px; height: 32px; font-size: 16px; }
  .cookie-title h3 { font-size: 1rem; }
  .cookie-content p { font-size: 0.75rem; line-height: 1.4; margin-bottom: 12px; }
  .cookie-preferences { padding: 8px; margin-bottom: 12px; }
  .cookie-buttons { flex-direction: column; gap: 6px; }
  .cookie-btn { padding: 10px 0; font-size: 0.8rem; }
  .cookie-close { top: 8px; right: 8px; width: 24px; height: 24px; font-size: 10px; }
}
