/* Custom CSS untuk XCODE Store - Mobile Smooth */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap");

* {
  font-family: "Inter", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* Smooth Shadow 3D Effect */
.shadow-3d {
  box-shadow: 4px 4px 0px rgba(109, 40, 217, 0.3),
    -1px -1px 0px rgba(167, 139, 250, 0.2);
}

.shadow-3d-hover {
  box-shadow: 4px 4px 0px rgba(109, 40, 217, 0.3),
    -1px -1px 0px rgba(167, 139, 250, 0.2);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.shadow-3d-hover:hover {
  box-shadow: 6px 6px 0px rgba(109, 40, 217, 0.4),
    -2px -2px 0px rgba(167, 139, 250, 0.3);
}

/* Animations */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.3s ease-out forwards;
}

.animate-slide-out-left {
  animation: slideOutLeft 0.3s ease-out forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #1f2937;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #6d28d9, #7c3aed);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #7c3aed, #8b5cf6);
}

/* Selection Color */
::selection {
  background: rgba(109, 40, 217, 0.3);
  color: white;
}

/* Mobile First Approach */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Mobile Kecil (HP kecil) */
@media (max-width: 360px) {
  .text-5xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }

  .text-7xl {
    font-size: 2.75rem;
    line-height: 1;
  }

  .py-20 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Mobile Standar */
@media (max-width: 480px) {
  .grid-cols-1 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .text-4xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }

  .text-2xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }

  .py-20 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  /* Mobile spacing improvements */
  .space-y-4 > * + * {
    margin-top: 1rem;
  }

  .gap-8 {
    gap: 1.5rem;
  }
}

/* Tablet Potrait */
@media (max-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .md\:flex {
    display: none;
  }

  /* Improve card sizing on tablet */
  .bg-gray-900.rounded-xl {
    margin: 0.5rem;
  }
}

/* Tablet Landscape / Laptop kecil */
@media (max-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .container {
    max-width: 100%;
    padding: 0 1.5rem;
  }
}

/* Desktop Standar */
@media (max-width: 1280px) {
  .container {
    max-width: 1140px;
  }
}

/* Desktop Besar / 4K */
@media (max-width: 1536px) {
  .container {
    max-width: 1280px;
  }
}

/* Button Hover Effects */
.btn-3d {
  transform: translateY(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 2px 2px 0px rgba(109, 40, 217, 0.3);
}

.btn-3d:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0px rgba(109, 40, 217, 0.4);
}

/* Card Hover Effects */
.card-3d {
  transform: perspective(1000px) rotateX(0) rotateY(0);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-3d:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(2deg);
}

/* Loading Animation */
.loading-spinner {
  border: 2px solid #1f2937;
  border-top: 2px solid #6d28d9;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Form Styling */
.form-input {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  color: white;
  font-size: 16px; /* Prevent zoom on iOS */
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #6d28d9;
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
}

/* Gradient Text Animation */
.gradient-text {
  background: linear-gradient(45deg, #6d28d9, #ec4899, #3b82f6);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  height: 100vh;
  background: #111827;
  border-right: 2px solid #6d28d9;
  z-index: 50;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.sidebar.active {
  left: 0;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  /* Improve touch targets */
  button,
  a {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Better text readability */
  p,
  span {
    line-height: 1.6;
  }

  /* Smoother transitions */
  * {
    transition-duration: 0.2s;
  }
}

/* Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #6d28d9;
  outline-offset: 2px;
}

/* Additional styles for login/register pages */

/* Form animations */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.animate-shake {
  animation: shake 0.5s ease-in-out;
}

/* Form input focus effects */
.form-input:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.15);
}

/* Checkbox styling */
.form-checkbox {
  border-radius: 4px;
}

.form-checkbox:checked {
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}

/* Gradient button hover effects */
.bg-gradient-to-r:hover {
  background-size: 200% 200%;
  animation: gradientShift 1.5s ease infinite;
}

/* Mobile optimizations for forms */
@media (max-width: 480px) {
  .min-h-screen {
    min-height: calc(100vh - 120px);
  }

  .py-12 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .p-6 {
    padding: 1.25rem;
  }

  .space-y-4 > * + * {
    margin-top: 1rem;
  }

  .grid.grid-cols-1.md\:grid-cols-2 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Improve touch targets */
  .form-input {
    padding: 0.875rem 0.75rem 0.875rem 2.5rem;
    font-size: 16px; /* Prevent zoom on iOS */
  }

  button,
  .btn-3d {
    min-height: 48px;
  }
}

/* Tablet optimizations */
@media (max-width: 768px) and (min-width: 481px) {
  .container.max-w-2xl {
    max-width: 90%;
  }

  .p-8 {
    padding: 1.5rem;
  }
}

/* Loading states */
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Success/Error message animations */
.bg-green-600\/20,
.bg-red-600\/20 {
  animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Password strength indicator */
.password-strength {
  height: 4px;
  border-radius: 2px;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
}

.password-strength.weak {
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  width: 33%;
}

.password-strength.medium {
  background: linear-gradient(90deg, #f59e0b, #eab308);
  width: 66%;
}

.password-strength.strong {
  background: linear-gradient(90deg, #10b981, #22c55e);
  width: 100%;
}

/* Custom placeholder color */
.form-input::placeholder {
  color: #6b7280;
}

.form-input:focus::placeholder {
  color: #9ca3af;
}

/* Additional styles for logout page */

/* Logout specific animations */
@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(109, 40, 217, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(109, 40, 217, 0.6);
  }
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Security badge animations */
.bg-gray-700\/30 {
  transition: all 0.3s ease;
}

.bg-gray-700\/30:hover {
  transform: translateY(-2px);
  border-color: rgba(109, 40, 217, 0.4);
}

/* Loading spinner variations */
.loading-spinner {
  border: 2px solid #1f2937;
  border-top: 2px solid #6d28d9;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

.loading-spinner.small {
  width: 20px;
  height: 20px;
  border-width: 1px;
}

/* Success state animations */
.border-green-500\/20 {
  animation: success-pulse 2s ease-in-out infinite;
}

@keyframes success-pulse {
  0%,
  100% {
    border-color: rgba(34, 197, 94, 0.2);
  }
  50% {
    border-color: rgba(34, 197, 94, 0.4);
  }
}

/* Mobile optimizations for logout page */
@media (max-width: 480px) {
  .p-8 {
    padding: 1.5rem;
  }

  .grid.grid-cols-2 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .text-2xl {
    font-size: 1.5rem;
  }

  .text-3xl {
    font-size: 1.75rem;
  }

  /* Improve touch targets for mobile */
  .bg-purple-600,
  .border-purple-600 {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Tablet optimizations */
@media (max-width: 768px) and (min-width: 481px) {
  .container.max-w-md {
    max-width: 90%;
  }
}

/* Smooth transitions for all interactive elements */
.btn-3d,
.bg-gray-800\/30,
.bg-purple-600 {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states for accessibility */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #6d28d9;
  outline-offset: 2px;
  border-radius: 8px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .animate-pulse,
  .animate-ping,
  .animate-pulse-glow,
  .loading-spinner {
    animation: none;
  }

  .transform {
    transform: none !important;
  }

  .transition-all {
    transition: none;
  }
}

/* Additional styles for new pages */

/* Product image gallery */
.product-gallery {
  display: grid;
  gap: 1rem;
}

.product-gallery img {
  transition: transform 0.3s ease;
}

.product-gallery img:hover {
  transform: scale(1.05);
}

/* Feature list animations */
.feature-item {
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateX(5px);
}

/* Stats card animations */
.stats-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-card:hover {
  transform: translateY(-5px) scale(1.02);
}

/* Team member cards */
.team-card {
  transition: all 0.3s ease;
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(109, 40, 217, 0.3);
}

/* Contact form enhancements */
.contact-info-item {
  transition: all 0.3s ease;
}

.contact-info-item:hover {
  transform: translateX(5px);
  background: rgba(109, 40, 217, 0.1);
}

/* FAQ item animations */
.faq-item {
  transition: all 0.3s ease;
}

.faq-item:hover {
  background: rgba(109, 40, 217, 0.05);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .product-gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablet optimizations */
@media (max-width: 1024px) and (min-width: 769px) {
  .product-gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Focus styles for better accessibility */
.form-input:focus,
button:focus,
a:focus {
  outline: 2px solid #6d28d9;
  outline-offset: 2px;
}

/* Loading states for buttons */
.btn-loading {
  position: relative;
  color: transparent;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-right-color: transparent;
  animation: spin 1s linear infinite;
}

/* Additional styles for order-detail page */

/* Timeline animations */
@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.timeline-step {
  animation: slideInFromLeft 0.6s ease-out forwards;
}

/* Status badge animations */
.status-badge {
  transition: all 0.3s ease;
}

.status-badge:hover {
  transform: scale(1.05);
}

/* File download button */
.download-btn {
  position: relative;
  overflow: hidden;
}

.download-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.download-btn:hover::before {
  left: 100%;
}

/* Mobile optimizations for order detail */
@media (max-width: 768px) {
  .timeline-steps {
    padding-left: 1rem;
  }

  .timeline-step {
    padding: 1rem 0;
  }

  .order-actions {
    position: sticky;
    bottom: 0;
    background: #1f2937;
    padding: 1rem;
    border-top: 1px solid #374151;
  }
}

/* Print styles for order detail */
@media print {
  .no-print {
    display: none !important;
  }

  .bg-gray-900 {
    background: white !important;
  }

  .text-white {
    color: black !important;
  }

  .bg-gray-800\/50 {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
  }
}

/* Loading animation for download */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Hover effects for interactive elements */
.interactive-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(109, 40, 217, 0.15);
}
