body {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.8s ease-out;
}

.animate-slideIn {
  animation: slideIn 0.6s ease-out;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-custom {
  animation: pulse 2s ease-in-out infinite;
}

.skill-bar {
  transition: width 1.5s ease-out;
}

.project-card {
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
}

.social-icon {
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.2) rotate(5deg);
}

.captcha-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #868a9d 0%, #8f8a95 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.captcha-box {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.captcha-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 18px;
  text-align: center;
  margin: 20px 0;
}

.captcha-code {
  background: #f7fafc;
  padding: 20px;
  border-radius: 10px;
  font-size: 32px;
  font-weight: bold;
  letter-spacing: 10px;
  color: #667eea;
  user-select: none;
  margin: 20px 0;
}

/* .hidden {
        display: none;
      } */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 15px;
  max-width: 90%;
  max-height: 90%;
  overflow: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: scale(1);
}

.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #10b981;
  color: white;
  padding: 16px 24px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 2000;
  opacity: 0;
  transform: translateY(100px);
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.side-cart {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 100;
}

.side-cart-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.side-cart-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .side-cart {
    display: none;
  }

  #home {
    padding-top: 120px !important;
  }

  #home .grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  #home h1 {
    font-size: 2.5rem !important;
  }

  #home .text-2xl {
    font-size: 1.5rem !important;
  }

  .floating-element {
    width: 60px !important;
    height: 60px !important;
    font-size: 2rem !important;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  #languageSelect {
    display: hidden;
    width: 2px;
  }

  #currentDateTime {
    display: hidden;
  }
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}

#mobileMenu {
  position: fixed;
  top: 64px;
  right: -100%;
  width: 280px;
  height: calc(100% - 64px);
  background: white;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 50;
  overflow-y: auto;
}

#mobileMenu.active {
  right: 0;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.hamburger span {
  width: 24px;
  height: 3px;
  background: #374151;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

@view-transition {
  navigation: auto;
}

/* Modal hidden by default */
#projectModal {
  display: none;
}
/* Show when active */
#projectModal.active {
  display: flex;
}

/* Chat Animation */
.chat-animate {
  animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Loader Bar */
#loader-bar {
  width: 0%;
  animation: loading 2.5s linear forwards;
}

@keyframes loading {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* chat bot */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Scroll Dot Animation */
@keyframes scrollDot {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(10px);
    opacity: 0.5;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Tooltip Styles */
.tooltip {
  position: absolute;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0;
  transition: 0.3s;
  backdrop-filter: blur(6px);
}
.group:hover .tooltip {
  opacity: 1;
}

/* animation project modal */
@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Shimmer Animation */
@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* Custom button focus states */
button:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

/* Smooth icons */
.fa-solid {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* QR Panel Styles */
/* Panel Classes for Logic */
.qr-open {
  left: 0 !important;
}
.qr-closed {
  left: -12rem !important;
} /* Adjust based on width */

#qrPanel i {
  transition: transform 0.5s ease;
}
.rotate-180 {
  transform: rotate(180deg);
}
