/**
 * SAP Learning HUB - Native Android Design System
 * Based on Material Design 3 principles for native app feel in WebView
 */

/* ========================================
   1. COLOR TOKENS - Material Design 3
   ======================================== */
:root {
  /* Primary Colors — SAP-inspired deep blue */
  --md-sys-color-primary: #1565C0;
  --md-sys-color-primary-container: #E3F2FD;
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-on-primary-container: #0D47A1;

  /* Secondary Colors */
  --md-sys-color-secondary: #37474F;
  --md-sys-color-secondary-container: #E0E8ED;
  --md-sys-color-on-secondary: #FFFFFF;
  --md-sys-color-on-secondary-container: #1B2838;

  /* Tertiary Colors */
  --md-sys-color-tertiary: #00897B;
  --md-sys-color-tertiary-container: #E0F2F1;
  --md-sys-color-on-tertiary: #FFFFFF;

  /* Error Colors */
  --md-sys-color-error: #C62828;
  --md-sys-color-error-container: #FFEBEE;
  --md-sys-color-on-error: #FFFFFF;
  --md-sys-color-on-error-container: #B71C1C;

  /* Surface Colors — clean whites */
  --md-sys-color-surface: #FAFAFA;
  --md-sys-color-surface-dim: #E0E0E0;
  --md-sys-color-surface-bright: #FFFFFF;
  --md-sys-color-surface-container-lowest: #FFFFFF;
  --md-sys-color-surface-container-low: #F5F5F5;
  --md-sys-color-surface-container: #EEEEEE;
  --md-sys-color-surface-container-high: #E0E0E0;
  --md-sys-color-surface-container-highest: #D6D6D6;

  /* On Surface */
  --md-sys-color-on-surface: #212121;
  --md-sys-color-on-surface-variant: #616161;
  --md-sys-color-outline: #9E9E9E;
  --md-sys-color-outline-variant: #E0E0E0;

  /* Inverse */
  --md-sys-color-inverse-surface: #212121;
  --md-sys-color-inverse-on-surface: #FAFAFA;
  --md-sys-color-inverse-primary: #64B5F6;

  /* Success/Warning */
  --md-sys-color-success: #2E7D32;
  --md-sys-color-warning: #EF6C00;

  /* Elevation Shadows — softer, more modern */
  --md-sys-elevation-0: none;
  --md-sys-elevation-1: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --md-sys-elevation-2: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.06);
  --md-sys-elevation-3: 0 4px 16px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.06);
  --md-sys-elevation-4: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
  --md-sys-elevation-5: 0 12px 32px rgba(0, 0, 0, 0.14), 0 6px 12px rgba(0, 0, 0, 0.08);

  /* Typography Scale */
  --md-sys-typescale-display-large: 800 57px/64px 'Roboto', sans-serif;
  --md-sys-typescale-headline-large: 800 32px/40px 'Roboto', sans-serif;
  --md-sys-typescale-headline-medium: 700 28px/36px 'Roboto', sans-serif;
  --md-sys-typescale-headline-small: 700 24px/32px 'Roboto', sans-serif;
  --md-sys-typescale-title-large: 700 22px/28px 'Roboto', sans-serif;
  --md-sys-typescale-title-medium: 600 16px/24px 'Roboto', sans-serif;
  --md-sys-typescale-title-small: 600 14px/20px 'Roboto', sans-serif;
  --md-sys-typescale-body-large: 400 16px/24px 'Roboto', sans-serif;
  --md-sys-typescale-body-medium: 400 14px/20px 'Roboto', sans-serif;
  --md-sys-typescale-body-small: 400 12px/16px 'Roboto', sans-serif;
  --md-sys-typescale-label-large: 600 14px/20px 'Roboto', sans-serif;
  --md-sys-typescale-label-medium: 600 12px/16px 'Roboto', sans-serif;
  --md-sys-typescale-label-small: 600 11px/16px 'Roboto', sans-serif;

  /* Shape/Radius */
  --md-sys-shape-corner-none: 0;
  --md-sys-shape-corner-extra-small: 4px;
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-shape-corner-full: 9999px;

  /* State Layers */
  --md-sys-state-hover-opacity: 0.08;
  --md-sys-state-focus-opacity: 0.12;
  --md-sys-state-pressed-opacity: 0.12;
  --md-sys-state-dragged-opacity: 0.16;

  /* Motion */
  --md-sys-motion-duration-short1: 50ms;
  --md-sys-motion-duration-short2: 100ms;
  --md-sys-motion-duration-short3: 150ms;
  --md-sys-motion-duration-short4: 200ms;
  --md-sys-motion-duration-medium1: 250ms;
  --md-sys-motion-duration-medium2: 300ms;
  --md-sys-motion-duration-medium3: 350ms;
  --md-sys-motion-duration-medium4: 400ms;
  --md-sys-motion-duration-long1: 450ms;
  --md-sys-motion-duration-long2: 500ms;
  --md-sys-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
  --md-sys-motion-easing-emphasized: cubic-bezier(0.2, 0, 0, 1);
  --md-sys-motion-easing-emphasized-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1);
  --md-sys-motion-easing-emphasized-accelerate: cubic-bezier(0.3, 0, 0.8, 0.15);
}

/* ========================================
   2. BASE RESET & DEFAULTS
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Prevent overscroll bounce on Android */
  overscroll-behavior: none;
}

body {
  font-family: 'Roboto', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font: var(--md-sys-typescale-body-medium);
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  /* Safe area for notches */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Allow text selection in content areas */
p,
span,
h1,
h2,
h3,
h4,
h5,
h6,
label {
  -webkit-user-select: none;
  user-select: none;
}

/* ========================================
   3. TOP APP BAR
   ======================================== */
.app-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background-color: #FFFFFF;
  border-bottom: 1px solid #EEEEEE;
  display: flex;
  align-items: center;
  padding: 0 16px;
  z-index: 1000;
}

.app-bar--elevated {
  box-shadow: var(--md-sys-elevation-2);
  border-bottom: none;
}

/* Ad Removal for Premium Users */
.premium .ad-container,
.premium [data-ad],
.premium #ad-banner,
.premium .advertisement {
  display: none !important;
}

.app-bar--primary {
  background: linear-gradient(135deg, #1565C0, #0D47A1);
  color: #FFFFFF;
  border-bottom: none;
}

.app-bar__leading {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-bar__title {
  flex: 1;
  font: var(--md-sys-typescale-title-large);
  margin-left: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-bar__actions {
  display: flex;
  gap: 4px;
}

/* ========================================
   4. BOTTOM NAVIGATION BAR
   ======================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background-color: #FFFFFF;
  border-top: 1px solid #EEEEEE;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 8px 16px 10px;
  text-decoration: none;
  color: #9E9E9E;
  transition: color 0.2s ease;
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Pill indicator for active item */
.bottom-nav__item::before {
  content: '';
  position: absolute;
  top: 4px;
  width: 0;
  height: 28px;
  border-radius: 100px;
  background: #E3F2FD;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav__item--active::before {
  width: 56px;
  background: #E3F2FD;
}

.bottom-nav__item--active {
  color: #1565C0;
}

.bottom-nav__item--active .bottom-nav__icon {
  color: #1565C0;
}

.bottom-nav__icon {
  font-size: 22px;
  margin-bottom: 3px;
  position: relative;
  z-index: 1;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav__item--active .bottom-nav__icon {
  transform: translateY(-1px);
}

.bottom-nav__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 1;
}

/* Tap feedback */
.bottom-nav__item:active {
  transform: scale(0.92);
  transition: transform 0.1s;
}

/* ========================================
   5. BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border: none;
  border-radius: var(--md-sys-shape-corner-full);
  font: var(--md-sys-typescale-label-large);
  cursor: pointer;
  transition:
    background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
    box-shadow var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
    transform var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-standard);
  position: relative;
  overflow: hidden;
  min-height: 40px;
}

/* Filled Button */
.btn--filled {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  box-shadow: var(--md-sys-elevation-0);
}

.btn--filled:hover {
  box-shadow: var(--md-sys-elevation-1);
}

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

/* Filled Tonal Button */
.btn--tonal {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

/* Outlined Button */
.btn--outlined {
  background-color: transparent;
  color: var(--md-sys-color-primary);
  border: 1px solid var(--md-sys-color-outline);
}

/* Text Button */
.btn--text {
  background-color: transparent;
  color: var(--md-sys-color-primary);
  padding: 10px 12px;
}

/* Elevated Button */
.btn--elevated {
  background-color: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-primary);
  box-shadow: var(--md-sys-elevation-1);
}

.btn--elevated:hover {
  box-shadow: var(--md-sys-elevation-2);
}

/* Icon Button */
.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--md-sys-shape-corner-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
  transition: background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
  position: relative;
  overflow: hidden;
}

.icon-btn:hover {
  background-color: rgba(var(--md-sys-color-on-surface), var(--md-sys-state-hover-opacity));
}

.icon-btn:active {
  background-color: rgba(var(--md-sys-color-on-surface), var(--md-sys-state-pressed-opacity));
}

.icon-btn i {
  font-size: 24px;
}

/* FAB - Floating Action Button */
.fab {
  position: fixed;
  bottom: 96px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: var(--md-sys-shape-corner-large);
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  box-shadow: var(--md-sys-elevation-3);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    box-shadow var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
    transform var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
  z-index: 999;
}

.fab:hover {
  box-shadow: var(--md-sys-elevation-4);
}

.fab:active {
  transform: scale(0.95);
}

.fab i {
  font-size: 24px;
}

/* Extended FAB */
.fab--extended {
  width: auto;
  padding: 0 16px;
  gap: 12px;
}

.fab--extended .fab__label {
  font: var(--md-sys-typescale-label-large);
}

/* ========================================
   6. CARDS
   ======================================== */
.card {
  background-color: #FFFFFF;
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  border: 1px solid #EEEEEE;
}

.card:active {
  transform: scale(0.985);
}

.card--elevated {
  box-shadow: var(--md-sys-elevation-1);
  border-color: transparent;
}

.card--elevated:hover {
  box-shadow: var(--md-sys-elevation-3);
}

.card--filled {
  background-color: #F5F5F5;
  border-color: transparent;
}

.card--outlined {
  border: 1px solid #E0E0E0;
  box-shadow: none;
}

.card--outlined:hover {
  border-color: #1565C0;
}

.card__media {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.card__content {
  padding: 16px;
}

.card__title {
  font: var(--md-sys-typescale-title-medium);
  margin-bottom: 4px;
  color: #212121;
}

.card__subtitle {
  font: var(--md-sys-typescale-body-small);
  color: #9E9E9E;
}

.card__text {
  font: var(--md-sys-typescale-body-medium);
  color: var(--md-sys-color-on-surface-variant);
  margin-top: 8px;
}

.card__actions {
  padding: 8px;
  display: flex;
  gap: 8px;
}

/* Interactive Card (clickable) */
.card--interactive {
  cursor: pointer;
  position: relative;
}

.card--interactive:active {
  transform: scale(0.98);
}

/* ========================================
   7. CHIPS
   ======================================== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 16px;
  border-radius: var(--md-sys-shape-corner-small);
  font: var(--md-sys-typescale-label-large);
  cursor: pointer;
  transition:
    background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
    border-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
  border: 1px solid var(--md-sys-color-outline);
  background-color: transparent;
  color: var(--md-sys-color-on-surface-variant);
}

.chip--selected {
  background-color: var(--md-sys-color-secondary-container);
  border-color: transparent;
  color: var(--md-sys-color-on-secondary-container);
}

.chip__icon {
  font-size: 18px;
  margin-left: -4px;
}

/* ========================================
   8. TEXT FIELDS
   ======================================== */
.text-field {
  position: relative;
  margin-bottom: 16px;
}

.text-field__input {
  width: 100%;
  height: 56px;
  padding: 16px;
  padding-top: 24px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-extra-small);
  background-color: transparent;
  font: var(--md-sys-typescale-body-large);
  color: var(--md-sys-color-on-surface);
  transition: border-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
  outline: none;
}

.text-field__input:focus {
  border-color: var(--md-sys-color-primary);
  border-width: 2px;
}

.text-field__label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font: var(--md-sys-typescale-body-large);
  color: var(--md-sys-color-on-surface-variant);
  pointer-events: none;
  transition:
    top var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
    font-size var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
    color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
  background-color: var(--md-sys-color-surface);
  padding: 0 4px;
}

.text-field__input:focus+.text-field__label,
.text-field__input:not(:placeholder-shown)+.text-field__label {
  top: 0;
  font: var(--md-sys-typescale-body-small);
  color: var(--md-sys-color-primary);
}

.text-field__helper {
  font: var(--md-sys-typescale-body-small);
  color: var(--md-sys-color-on-surface-variant);
  margin-top: 4px;
  padding-left: 16px;
}

.text-field--error .text-field__input {
  border-color: var(--md-sys-color-error);
}

.text-field--error .text-field__label {
  color: var(--md-sys-color-error);
}

.text-field--error .text-field__helper {
  color: var(--md-sys-color-error);
}

/* ========================================
   9. PROGRESS INDICATORS
   ======================================== */
.progress-linear {
  width: 100%;
  height: 4px;
  background-color: var(--md-sys-color-surface-container-highest);
  border-radius: var(--md-sys-shape-corner-full);
  overflow: hidden;
}

.progress-linear__indicator {
  height: 100%;
  background-color: var(--md-sys-color-primary);
  border-radius: var(--md-sys-shape-corner-full);
  transition: width var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized);
}

/* Indeterminate */
.progress-linear--indeterminate .progress-linear__indicator {
  width: 50%;
  animation: indeterminate 2s var(--md-sys-motion-easing-standard) infinite;
}

@keyframes indeterminate {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(300%);
  }
}

/* Circular Progress */
.progress-circular {
  width: 48px;
  height: 48px;
  animation: rotate 2s linear infinite;
}

.progress-circular__track,
.progress-circular__indicator {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
}

.progress-circular__track {
  stroke: var(--md-sys-color-surface-container-highest);
}

.progress-circular__indicator {
  stroke: var(--md-sys-color-primary);
  stroke-dasharray: 100;
  stroke-dashoffset: 75;
  transform-origin: center;
  animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dash {
  0% {
    stroke-dashoffset: 75;
  }

  50% {
    stroke-dashoffset: 25;
  }

  100% {
    stroke-dashoffset: 75;
  }
}

/* ========================================
   10. DIALOGS & MODALS
   ======================================== */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized),
    visibility var(--md-sys-motion-duration-medium2);
}

.dialog-backdrop--open {
  opacity: 1;
  visibility: visible;
}

.dialog {
  background-color: var(--md-sys-color-surface-container-high);
  border-radius: var(--md-sys-shape-corner-extra-large);
  min-width: 280px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  box-shadow: var(--md-sys-elevation-3);
  transform: scale(0.9);
  transition: transform var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized);
  overflow: hidden;
}

.dialog-backdrop--open .dialog {
  transform: scale(1);
}

.dialog__header {
  padding: 24px 24px 16px;
}

.dialog__title {
  font: var(--md-sys-typescale-headline-small);
}

.dialog__content {
  padding: 0 24px 24px;
  font: var(--md-sys-typescale-body-medium);
  color: var(--md-sys-color-on-surface-variant);
  overflow-y: auto;
}

.dialog__actions {
  padding: 16px 24px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ========================================
   11. SNACKBAR / TOAST
   ======================================== */
.snackbar {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--md-sys-color-inverse-surface);
  color: var(--md-sys-color-inverse-on-surface);
  padding: 14px 16px;
  border-radius: var(--md-sys-shape-corner-extra-small);
  box-shadow: var(--md-sys-elevation-3);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1500;
  opacity: 0;
  transition:
    transform var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized),
    opacity var(--md-sys-motion-duration-medium2);
}

.snackbar--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.snackbar__text {
  font: var(--md-sys-typescale-body-medium);
  flex: 1;
}

.snackbar__action {
  color: var(--md-sys-color-inverse-primary);
  font: var(--md-sys-typescale-label-large);
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  margin: -10px;
}

/* ========================================
   12. LISTS
   ======================================== */
.list {
  list-style: none;
  padding: 8px 0;
}

.list-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  min-height: 56px;
  gap: 16px;
  cursor: pointer;
  transition: background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.list-item:hover {
  background-color: rgba(0, 0, 0, var(--md-sys-state-hover-opacity));
}

.list-item:active {
  background-color: rgba(0, 0, 0, var(--md-sys-state-pressed-opacity));
}

.list-item__leading {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--md-sys-color-on-surface-variant);
}

.list-item__content {
  flex: 1;
  min-width: 0;
}

.list-item__headline {
  font: var(--md-sys-typescale-body-large);
  color: var(--md-sys-color-on-surface);
}

.list-item__supporting {
  font: var(--md-sys-typescale-body-medium);
  color: var(--md-sys-color-on-surface-variant);
}

.list-item__trailing {
  color: var(--md-sys-color-on-surface-variant);
}

/* ========================================
   13. DIVIDERS
   ======================================== */
.divider {
  height: 1px;
  background-color: var(--md-sys-color-outline-variant);
  margin: 0;
}

.divider--inset {
  margin-left: 56px;
}

/* ========================================
   14. PAGE TRANSITIONS
   ======================================== */
.page {
  animation: page-enter var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized-decelerate);
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

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

.page--exit {
  animation: page-exit var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-emphasized-accelerate) forwards;
}

@keyframes page-exit {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ========================================
   15. SKELETON LOADING
   ======================================== */
.skeleton {
  background: linear-gradient(90deg,
      var(--md-sys-color-surface-container-highest) 25%,
      var(--md-sys-color-surface-container) 50%,
      var(--md-sys-color-surface-container-highest) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--md-sys-shape-corner-small);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton--text {
  height: 16px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton--avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--md-sys-shape-corner-full);
}

.skeleton--card {
  height: 200px;
  width: 100%;
}

/* ========================================
   16. UTILITY CLASSES
   ======================================== */
/* Spacing */
.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: 4px;
}

.mt-2 {
  margin-top: 8px;
}

.mt-3 {
  margin-top: 12px;
}

.mt-4 {
  margin-top: 16px;
}

.mt-5 {
  margin-top: 24px;
}

.mt-6 {
  margin-top: 32px;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: 4px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-3 {
  margin-bottom: 12px;
}

.mb-4 {
  margin-bottom: 16px;
}

.mb-5 {
  margin-bottom: 24px;
}

.mb-6 {
  margin-bottom: 32px;
}

.p-0 {
  padding: 0;
}

.p-1 {
  padding: 4px;
}

.p-2 {
  padding: 8px;
}

.p-3 {
  padding: 12px;
}

.p-4 {
  padding: 16px;
}

.p-5 {
  padding: 24px;
}

.p-6 {
  padding: 32px;
}

/* Flex */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 4px;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

/* Grid */
.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Text */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: var(--md-sys-color-primary);
}

.text-secondary {
  color: var(--md-sys-color-on-surface-variant);
}

.text-error {
  color: var(--md-sys-color-error);
}

.text-success {
  color: var(--md-sys-color-success);
}

/* Display */
.hidden {
  display: none;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

/* Width */
.w-full {
  width: 100%;
}

/* Content container with app bar and bottom nav offset */
.app-content {
  flex: 1;
  padding: 80px 16px 96px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ========================================
   17. PREMIUM/SUBSCRIPTION BADGE
   ======================================== */
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #1A1C1E;
  font: var(--md-sys-typescale-label-small);
  border-radius: var(--md-sys-shape-corner-full);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.premium-badge i {
  font-size: 12px;
}

/* Ad container - hidden for premium users */
.ad-container {
  width: 100%;
  min-height: 50px;
  background-color: var(--md-sys-color-surface-container);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--md-sys-shape-corner-small);
  margin: 16px 0;
}

body.premium .ad-container {
  display: none !important;
}

/* ========================================
   18. RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 599px) {

  /* Phone */
  .app-bar__title {
    font: var(--md-sys-typescale-title-medium);
  }

  .bottom-nav {
    height: 72px;
  }

  .bottom-nav__item {
    min-width: 56px;
    padding: 10px 12px 14px;
  }

  .bottom-nav__label {
    font: var(--md-sys-typescale-label-small);
  }

  .fab {
    bottom: 88px;
  }

  .app-content {
    padding: 72px 12px 88px;
  }

  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 600px) and (max-width: 839px) {

  /* Tablet portrait */
  .bottom-nav {
    max-width: 400px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--md-sys-shape-corner-large) var(--md-sys-shape-corner-large) 0 0;
  }
}

@media (min-width: 840px) {

  /* Tablet landscape / Desktop */
  .app-content {
    max-width: 1200px;
    margin: 0 auto;
  }
}

/* ========================================
   19. ANIMATIONS & MICRO-INTERACTIONS
   ======================================== */
/* Ripple Effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  width: 100%;
  padding-bottom: 100%;
  border-radius: 50%;
  background-color: currentColor;
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
}

.ripple:active::after {
  opacity: 0.12;
  transform: scale(2.5);
  transition:
    transform var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-standard),
    opacity var(--md-sys-motion-duration-short2);
}

/* Pull to refresh indicator */
.pull-indicator {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  transition: transform var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
  z-index: 999;
}

.pull-indicator--visible {
  transform: translateX(-50%) translateY(16px);
}

/* Touch feedback for cards */
.touch-feedback {
  transition: transform var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-standard);
}

.touch-feedback:active {
  transform: scale(0.97);
}

/* ========================================
   12. PAGE SPECIFIC COMPONENTS
   ======================================== */

/* Tutorial Page Styles */
.tutorial-header {
  background: linear-gradient(135deg, var(--md-sys-color-primary) 0%, #0D47A1 100%);
  margin: -16px -16px 24px -16px;
  padding: 32px 24px;
  text-align: center;
  color: white;
  border-radius: 0 0 var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-extra-large);
}

.tutorial-header__icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--md-sys-shape-corner-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 36px;
}

.tutorial-header__title {
  font: var(--md-sys-typescale-headline-medium);
  margin-bottom: 8px;
}

.tutorial-header__subtitle {
  font: var(--md-sys-typescale-body-large);
  opacity: 0.9;
}

/* Tutorial Section */
.tutorial-section {
  background: var(--md-sys-color-surface-container-lowest);
  border-radius: var(--md-sys-shape-corner-large);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--md-sys-elevation-1);
  animation: section-appear var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized-decelerate);
}

@keyframes section-appear {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

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

.tutorial-section__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.tutorial-section__number {
  width: 32px;
  height: 32px;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-radius: var(--md-sys-shape-corner-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font: var(--md-sys-typescale-label-large);
  font-weight: 700;
}

.tutorial-section__title {
  font: var(--md-sys-typescale-title-large);
  flex: 1;
}

.tutorial-section__content {
  font: var(--md-sys-typescale-body-medium);
  color: var(--md-sys-color-on-surface);
  line-height: 1.6;
  margin-bottom: 16px;
}

.tutorial-section__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tutorial-section__list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.tutorial-section__list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tutorial-section__list li i {
  color: var(--md-sys-color-primary);
  margin-top: 2px;
}

.tutorial-section__list li span {
  flex: 1;
  font: var(--md-sys-typescale-body-medium);
}

/* Tip Box */
.tip-box {
  background: var(--md-sys-color-primary-container);
  border-radius: var(--md-sys-shape-corner-medium);
  padding: 16px;
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

.tip-box__icon {
  color: var(--md-sys-color-on-primary-container);
  font-size: 20px;
}

.tip-box__content {
  flex: 1;
  font: var(--md-sys-typescale-body-small);
  color: var(--md-sys-color-on-primary-container);
}

/* Feature Cards */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.feature-card {
  background: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-corner-medium);
  padding: 16px;
  text-align: center;
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 20px;
}

.feature-card__title {
  font: var(--md-sys-typescale-title-small);
  margin-bottom: 4px;
}

.feature-card__text {
  font: var(--md-sys-typescale-body-small);
  color: var(--md-sys-color-on-surface-variant);
}

/* Links Section */
.links-section {
  text-align: center;
  padding: 24px;
  background: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-corner-large);
  margin-top: 24px;
}

.links-section__title {
  font: var(--md-sys-typescale-title-medium);
  margin-bottom: 16px;
}

.links-section a {
  color: var(--md-sys-color-primary);
  text-decoration: none;
  font: var(--md-sys-typescale-label-large);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
}

.links-section a:hover {
  text-decoration: underline;
}

/* CTA Button */
.cta-section {
  text-align: center;
  margin-top: 32px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border: none;
  border-radius: var(--md-sys-shape-corner-full);
  font: var(--md-sys-typescale-label-large);
  cursor: pointer;
  text-decoration: none;
  transition:
    transform var(--md-sys-motion-duration-short4),
    box-shadow var(--md-sys-motion-duration-short4);
  box-shadow: var(--md-sys-elevation-2);
}

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

.cta-btn:hover {
  box-shadow: var(--md-sys-elevation-3);
}

/* Subscription Page Specific Styles */
.subscription-header {
  text-align: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, var(--md-sys-color-primary) 0%, #0D47A1 100%);
  color: white;
  margin: -16px -16px 24px -16px;
  border-radius: 0 0 var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-extra-large);
}

.subscription-header__icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--md-sys-shape-corner-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.subscription-header__icon i {
  font-size: 40px;
  color: #FFD700;
}

.subscription-header__title {
  font: var(--md-sys-typescale-headline-medium);
  margin-bottom: 8px;
}

.subscription-header__subtitle {
  font: var(--md-sys-typescale-body-large);
  opacity: 0.9;
}

.subscription-plans {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.subscription-card {
  background: var(--md-sys-color-surface-container-lowest);
  border-radius: var(--md-sys-shape-corner-large);
  padding: 24px;
  position: relative;
  border: 2px solid transparent;
  transition: all var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.subscription-card--featured {
  border-color: var(--md-sys-color-primary);
  background: linear-gradient(180deg, var(--md-sys-color-primary-container) 0%, var(--md-sys-color-surface-container-lowest) 100%);
}

.subscription-card__badge {
  position: absolute;
  top: -12px;
  right: 16px;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #1A1C1E;
  font: var(--md-sys-typescale-label-medium);
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--md-sys-shape-corner-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.subscription-card__title {
  font: var(--md-sys-typescale-title-large);
  margin-bottom: 8px;
}

.subscription-card__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 12px;
}

.subscription-card__price-amount {
  font: var(--md-sys-typescale-display-large);
  font-size: 40px;
  color: var(--md-sys-color-primary);
}

.subscription-card__price-period {
  font: var(--md-sys-typescale-body-medium);
  color: var(--md-sys-color-on-surface-variant);
}

.subscription-card__description {
  font: var(--md-sys-typescale-body-medium);
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 16px;
}

.subscription-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.subscription-card__features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font: var(--md-sys-typescale-body-medium);
  color: var(--md-sys-color-on-surface);
}

.subscription-card__features li i {
  color: var(--md-sys-color-success);
  font-size: 16px;
  width: 20px;
}

.comparison-section {
  margin-top: 32px;
}

.comparison-section__title {
  font: var(--md-sys-typescale-title-medium);
  text-align: center;
  margin-bottom: 16px;
  color: var(--md-sys-color-on-surface);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--md-sys-color-surface-container-lowest);
  border-radius: var(--md-sys-shape-corner-medium);
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 16px;
  text-align: left;
  font: var(--md-sys-typescale-body-medium);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.comparison-table th {
  background: var(--md-sys-color-surface-container);
  font-weight: 600;
}

.comparison-table th:first-child {
  text-align: left;
}

.comparison-table th:not(:first-child),
.comparison-table td:not(:first-child) {
  text-align: center;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.check-icon {
  color: var(--md-sys-color-success);
}

.x-icon {
  color: var(--md-sys-color-error);
}

.legal-text {
  margin-top: 32px;
  padding: 16px;
  background: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-corner-medium);
}

.legal-text p {
  font: var(--md-sys-typescale-body-small);
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 8px;
}

.legal-text p:last-child {
  margin-bottom: 0;
}

.legal-text a {
  color: var(--md-sys-color-primary);
  text-decoration: none;
}

.restore-link {
  text-align: center;
  margin-top: 16px;
}

.restore-link button {
  color: var(--md-sys-color-primary);
  background: none;
  border: none;
  font: var(--md-sys-typescale-label-large);
  cursor: pointer;
  padding: 12px;
}

/* Already premium state */
.premium-status {
  text-align: center;
  padding: 32px 16px;
}

.premium-status__icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  border-radius: var(--md-sys-shape-corner-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.premium-status__icon i {
  font-size: 48px;
  color: #1A1C1E;
}

.premium-status__title {
  font: var(--md-sys-typescale-headline-medium);
  margin-bottom: 8px;
}

.premium-status__text {
  font: var(--md-sys-typescale-body-large);
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 24px;
}

.premium-status__info {
  background: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-corner-medium);
  padding: 16px;
  text-align: left;
}

.premium-status__info-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.premium-status__info-item:last-child {
  border-bottom: none;
}

/* ========================================
   20. TOP SHORTCUT MENU
   ======================================== */
.top-shortcuts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  scrollbar-width: none;
}

.top-shortcuts::-webkit-scrollbar {
  display: none;
}

.top-shortcuts__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--md-sys-shape-corner-full);
  border: 1px solid transparent;
  background: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-on-surface);
  font: var(--md-sys-typescale-label-large);
  transition:
    background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
    transform var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-standard);
}

.top-shortcuts__link i {
  color: var(--md-sys-color-primary);
  font-size: 14px;
}

.top-shortcuts__link--active {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border-color: rgba(10, 110, 209, 0.25);
}

.top-shortcuts__link:active {
  transform: scale(0.98);
}

/* ========================================
   21. NAVIGATION DRAWER (native left-slide)
   ======================================== */

/* Hamburger button in app bar */
.nav-drawer-hamburger {
  margin-left: auto;
}

/* Scrim (backdrop) */
.nav-drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 2090;
}

/* Drawer panel */
.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(300px, 82vw);
  height: 100vh;
  height: 100dvh;
  background: #FFFFFF;
  transform: translateX(-105%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2095;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

/* Profile header */
.nav-drawer__header {
  background: linear-gradient(135deg, #1565C0, #0D47A1);
  padding: 48px 20px 20px;
  color: #FFFFFF;
  flex-shrink: 0;
}

.nav-drawer__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
}

.nav-drawer__user-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}

.nav-drawer__user-email {
  font-size: 13px;
  opacity: 0.8;
  font-weight: 400;
}

/* Links container */
.nav-drawer__links {
  padding: 8px 12px;
  flex: 1;
}

/* Divider */
.nav-drawer__divider {
  height: 1px;
  background: #EEEEEE;
  margin: 8px 4px;
}

/* Link items */
.nav-drawer__link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 28px;
  text-decoration: none;
  color: #424242;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.nav-drawer__link:active {
  background: #F5F5F5;
}

.nav-drawer__link i {
  width: 24px;
  text-align: center;
  font-size: 18px;
  color: #757575;
}

/* Active link */
.nav-drawer__link--active {
  background: #E3F2FD;
  color: #1565C0;
  font-weight: 700;
}

.nav-drawer__link--active i {
  color: #1565C0;
}

/* Premium accent link */
.nav-drawer__link--accent {
  color: #E65100;
}

.nav-drawer__link--accent i {
  color: #FFB300;
}

/* Open state */
.nav-drawer--open .nav-drawer-scrim {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer--open .nav-drawer {
  transform: translateX(0);
}

/* In-App wrapper modifications */
.in-app .app-bar {
  display: none !important;
}

.in-app .app-content {
  padding-top: env(safe-area-inset-top) !important;
}

/* ========================================
   PREMIUM VIBRANT DESIGN OVERRIDES
   ======================================== */
:root {
  --md-sys-color-primary: #3B82F6 !important;
  --md-sys-color-primary-container: #DBEAFE !important;
  --md-sys-color-on-primary-container: #1E3A8A !important;
  --md-sys-color-secondary: #0F172A !important;
  --md-sys-color-secondary-container: #F1F5F9 !important;
  --md-sys-color-on-secondary-container: #0F172A !important;
  --md-sys-color-tertiary: #10B981 !important;
  --md-sys-elevation-1: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
  --md-sys-elevation-2: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02) !important;
  --md-sys-elevation-3: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02) !important;
}

/* Glassmorphism Navigation */
.app-bar,
.bottom-nav {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.bottom-nav {
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.04) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.app-bar {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}

/* Premium Animations */
.btn,
.card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--md-sys-elevation-2);
}

.btn:active,
.card--interactive:active {
  transform: translateY(1px) scale(0.98);
}

.card:hover {
  box-shadow: var(--md-sys-elevation-3);
  transform: translateY(-4px);
}

.bottom-nav__item {
  transition: all 0.3s ease !important;
}

.bottom-nav__item:hover .bottom-nav__icon,
.bottom-nav__item.bottom-nav__item--active .bottom-nav__icon {
  transform: translateY(-4px);
  color: var(--md-sys-color-primary) !important;
}

.bottom-nav__item:hover .bottom-nav__label,
.bottom-nav__item.bottom-nav__item--active .bottom-nav__label {
  color: var(--md-sys-color-primary) !important;
  font-weight: 600;
}

/* Glassmorphism Utilities */
.glass {
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(12px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.glass--dark {
  background: rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(16px) saturate(120%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(120%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Premium Card Styles */
.card--native {
  background: var(--md-sys-color-surface-container-lowest);
  border-radius: var(--md-sys-shape-corner-extra-large);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--md-sys-color-outline-variant);
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s ease;
}

.card--native:active {
  transform: scale(0.97);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Refined Profile Header */
.profile-premium {
  position: relative;
  overflow: hidden;
  padding-bottom: 40px;
}

.profile-premium::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: drift 20s linear infinite;
  pointer-events: none;
}

@keyframes drift {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Native-like Scrollbar (Hidden but functional) */
::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

/* In-App wrapper modifications */
.in-app .app-bar {
  display: none !important;
}

.in-app .app-content {
  padding-top: env(safe-area-inset-top) !important;
}