/* Global Modal Styles */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  background: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  pointer-events: auto !important;
  animation: fadeInOverlay 0.3s ease-out;
}

@keyframes fadeInOverlay {
  from {
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
  }
  to {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
  }
}

.edit-profile-modal, .common-modal {
  background: white;
  width: 90%;
  max-width: 450px;
  max-height: 90vh;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10000;
  color: #1e293b;
  animation: scaleInModal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleInModal {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
}

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}

.modal-header button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #64748b;
  position: relative;
  overflow: hidden;
}

.modal-header button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.modal-header button:hover::before {
  width: 32px;
  height: 32px;
}

.modal-header button:hover {
  background: #f1f5f9;
  color: var(--text-main);
  transform: scale(1.08);
}

.edit-form, .modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 80vh;
  overflow-y: auto;
}

/* Modal Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadePure {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fade-pure {
  animation: fadePure 0.3s ease-out forwards;
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-scale {
  animation: scaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-slide-up {
  animation: slideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Specific Modal Utilities */
.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Aether Edit Profile Modal Styles */
.aether-edit-modal {
  background: white;
  width: 100%;
  max-width: 420px;
  height: 90vh;
  max-height: 800px;
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.aether-modal-header {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.aether-modal-header .back-btn {
  background: none;
  border: none;
  color: #1e293b;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aether-modal-header .modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}

.aether-modal-header .save-text-btn {
  background: none;
  border: none;
  color: #6366f1; /* Premium primary color */
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  padding: 8px 12px;
}

.aether-modal-header .save-text-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.aether-modal-body {
  flex: 1;
  padding: 0 24px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.aether-edit-pic-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
}

.aether-pic-wrapper {
  position: relative;
  width: 160px;
  height: 160px;
  cursor: pointer;
}

.aether-edit-pic {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  padding: 6px;
  background: white;
}

.pic-edit-ring {
  position: absolute;
  inset: 0;
  border: 3px solid #6366f1;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}

.aether-edit-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.aether-input-field {
  position: relative;
  display: flex;
  flex-direction: column;
}

.field-label {
  position: absolute;
  top: -10px;
  left: 16px;
  background: white;
  padding: 0 8px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #6366f1;
  z-index: 1;
}

.field-input, .field-textarea {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  transition: all 0.3s ease;
  background: white;
}

.field-input:focus, .field-textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.field-input:disabled {
  background: #f8fafc;
  color: #94a3b8;
  border-color: #f1f5f9;
}

.field-textarea {
  resize: none;
  line-height: 1.5;
}

/* Custom Scrollbar for Aether Modal */
.aether-modal-body::-webkit-scrollbar {
  width: 5px;
}

.aether-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.aether-modal-body::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 10px;
}

/* Dark Mode Overrides for Modals */
html.dark .edit-profile-modal,
html.dark .common-modal,
html.dark .aether-edit-modal {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

html.dark .modal-header,
html.dark .modal-footer {
  border-color: var(--border);
}

html.dark .modal-header h2,
html.dark .aether-modal-header .modal-title,
html.dark .aether-modal-header .back-btn {
  color: var(--text-main);
}

html.dark .modal-header button:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

html.dark .aether-edit-pic {
  background: var(--bg-hover);
}

html.dark .field-label {
  background: var(--bg-card);
  color: var(--primary);
}

html.dark .field-input,
html.dark .field-textarea {
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--text-main);
}

html.dark .field-input:focus,
html.dark .field-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

html.dark .field-input:disabled {
  background: var(--bg-main);
  color: var(--text-muted);
  border-color: var(--border);
}

html.dark .aether-modal-body::-webkit-scrollbar-thumb {
  background: var(--border);
}
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 60px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding: 0 20px;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.03);
}

.bottom-nav:hover {
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 10px 0;
  gap: 4px;
  border-radius: 12px;
  margin: 0 4px;
  position: relative;
}

.nav-label {
  display: none;
  font-size: 0.75rem;
  font-weight: 500;
}

.bottom-nav-item:hover {
  color: var(--primary);
}

.bottom-nav-item.active {
  color: var(--primary);
}

/* Removed active indicator dot */

.bottom-nav-item svg {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav-item:hover svg {
  transform: scale(1.1);
}

.bottom-nav-item.active svg {
  stroke-width: 2.5px;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 15px;
  z-index: 9999;
  pointer-events: auto !important;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

body.modal-open .top-nav {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.top-nav-left {
  flex: 1;
  display: flex;
  align-items: center;
}

.top-nav-center {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.top-nav-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.dark-theme .bottom-nav {
  background: #000000;
  border-top-color: #222222;
}

.dark-theme .bottom-nav-item {
  color: #a0a0a0;
}

.dark-theme .bottom-nav-item.active {
  color: #ffffff;
}

.dark-theme .top-nav {
  background: rgba(0, 0, 0, 0.98);
  border-bottom-color: #222222;
}

.dark-theme .icon-btn {
  color: #ffffff;
}

.dark-theme .icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dark-theme .app-nav-logo {
  filter: invert(1);
}

.app-nav-logo {
  height: 80px;
  width: auto;
  cursor: pointer;
  object-fit: contain;
}

.sticky-header {
  position: sticky;
  top: 70px;
  z-index: 100;
}

@media (min-width: 768px) {
  .top-nav {
    display: flex;
  }

  .top-nav.owns-profile {
    display: none;
  }

  .top-nav.owns-profile ~ .main-content .sticky-header {
    top: 0;
  }

  .top-nav .app-nav-logo {
    display: none;
  }

  .app-layout.has-top-nav .main-content {
    padding-top: 70px;
  }

  .sticky-header {
    top: 70px;
  }
}

@media (max-width: 767px) {
  .top-nav {
    display: flex !important;
  }

  .top-nav .app-nav-logo {
    display: block !important;
  }

  .app-layout.has-top-nav .main-content {
    padding-top: 70px;
  }
}

/* top-nav-right moved up into flex layout */

.icon-btn {
  background: none;
  border: none;
  color: var(--text-main);
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  pointer-events: auto !important;
  position: relative;
  overflow: hidden;
}

.icon-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.icon-btn:hover::before {
  width: 40px;
  height: 40px;
}

.icon-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--primary);
  transform: scale(1.05);
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn-action {
  cursor: pointer;
  transition: var(--transition);
}

.icon-btn-action:hover {
  transform: scale(1.1);
  color: var(--primary);
}

.icon-btn-action.liked {
  color: #ff3b30;
  fill: #ff3b30;
}

.icon-btn-action.saved {
  color: #ff9500;
  fill: #ff9500;
}

/* Notification Dot - Global Styles */
.icon-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  background-color: #0095f6;
  /* A vibrant blue */
  border: 2px solid white;
  border-radius: 50%;
  z-index: 5;
}

.bottom-nav-item .notification-dot {
  top: 0px;
  right: -2px;
}

.icon-btn .notification-dot {
  top: 2px;
  right: 2px;
}

.sidebar-item .notification-dot {
  top: 8px;
  left: 32px;
}

@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }

  .top-nav {
    padding-right: 80px;
    /* Space for the collapsed right sidebar */
  }

  .top-nav-right {
    display: none;
  }

  .top-nav-right.desktop-visible {
    display: flex !important;
  }

  .right-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 80px;
    background: #ffffff;
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    z-index: 1005;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
  }

  .sidebar-logo-container {
    padding: 0px;
    margin-bottom: 5px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    transition: all 0.3s ease;
    width: 100%;
  }

  .sidebar-logo {
    height: 60px;
    width: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
  }

  .right-sidebar:hover .sidebar-logo {
    height: 80px;
  }

  .right-sidebar:hover .sidebar-logo-container {
    justify-content: flex-start;
    padding-left: 10px;
  }

  .right-sidebar:hover {
    width: 250px;
  }

  .sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 14px;
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
    border-radius: 12px;
    margin: 0 13px;
    white-space: nowrap;
  }

  .sidebar-item svg {
    flex-shrink: 0;
  }

  .sidebar-item:hover {
    background: rgba(0, 0, 0, 0.05);
  }

  .sidebar-item.active {
    font-weight: 700;
  }

  .sidebar-item.active svg {
    stroke-width: 2.5px;
  }

  .sidebar-item .notification-dot {
    top: 8px;
    left: 32px;
  }

  .sidebar-label {
    font-size: 1rem;
    opacity: 0;
    max-width: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
  }

  .right-sidebar:hover .sidebar-label {
    opacity: 1;
    max-width: 150px;
    pointer-events: auto;
  }
}

@media (max-width: 767px) {
  .desktop-only {
    display: none !important;
  }
}.auth-page-root {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fdfdff;
  background-image:
    radial-gradient(#e2e8f0 1px, transparent 1px),
    radial-gradient(#e2e8f0 1px, transparent 1px);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
  font-family: 'Inter', sans-serif;
  padding: 20px;
}

.auth-card-container {
  width: 100%;
  max-width: 440px;
  perspective: 1000px;
}

.auth-premium-card {
  background: #ffffff;
  border-radius: 32px;
  padding: 40px;
  box-shadow: 0 40px 80px rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-logo-section {
  display: flex;
  justify-content: center;
  margin: 20px 0 30px;
  width: 100%;
}

.logo-clean-frame {
  width: 260px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-welcome-text {
  text-align: center;
  margin-bottom: 35px;
}

.auth-welcome-text h2 {
  font-size: 1.75rem;
  font-weight: 900;
  color: #1e293b;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.auth-welcome-text p {
  font-size: 0.95rem;
  color: #64748b;
  font-weight: 500;
}

.auth-premium-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.premium-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.premium-input-group label {
  font-size: 0.7rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.08em;
}

.forgot-link {
  background: none;
  border: none;
  font-size: 0.7rem;
  font-weight: 800;
  color: #6366f1;
  cursor: pointer;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  color: #94a3b8;
}

.input-with-icon input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  border-radius: 20px;
  /* More rounded */
  border: 1px solid #f1f5f9;
  background: #ffffff;
  font-size: 1rem;
  color: #1e293b;
  font-weight: 500;
  transition: all 0.2s;
}

.input-with-icon input::placeholder {
  color: #cbd5e1;
}

.input-with-icon input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.05);
}

.eye-toggle {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
}

.btn-premium-auth {
  margin-top: 10px;
  padding: 18px;
  border-radius: 24px;
  /* More rounded */
  border: none;
  background: #2563eb;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 15px 30px rgba(37, 99, 235, 0.25);
}

.login-mode .btn-premium-auth {
  background: #4f46e5;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.2);
}

.btn-premium-auth:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-premium-auth:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-divider-premium {
  position: relative;
  text-align: center;
  margin: 30px 0;
}

.auth-divider-premium::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #f1f5f9;
}

.auth-divider-premium span {
  position: relative;
  background: #ffffff;
  padding: 0 15px;
  font-size: 0.65rem;
  font-weight: 800;
  color: #cbd5e1;
  letter-spacing: 0.08em;
}

.google-auth-wrapper {
  position: relative;
  margin-bottom: 30px;
}

.google-mock-btn {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #f1f5f9;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.google-mock-btn img {
  width: 20px;
  height: 20px;
}

.google-mock-btn span {
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
}

.real-google-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.01;
  cursor: pointer;
}

.auth-mode-switch {
  text-align: center;
  margin-top: 10px;
}

.auth-mode-switch p {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 500;
}

.switch-link {
  background: none;
  border: none;
  color: #4f46e5;
  font-weight: 700;
  margin-left: 6px;
  cursor: pointer;
}

.auth-error-pill {
  background: #fff1f2;
  color: #f43f5e;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  border: 1px solid #ffe4e6;
}

.success-card {
  text-align: center;
  padding: 60px 40px;
}

.success-icon {
  margin-bottom: 25px;
}

.success-card h2 {
  font-size: 1.8rem;
  font-weight: 900;
  color: #1e293b;
  margin-bottom: 15px;
}

.success-card p {
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 30px;
}

@media (max-width: 480px) {
  .auth-premium-card {
    padding: 30px 24px;
    border-radius: 0;
    min-height: 100vh;
  }

  .auth-page-root {
    padding: 0;
  }
}

/* Minimalistic Welcome Modal overlay style */
.welcome-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  /* soft slate transparent overlay */
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Minimalist Card Style */
.welcome-modal-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  /* Simple subtle border */
  border-radius: 16px;
  /* standard clean rounded corners */
  width: 100%;
  max-width: 480px;
  /* compact width to prevent any scrolling */
  padding: 32px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  animation: welcomeScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes welcomeScaleIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Close Button (Minimalist clean X) */
.welcome-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.15s ease;
  z-index: 10;
}

.welcome-modal-close:hover {
  color: #475569;
}

/* Header style - Classic Bracketed Title */
.welcome-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.welcome-modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.01em;
  margin: 0;
  font-family: inherit;
}

/* Body / content */
.welcome-modal-body {
  margin-bottom: 24px;
}

.welcome-intro-text {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.5;
  text-align: left;
  font-weight: 500;
  margin-bottom: 12px;
}

/* Bullet list section - very clean, flat, minimalistic */
.welcome-bullet-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding-left: 4px;
}

.welcome-bullet-item {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.45;
  font-weight: 400;
  text-align: left;
}

.welcome-footer-text {
  font-size: 0.85rem;
  color: #64748b;
  text-align: left;
  line-height: 1.4;
  margin-top: 12px;
}

/* Enter button - clean solid minimalist blue button matching standard forms */
.welcome-enter-btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  /* Clean and standard */
  background: #1e40af;
  /* Deep classic solid blue */
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  cursor: pointer;
}

.welcome-enter-btn:hover {
  background: #1d4ed8;
}

.welcome-enter-btn:active {
  transform: scale(0.99);
}

.welcome-logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.welcome-logo-img {
  max-height: 100px;
  object-fit: contain;
}

.welcome-modal-footer {
  text-align: center;
  margin-top: 20px;
  border-top: 1px dashed #cbd5e1;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.welcome-footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.welcome-footer-link {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.welcome-footer-link:hover {
  color: #1e40af;
  text-decoration: underline;
}

.welcome-link-separator {
  color: #cbd5e1;
  font-size: 0.75rem;
  user-select: none;
}

.welcome-copyright {
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 500;
}

@media (max-width: 480px) {
  .welcome-modal-card {
    padding: 24px 20px;
    border-radius: 12px;
    max-width: 100%;
  }

  .welcome-modal-title {
    font-size: 1.2rem;
  }
}

/* Document viewer for welcome sub-tabs */
.welcome-scrollable-doc {
  max-height: 240px;
  overflow-y: auto;
  padding-right: 8px;
  margin-bottom: 20px;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  background: #f8fafc;
}

/* Custom Scrollbar for document viewer */
.welcome-scrollable-doc::-webkit-scrollbar {
  width: 6px;
}
.welcome-scrollable-doc::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}
.welcome-scrollable-doc::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
.welcome-scrollable-doc::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.welcome-doc-section {
  margin-bottom: 16px;
}
.welcome-doc-section:last-child {
  margin-bottom: 0;
}

.welcome-doc-subtitle {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.welcome-doc-text {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.45;
  margin: 0;
}:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #6366f1;
  --secondary: #1e293b;
  --tertiary: #6366f1;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-soft: #f8fafc;
  --accent: #f43f5e;
  --radius: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-heading: 'Public Sans', sans-serif;
  --font-body: 'Noto Serif', serif;
  --font-label: 'Inter', sans-serif;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
  --primary-soft: rgba(79, 70, 229, 0.1);
  --shadow-premium: 0 25px 50px -12px rgba(79, 70, 229, 0.25);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-label);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

button:active {
  transform: scale(0.98);
}

input {
  font-family: inherit;
  transition: var(--transition-fast);
}

input:focus {
  outline: none;
}

.glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: var(--transition-smooth);
}

.glass:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Universal Verified Badge Styles */
.verified-celestial-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 6px;
}

.verified-rosette {
  filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.3));
  animation: starPulse 4s infinite ease-in-out;
}

@keyframes starPulse {
  0%, 100% { 
    transform: scale(1);
    filter: brightness(1) drop-shadow(0 2px 8px rgba(59, 130, 246, 0.3));
  }
  50% { 
    transform: scale(1.08);
    filter: brightness(1.2) drop-shadow(0 4px 16px rgba(59, 130, 246, 0.5));
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Premium Loader Styles */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
}

.premium-loader {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(79, 70, 229, 0.1);
  border-left-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Premium Dark Mode Variables */
html.dark, :root.dark {
  --bg-main: #090d16;
  --bg-card: #111827;
  --bg-hover: #1f2937;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border: #374151;
  --border-soft: #1f2937;
  --secondary: #f3f4f6;
  --tertiary: #818cf8;
}

/* ===============================================
   Global Dark Mode Override Rules
   =============================================== */
html.dark body {
  background-color: var(--bg-main);
  color: var(--text-main);
}

/* Settings Page Dark Mode */
html.dark .settings-page-wrapper {
  background-color: var(--bg-main) !important;
}
html.dark .settings-header-premium {
  background: var(--bg-card) !important;
  border-bottom: 1px solid var(--border) !important;
}
html.dark .settings-header-premium h2 {
  color: var(--text-main) !important;
}
html.dark .settings-card-premium {
  background: var(--bg-card) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}
html.dark .settings-item-premium {
  border-bottom: 1px solid var(--border-soft) !important;
}
html.dark .settings-item-premium:active {
  background: var(--bg-hover) !important;
}
html.dark .settings-item-label {
  color: var(--text-main) !important;
}
html.dark .settings-item-subtext {
  color: var(--text-muted) !important;
}
html.dark .btn-logout-premium {
  background: var(--bg-card) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}
html.dark .btn-logout-premium:hover {
  background: rgba(239, 68, 68, 0.1) !important;
}
html.dark .premium-slider {
  background-color: var(--bg-hover) !important;
}

/* Profile Page Dark Mode */
html.dark .profile-wrapper {
  background: var(--bg-main) !important;
}
html.dark .edit-profile-pill {
  background: var(--bg-card) !important;
  border-color: var(--border) !important;
  color: var(--text-main) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}
html.dark .profile-pic-ring {
  background: var(--bg-main) !important;
  border-color: var(--border) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
}
html.dark .stat-num {
  color: var(--text-main) !important;
}
html.dark .stat-text {
  color: var(--text-muted) !important;
}
html.dark .profile-name {
  color: var(--text-main) !important;
}
html.dark .profile-handle-sub {
  color: var(--text-muted) !important;
}
html.dark .profile-bio {
  color: var(--text-main) !important;
}
html.dark .profile-nav-tabs {
  border-bottom-color: var(--border) !important;
}
html.dark .nav-tab-btn {
  color: var(--text-muted) !important;
}
html.dark .nav-tab-btn.active {
  color: var(--primary) !important;
}
html.dark .content-grid .grid-post {
  background: var(--bg-card) !important;
}
html.dark .metrics-bar {
  background: var(--bg-card) !important;
  border-top-color: var(--border) !important;
  border-bottom-color: var(--border) !important;
}
html.dark .metrics-bar-item .num {
  color: var(--text-main) !important;
}
html.dark .personality-section {
  background: var(--bg-card) !important;
  border-color: var(--border) !important;
}
html.dark .personality-percentage {
  color: var(--text-muted) !important;
}
html.dark .personality-bar-bg {
  background: var(--bg-hover) !important;
}
html.dark .featured-badge-pill {
  background: var(--bg-card) !important;
  border-color: var(--border) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
}
html.dark .badge-pill-name {
  color: var(--text-main) !important;
}
html.dark .add-badge-btn {
  background: var(--bg-card) !important;
  border-color: var(--border) !important;
  color: var(--text-muted) !important;
}
html.dark .add-badge-btn:hover {
  background: var(--bg-hover) !important;
  color: var(--primary) !important;
}
html.dark .xp-progress-section {
  background: linear-gradient(145deg, var(--bg-card), var(--bg-main)) !important;
  border-color: var(--border) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
}
html.dark .xp-value {
  color: var(--text-main) !important;
}
html.dark .xp-bar-container {
  background: var(--bg-hover) !important;
  border-color: var(--bg-hover) !important;
}
html.dark .lv-badge-inline {
  background: var(--bg-card) !important;
  color: var(--text-main) !important;
}
html.dark .lv-badge-inline:hover {
  background: var(--bg-hover) !important;
}
html.dark .lv-badge-inline.active {
  background: var(--primary) !important;
  color: white !important;
}

/* Search Page Dark Mode */
html.dark .search-page {
  background-color: var(--bg-main) !important;
  color: var(--text-main) !important;
}
html.dark .search-header {
  background: var(--bg-card) !important;
  border-bottom-color: var(--border) !important;
}
html.dark .search-input-premium {
  background: var(--bg-hover) !important;
  color: var(--text-main) !important;
}
html.dark .search-input-premium:focus {
  background: var(--bg-hover) !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3) !important;
}
html.dark .section-title {
  color: var(--text-main) !important;
}
html.dark .nearby-card {
  background: var(--bg-card) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}
html.dark .user-avatar-premium {
  border-color: var(--border) !important;
}
html.dark .user-handle-premium {
  color: var(--text-main) !important;
}
html.dark .btn-wave-premium {
  background: var(--bg-hover) !important;
  color: var(--primary-light) !important;
}
html.dark .btn-wave-premium:hover {
  background: var(--border) !important;
}
html.dark .btn-wave-premium.waved {
  background: var(--border-soft) !important;
  color: var(--text-muted) !important;
}
html.dark .btn-follow-premium {
  background: var(--primary) !important;
  color: white !important;
}
html.dark .btn-follow-premium.following {
  background: var(--bg-hover) !important;
  color: var(--text-main) !important;
  border-color: var(--border) !important;
}
html.dark .trending-tag {
  background: var(--bg-hover) !important;
  color: var(--primary-light) !important;
}
html.dark .trending-tag:hover {
  background: var(--border) !important;
}

/* Navigation & Sidebars Dark Mode overrides */
html.dark .top-nav {
  background: rgba(17, 24, 39, 0.98) !important;
  border-bottom-color: var(--border) !important;
}
html.dark .bottom-nav {
  background: var(--bg-card) !important;
  border-top-color: var(--border) !important;
}
html.dark .right-sidebar {
  background: var(--bg-card) !important;
  border-left-color: var(--border) !important;
}
html.dark .sidebar-item:hover {
  background: var(--bg-hover) !important;
}
html.dark .sidebar-item.active {
  color: var(--primary-light) !important;
}
html.dark .icon-btn {
  color: var(--text-main) !important;
}
html.dark .icon-btn:hover {
  background: var(--bg-hover) !important;
}
html.dark .navbar {
  background: rgba(17, 24, 39, 0.95) !important;
  border-bottom-color: var(--border) !important;
}

/* Modals & Popups Dark Mode overrides */
html.dark .post-detail-info {
  background: var(--bg-card) !important;
  color: var(--text-main) !important;
  border-left-color: var(--border) !important;
  border-top-color: var(--border) !important;
}
html.dark .pd-comments-section {
  color: var(--text-main) !important;
}
html.dark .modal-content-premium, html.dark .comments-modal-container, html.dark .share-modal-container {
  background: var(--bg-card) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border) !important;
}

/* Glassmorphism adjustment in dark mode */
html.dark .glass {
  background: rgba(17, 24, 39, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}
html.dark .glass:hover {
  background: rgba(17, 24, 39, 0.9) !important;
}

/* Universal badge glow tweaks */
html.dark .verified-rosette {
  filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.4));
}

/* ===============================================
   Advanced Animations & Smooth Effects Library
   =============================================== */

/* Button & Interactive Elements */
.btn-smooth {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-smooth::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(37, 99, 235, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-smooth:hover::before {
  width: 300px;
  height: 300px;
}

.btn-smooth:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

.btn-smooth:active {
  transform: scale(0.98);
}

/* Link Hover Effects */
.link-smooth {
  position: relative;
  transition: color 0.3s ease;
}

.link-smooth::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-smooth:hover::after {
  width: 100%;
}

/* Card Hover Effects */
.card-lift {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.card-glow {
  transition: all 0.4s ease;
}

.card-glow:hover {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.2);
}

/* Smooth Input Focus */
.input-smooth {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid var(--border);
}

.input-smooth:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  transform: scale(1.01);
}

/* Loading Animation */
.skeleton-loader {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Smooth Fade In */
.fade-in-smooth {
  animation: fadeInSmooth 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes fadeInSmooth {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Slide Up Animation */
.slide-up-smooth {
  animation: slideUpSmooth 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideUpSmooth {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger Animation */
.stagger-item {
  opacity: 0;
  animation: slideUpSmooth 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(n+6) { animation-delay: calc(0.05s * (n - 1)); }

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

/* Icon Animations */
.icon-rotate {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-rotate:hover {
  transform: rotate(12deg) scale(1.1);
}

.icon-bounce {
  animation: bounce 0.8s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Gradient Animations */
.gradient-shift {
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--primary-light),
    var(--primary)
  );
  background-size: 200% 100%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* Pulse Animation */
.pulse-glow {
  animation: pulseGlow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.6);
  }
}

/* Text Animations */
.text-fade-in {
  animation: textFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes textFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth Transitions for Common Properties */
.smooth-transition {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.smooth-transition-slow {
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.smooth-transition-fast {
  transition: all 0.15s ease-out;
}

/* Hover Lift Effect */
.hover-lift {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Smooth Color Transition */
.color-transition {
  transition: color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              background-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              border-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Scale on Hover */
.scale-hover {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scale-hover:hover {
  transform: scale(1.05);
}

/* Underline Animation */
.underline-animation {
  position: relative;
  display: inline-block;
}

.underline-animation::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.underline-animation:hover::after {
  width: 100%;
}

/* Smooth Background Color Transition */
.bg-transition {
  transition: background-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Opacity Fade */
.opacity-fade {
  animation: opacityFade 1s ease-in-out infinite;
}

@keyframes opacityFade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Transform Smooth */
.transform-smooth {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Disable animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* ===============================================
   Smooth Scrolling & Layout Utilities
   =============================================== */

/* Smooth Scrolling Across All Platforms */
html {
  scroll-behavior: smooth;
}

body {
  scroll-behavior: smooth;
}

/* Better scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.3);
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(37, 99, 235, 0.6);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 99, 235, 0.3) transparent;
}

/* Selection Styling */
::selection {
  background: var(--primary);
  color: white;
}

::-moz-selection {
  background: var(--primary);
  color: white;
}

/* Smooth Focus Outline */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Placeholder Text Styling */
::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

::-moz-placeholder {
  color: var(--text-muted);
  opacity: 1;
}

/* Better Link Underline */
a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary);
}

/* Prevent Text Selection on Certain Elements */
.no-select {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Smooth Image Transitions */
img {
  transition: filter 0.3s ease, opacity 0.3s ease;
}

img:hover {
  filter: brightness(1.02);
}

/* Better Form Input Styling */
input,
textarea,
select {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* Better List Styling */
ul, ol {
  transition: all 0.3s ease;
}

li {
  transition: all 0.3s ease;
}

li:hover {
  transform: translateX(2px);
}

/* Smooth Transitions for Common Elements */
a, button, input, select, textarea, [role="button"] {
  transition: var(--transition-fast);
}

/* Disabled State Styling */
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Better Contrast for Accessibility */
@media (prefers-contrast: more) {
  :root {
    --text-main: #000;
    --text-muted: #333;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
  ::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.4);
  }

  ::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.6);
  }
}

/* High DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}



/* Center Utility Classes */
.center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Flex Utilities */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-gap {
  display: flex;
  gap: 1rem;
}

/* Grid Utilities */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

/* Smooth Overflow Handling */
.overflow-smooth {
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.3s ease;
}

.overflow-smooth:hover {
  overflow: visible;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glow Effects */
.glow {
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

.glow-intense {
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.5);
}

/* Smooth Height Transitions */
.smooth-height {
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth Width Transitions */
.smooth-width {
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth All Transitions */
.smooth-all {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shadow Transitions */
.shadow-smooth {
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.shadow-smooth:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}
