/* ═══════════════════════════════
   SMOOTH ANIMATIONS & TRANSITIONS
═══════════════════════════════ */

/* Button & Link Hover Effects */
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(20, 20, 30, 0.98), rgba(25, 25, 40, 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(100, 150, 255, 0.3);
  background: rgba(100, 150, 255, 0.05);
  transform: translateY(-2px);
}

.pricing-option.active {
  border-color: rgba(100, 150, 255, 0.8);
  background: rgba(100, 150, 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(100, 150, 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(100, 150, 255, 0.4);
  background: rgba(100, 150, 255, 0.15);
  color: rgba(100, 150, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-select-plan:hover {
  background: rgba(100, 150, 255, 0.25);
  border-color: rgba(100, 150, 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(100, 150, 255, 0.3);
  background: rgba(100, 150, 255, 0.05);
  transform: translateX(4px);
}

.payment-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(100, 150, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: rgba(100, 150, 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 */
.adv-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.adv-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.adv-arrow {
  display: flex;
  align-items: center;
  font-size: 18px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.adv-toggle.open .adv-arrow {
  transform: rotate(180deg);
}

.adv-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0;
}

.adv-body.open {
  max-height: 400px;
  opacity: 1;
  margin-top: 12px;
}

/* Slider Animations */
.slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  animation: fadeIn 0.4s ease-out;
}

.slider-row:nth-child(1) {
  animation-delay: 0.05s;
}

.slider-row:nth-child(2) {
  animation-delay: 0.1s;
}

.slider-row:nth-child(3) {
  animation-delay: 0.15s;
}

.slider-lbl {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  min-width: 60px;
}

.slider-row input[type="range"] {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: background 0.3s;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(100, 150, 255, 0.9), rgba(100, 200, 255, 0.9));
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(100, 150, 255, 0.4);
}

.slider-row input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 16px rgba(100, 150, 255, 0.6);
}

.slider-row input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(100, 150, 255, 0.9), rgba(100, 200, 255, 0.9));
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(100, 150, 255, 0.4);
}

.slider-row input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 16px rgba(100, 150, 255, 0.6);
}

.slider-val {
  font-size: 12px;
  font-weight: 600;
  color: rgba(100, 150, 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(100, 200, 255, 1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    color: rgba(100, 150, 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(100, 150, 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);
}

/* Stat Cards Animation */
.stat-card {
  animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

/* Panel Animation */
.panel {
  animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

/* Loader Animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  animation: spin 1s linear infinite;
}

/* ═══════════════════════════════
   DASHBOARD & PROFILE ANIMATIONS
═══════════════════════════════ */

/* Dashboard Container Entrance */
.dashboard-container {
  animation: dashboardFadeIn 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dashboardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stat Cards Initial State (for staggered animation) */
.stat-card {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.15s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.25s; }

/* Panel Cards Initial State (for staggered animation) */
.panel {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Profile Dropdown */
.nav-profile-dropdown {
  position: relative;
}

.btn-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 14px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-profile:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

.profile-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  transition: all 0.3s;
}

.btn-profile:hover .profile-img {
  box-shadow: 0 0 8px rgba(100, 150, 255, 0.3);
}

.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.95), rgba(25, 25, 40, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  min-width: 200px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  overflow: hidden;
}

.profile-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 13px;
}

.profile-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.profile-item i {
  font-size: 16px;
  color: rgba(100, 150, 255, 0.7);
  transition: all 0.2s;
}

.profile-item:hover i {
  color: rgba(100, 150, 255, 0.9);
}

.profile-logout {
  color: rgba(255, 90, 90, 0.7);
}

.profile-logout:hover {
  background: rgba(255, 90, 90, 0.1);
  color: rgba(255, 90, 90, 0.9);
}

.profile-logout i {
  color: rgba(255, 90, 90, 0.7);
}

.profile-logout:hover i {
  color: rgba(255, 90, 90, 0.9);
}

.profile-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

/* 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(100, 150, 255, 0.9);
  border-bottom-color: rgba(100, 150, 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(100, 150, 255, 0.9);
}

/* Tab Pane Smooth Transitions */
#pane-personal, #pane-group {
  animation: fadeIn 0.3s ease-out;
}

/* Smooth Profile Dropdown State Changes */
.btn-profile .ri-arrow-down-s-line {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-profile:hover .ri-arrow-down-s-line {
  transform: scale(1.1);
}

