/* ═══════════════════════════════
   SMOOTH ANIMATIONS & TRANSITIONS
═══════════════════════════════ */


button, a {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal Animations */
.modal {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.open {
  display: flex !important;
  opacity: 1;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  z-index: -1;
}

.modal-content {
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1001;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.open .modal-content {
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Safari-style Modal */
.modal-safari {
  width: 100%;
  max-width: 500px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(135deg, rgba(18,18,18, 0.98), rgba(20,20,20, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
}

@media (max-width: 768px) {
  .modal-safari {
    border-radius: 20px 20px 0 0;
  }
}

.modal-header-safari {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.modal-title-safari {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.modal-btn-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.2s;
}

.modal-btn-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

.modal-spacer {
  width: 32px;
}

.modal-body-safari {
  padding: 20px;
}

/* Slide Up Animation */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Fade Up Animation - for stat cards and panels */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pricing Options */
.pricing-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pricing-option {
  padding: 16px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pricing-option:hover {
  border-color: rgba(255,255,255, 0.3);
  background: rgba(255,255,255, 0.05);
  transform: translateY(-2px);
}

.pricing-option.active {
  border-color: rgba(255,255,255, 0.8);
  background: rgba(255,255,255, 0.15);
}

.pricing-opt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pricing-opt-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.pricing-opt-price {
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255, 0.9);
}

.pricing-opt-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
}

.btn-select-plan {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255, 0.4);
  background: rgba(255,255,255, 0.15);
  color: rgba(255,255,255, 0.9);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-select-plan:hover {
  background: rgba(255,255,255, 0.25);
  border-color: rgba(255,255,255, 0.6);
}

/* Payment Methods */
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}

.payment-method:hover {
  border-color: rgba(255,255,255, 0.3);
  background: rgba(255,255,255, 0.05);
  transform: translateX(4px);
}

.payment-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255,255,255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: rgba(255,255,255, 0.8);
  flex-shrink: 0;
}

.payment-info {
  flex: 1;
}

.payment-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.payment-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.payment-method i:last-child {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.3);
  transition: all 0.3s;
}

.payment-method:hover i:last-child {
  color: rgba(255, 255, 255, 0.6);
  transform: translateX(4px);
}

/* Advanced Settings Dropdown + Slider styling
   (v8.3 — dipindah full ke main.css. Block yang di sini SEBELUMNYA pakai
   `transition: all 0.2s` di slider thumb dan `max-height` di dropdown —
   itu akar penyebab kesan "seret"/nge-lag pas drag slider & buka dropdown,
   karena rule di file ini di-load PALING TERAKHIR jadi selalu menang lawan
   perbaikan di main.css manapun. Sekarang main.css jadi satu-satunya
   sumber kebenaran buat komponen ini.) */

.slider-val {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255, 0.9);
  min-width: 45px;
  text-align: right;
  transition: color 0.2s;
}

/* Smooth Slider Value Changes with Delay */
.slider-val.updating {
  animation: pulse 0.3s ease-out;
}

@keyframes pulse {
  0% {
    transform: scale(1.1);
    color: rgba(255,255,255, 1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    color: rgba(255,255,255, 0.9);
  }
}

/* Feature Cards Hover */
.feature-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
  transform: translateY(-8px);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Pricing Cards */
.pricing-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-feat {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}

.pricing-feat i {
  color: rgba(255,255,255, 0.8);
  flex-shrink: 0;
}

/* Button Animations */
.btn-pricing, .btn-hero-primary, .btn-hero-secondary {
  position: relative;
  overflow: hidden;
}

.btn-pricing:active, .btn-hero-primary:active, .btn-hero-secondary:active {
  transform: scale(0.98);
}

/* Badge Animation */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.3s;
}

.badge-linked {
  background: rgba(48, 209, 88, 0.15);
  color: rgba(48, 209, 88, 0.9);
}

.badge-unlinked {
  background: rgba(255, 60, 80, 0.15);
  color: rgba(255, 60, 80, 0.9);
}

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
}

/* Navigation Links Active State */
.nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

/* Loader Animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  animation: spin 1s linear infinite;
}

/* ═══════════════════════════════
   DASHBOARD & PROFILE ANIMATIONS
═══════════════════════════════ */
/* (v8.2 — .dashboard-container, per-card slideUp/nth-child stagger, dan
   .nav-profile-dropdown/.btn-profile/.profile-menu semuanya dihapus:
   sudah tidak dipakai lagi sejak layout sidebar SPA + unified page-slide
   transition. Ini adalah sumber bug "bounce" yang masih kejadian walau
   sudah dihapus dari main.css/dashboard-extra.css — rule ini ke-load
   belakangan dan nimpa punya main.css. ) */

/* Tab Buttons with Icon Animation */
.tab-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border-bottom: 2px solid transparent;
  margin-bottom: -14px;
  font-family: inherit;
}

.tab-btn:hover {
  color: rgba(255, 255, 255, 0.7);
}

.tab-btn.active {
  color: rgba(255,255,255, 0.9);
  border-bottom-color: rgba(255,255,255, 0.8);
}

.tab-btn i {
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn:hover i {
  transform: scale(1.1);
}

.tab-btn.active i {
  color: rgba(255,255,255, 0.9);
}

/* ═══════════════════════════════════════
   HOW TO USE MODAL — center alignment override
═══════════════════════════════════════ */
.modal-howto.open {
  align-items: center !important;
  justify-content: center !important;
}
.modal-howto .modal-howto-content {
  animation: howtoIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both !important;
}
@keyframes howtoIn {
  from { opacity: 0; transform: scale(0.88) translateY(16px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}