/* ============================================================================
   TUTORIAL STYLES - Interactive Onboarding
   ============================================================================ */

/* Tutorial Overlay - Blocks all interactions */
.tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
  pointer-events: all;
  background: transparent;
  /* Smooth transition for background */
  transition: background 0.6s ease-in-out;
}

/* Dark overlay for welcome step (no spotlight) */
.tutorial-overlay.no-spotlight {
  background: rgba(0, 0, 0, 0.75) !important;
}

/* Transparent overlay during animation */
.tutorial-overlay.animating {
  background: transparent;
}

/* Light overlay for alerts section (steps 8+) */
.tutorial-overlay.light-overlay {
  background: transparent;
}

/* Tutorial Container - Holds all tutorial content */
.tutorial-container {
  position: relative;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  height: 100vh;
}

/* Disable scrolling during tutorial */
body.tutorial-active {
  overflow: hidden;
  height: 100vh;
}

/* Tutorial Views */
.tutorial-view {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.tutorial-view.active {
  display: block;
  opacity: 1;
}

/* Disable all interactions in tutorial content */
.tutorial-container * {
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}

/* Tutorial UI Controls - Enable interactions */
.tutorial-ui,
.tutorial-ui * {
  pointer-events: all !important;
  user-select: auto !important;
}

/* Tutorial UI Container */
.tutorial-ui {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  pointer-events: none;
}

/* Tutorial Spotlight - Highlights current element */
.tutorial-spotlight {
  position: absolute;
  border: 3px solid #ff6b35;
  border-radius: 12px;
  box-shadow: 0 60px 0 9999px rgba(0, 0, 0, 0.75),
              0 0 35px rgba(255, 107, 53, 0.9),
              0 0 60px rgba(255, 107, 53, 0.5),
              inset 0 0 35px rgba(255, 107, 53, 0.4);
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
  z-index: 9999; /* Below modals (10000) */
  opacity: 1;
}

/* When highlighting modal content, increase z-index */
.tutorial-spotlight.modal-content {
  z-index: 10001; /* Above modals (10000) */
}

/* Lighter spotlight for alerts section - NO dark overlay */
.tutorial-spotlight.light-mode {
  box-shadow: 0 0 35px rgba(255, 107, 53, 0.9),
              0 0 60px rgba(255, 107, 53, 0.5),
              inset 0 0 35px rgba(255, 107, 53, 0.4);
}

/* Hidden state for welcome step */
.tutorial-spotlight[style*="display: none"] {
  opacity: 0 !important;
  box-shadow: none !important;
  border: none !important;
}

/* Navbar overlay to keep it visible */
.tutorial-ui::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9998;
  pointer-events: none;
}

/* Make navbar visible above tutorial overlay but disable interactions */
nav.navbar {
  position: relative;
  z-index: 10001 !important;
}

/* Disable navbar interactions during tutorial */
body.tutorial-active nav.navbar,
body.tutorial-active nav.navbar * {
  pointer-events: none !important;
}

/* Highlight alerts link with orange border in step 7 */
body.tutorial-active nav.navbar .nav-link.tutorial-highlight {
  border: 3px solid #ff6b35 !important;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.6),
              inset 0 0 15px rgba(255, 107, 53, 0.2);
  background: rgba(255, 107, 53, 0.1) !important;
  position: relative;
  z-index: 10002;
  padding: 0.5rem 1rem !important;
}

/* Hide pricing link during tutorial */
body.tutorial-active nav.navbar a[href="/pricing"] {
  display: none !important;
}

/* Pulse animation for spotlight */
@keyframes spotlightPulse {
  0%, 100% {
    box-shadow: 0 60px 0 9999px rgba(0, 0, 0, 0.75),
                0 0 35px rgba(255, 107, 53, 0.9),
                0 0 60px rgba(255, 107, 53, 0.5),
                inset 0 0 35px rgba(255, 107, 53, 0.4);
  }
  50% {
    box-shadow: 0 60px 0 9999px rgba(0, 0, 0, 0.75),
                0 0 50px rgba(255, 107, 53, 1),
                0 0 80px rgba(255, 107, 53, 0.7),
                inset 0 0 50px rgba(255, 107, 53, 0.6);
  }
}

/* Pulse animation for light mode (no dark overlay) */
@keyframes spotlightPulseLightMode {
  0%, 100% {
    box-shadow: 0 0 35px rgba(255, 107, 53, 0.9),
                0 0 60px rgba(255, 107, 53, 0.5),
                inset 0 0 35px rgba(255, 107, 53, 0.4);
  }
  50% {
    box-shadow: 0 0 50px rgba(255, 107, 53, 1),
                0 0 80px rgba(255, 107, 53, 0.7),
                inset 0 0 50px rgba(255, 107, 53, 0.6);
  }
}

.tutorial-spotlight.pulse {
  animation: spotlightPulse 2s ease-in-out infinite;
}

.tutorial-spotlight.light-mode.pulse {
  animation: spotlightPulseLightMode 2s ease-in-out infinite;
}

/* Tutorial Tooltip */
.tutorial-tooltip {
  position: fixed;
  background: linear-gradient(135deg, rgba(26, 29, 46, 0.98) 0%, rgba(30, 34, 54, 0.98) 100%);
  backdrop-filter: blur(5px);
  border: 2px solid rgba(255, 107, 53, 0.5);
  border-radius: 16px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9),
              0 0 50px rgba(255, 107, 53, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  max-width: 520px;
  width: 90%;
  z-index: 10002; /* Highest - above everything */
  pointer-events: all;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: visible;
  /* Hide initially until animation completes */
  opacity: 0;
  visibility: hidden;
}

/* Tooltip gradient border effect */
.tutorial-tooltip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-size: 200% 100%;
  animation: gradientShift 3s ease-in-out infinite;
  border-radius: 16px 16px 0 0;
}

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

html.light .tutorial-tooltip {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  backdrop-filter: blur(20px);
  border-color: rgba(255, 107, 53, 0.6);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25),
              0 0 50px rgba(255, 107, 53, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Tooltip Content */
.tutorial-tooltip-content {
  padding: 1.75rem 1.75rem 1.25rem 1.75rem;
}

.tutorial-tooltip-content h3 {
  margin: 0 0 0.875rem 0;
  font-size: 1.375rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 50%, #ffa552 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.tutorial-tooltip-content p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

html.light .tutorial-tooltip-content p {
  color: rgba(0, 0, 0, 0.8);
}

/* Tooltip Footer */
.tutorial-tooltip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.75rem 1.25rem 1.75rem;
  border-top: 1px solid rgba(255, 107, 53, 0.2);
  gap: 0.75rem;
}

html.light .tutorial-tooltip-footer {
  border-top: 1px solid rgba(255, 107, 53, 0.15);
}

/* Tutorial Progress */
.tutorial-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 140, 66, 0.9);
  white-space: nowrap;
}

html.light .tutorial-progress {
  color: rgba(255, 107, 53, 0.8);
}

/* Tutorial Navigation Buttons */
.tutorial-nav-buttons {
  display: flex;
  gap: 0.5rem;
}

/* Tutorial Buttons */
.tutorial-btn {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  font-family: inherit;
  min-width: 90px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tutorial-btn-primary {
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.4);
  min-width: 90px;
}

.tutorial-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 107, 53, 0.5);
}

.tutorial-btn-primary:active {
  transform: translateY(0);
}

.tutorial-btn-secondary {
  background: rgba(255, 107, 53, 0.1);
  color: #ff8c42;
  border: 2px solid rgba(255, 107, 53, 0.3);
  min-width: 90px;
}

html.light .tutorial-btn-secondary {
  background: rgba(255, 107, 53, 0.08);
  border-color: rgba(255, 107, 53, 0.4);
  color: #ff6b35;
}

.tutorial-btn-secondary:hover {
  background: rgba(255, 107, 53, 0.2);
  border-color: rgba(255, 107, 53, 0.5);
  transform: translateY(-2px);
}

.tutorial-btn-skip {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  min-width: 70px;
}

html.light .tutorial-btn-skip {
  border-color: rgba(0, 0, 0, 0.15);
  color: rgba(0, 0, 0, 0.5);
}

.tutorial-btn-skip:hover {
  background: rgba(252, 89, 56, 0.1);
  color: #fc5938;
  border-color: rgba(252, 89, 56, 0.3);
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tutorial-tooltip {
  animation: fadeIn 0.5s ease;
}

/* Mobile Responsive */
@media (max-width: 992px) {
  .tutorial-tooltip {
    position: fixed;
    max-width: 90%;
    bottom: 10px !important;
    left: 50% !important;
    top: auto !important;
    transform: translateX(-50%) !important;
    right: auto !important;
  }
  
  .tutorial-tooltip-content {
    padding: 0.75rem 1rem 0.5rem 1rem;
  }
  
  .tutorial-tooltip-content h3 {
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
  }
  
  .tutorial-tooltip-content p {
    font-size: 0.8125rem;
    line-height: 1.4;
  }
  
  .tutorial-tooltip-footer {
    padding: 0.5rem 1rem 0.625rem 1rem;
    gap: 0.375rem;
  }
  
  .tutorial-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    min-width: 65px;
  }
  
  .tutorial-btn-primary {
    min-width: 65px;
  }
  
  .tutorial-btn-secondary {
    min-width: 65px;
  }
  
  .tutorial-btn-skip {
    padding: 0.4rem 0.625rem;
    font-size: 0.6875rem;
    min-width: 50px;
  }
  
  .tutorial-progress {
    font-size: 0.6875rem;
  }
}

@media (max-width: 480px) {
  .tutorial-tooltip {
    max-width: 95%;
    bottom: 8px !important;
  }
  
  .tutorial-tooltip-content {
    padding: 0.625rem 0.875rem 0.375rem 0.875rem;
  }
  
  .tutorial-tooltip-content h3 {
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
  }
  
  .tutorial-tooltip-content p {
    font-size: 0.75rem;
    line-height: 1.35;
  }
  
  .tutorial-tooltip-footer {
    padding: 0.5rem 0.875rem 0.5rem 0.875rem;
    gap: 0.25rem;
  }
  
  .tutorial-btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.6875rem;
    min-width: 60px;
  }
  
  .tutorial-btn-primary {
    min-width: 60px;
  }
  
  .tutorial-btn-secondary {
    min-width: 60px;
  }
  
  .tutorial-btn-skip {
    padding: 0.375rem 0.5rem;
    font-size: 0.625rem;
    min-width: 45px;
  }
  
  .tutorial-progress {
    font-size: 0.625rem;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .tutorial-spotlight,
  .tutorial-tooltip,
  .tutorial-view,
  .tutorial-btn {
    transition: none !important;
    animation: none !important;
  }
  
  .tutorial-spotlight.pulse {
    animation: none !important;
  }
}

/* ============================================================================
   TUTORIAL PANEL EXPANSION NOTIFICATION
   ============================================================================ */

.tutorial-expansion-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.98) 0%, rgba(255, 140, 66, 0.98) 100%);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  z-index: 10003;
  box-shadow: 0 20px 60px rgba(255, 107, 53, 0.6),
              0 0 40px rgba(255, 107, 53, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.tutorial-expansion-notification.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.expansion-notification-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  white-space: nowrap;
}

.expansion-notification-content svg {
  animation: expandArrow 0.6s ease-in-out infinite;
}

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

@media (max-width: 768px) {
  .tutorial-expansion-notification {
    padding: 1.25rem 1.5rem;
  }
  
  .expansion-notification-content {
    font-size: 1rem;
  }
}

/* ============================================================================
   MOBILE PANEL EXPANSION STYLES
   ============================================================================ */

/* Override sticky positioning for mobile buttons in tutorial */
body.tutorial-active .mobile-buttons-container {
  position: fixed !important;
  top: 60px !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 100 !important;
  margin: 0 !important;
}

/* Override news container padding-top for tutorial on mobile */
@media (max-width: 992px) {
  body.tutorial-active #news-container-by-token,
  body.tutorial-active #crypto-news-container {
    padding-top: 50px !important;
  }
}

/* Expanded filter panel on mobile and medium screens */
@media (max-width: 1299px) {
  .filter-panel.tutorial-expanded {
    display: block !important;
    position: fixed;
    top: 110px;
    left: 20px;
    right: 20px;
    width: auto;
    max-width: 500px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 2px solid rgba(255, 107, 53, 0.6);
    border-radius: 12px;
    padding: 16px;
    z-index: 10000; /* Above overlay (9998) and spotlight (9999) */
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 40px rgba(255, 107, 53, 0.4);
    animation: panelSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto; /* Allow interactions */
  }
}

/* Expanded trending panel on mobile */
@media (max-width: 999px) {
  .trending-panel.tutorial-expanded {
    display: flex !important;
    position: fixed;
    top: 110px;
    left: 20px;
    right: 20px;
    width: auto;
    max-width: 500px;
    margin: 0 auto;
    height: calc(100vh - 130px);
    background: var(--card-bg);
    border: 2px solid rgba(255, 107, 53, 0.6);
    border-radius: 12px;
    padding: 14px;
    z-index: 10000; /* Above overlay (9998) and spotlight (9999) */
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 40px rgba(255, 107, 53, 0.4);
    flex-direction: column;
    animation: panelSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto; /* Allow interactions */
  }
}

@keyframes panelSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Expanded navbar on mobile */
@media (max-width: 992px) {
  #navbar-links.active {
    display: flex !important;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .tutorial-spotlight,
  .tutorial-tooltip,
  .tutorial-view,
  .tutorial-btn {
    transition: none !important;
    animation: none !important;
  }
  
  .tutorial-spotlight.pulse {
    animation: none !important;
  }
  
  .tutorial-expansion-notification,
  .filter-panel.tutorial-expanded,
  .trending-panel.tutorial-expanded {
    animation: none !important;
  }
}

/* ============================================================================
   TUTORIAL SKIP CONFIRMATION MODAL
   ============================================================================ */

.tutorial-skip-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10003; /* Above everything including tooltip */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 2rem;
}

.tutorial-skip-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.tutorial-skip-modal {
  background: linear-gradient(135deg, rgba(26, 29, 46, 0.98) 0%, rgba(30, 34, 54, 0.98) 100%);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 107, 53, 0.4);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9),
              0 0 60px rgba(255, 107, 53, 0.3);
  max-width: 480px;
  width: 100%;
  padding: 2.5rem;
  text-align: center;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tutorial-skip-modal-overlay.show .tutorial-skip-modal {
  transform: scale(1) translateY(0);
}

html.light .tutorial-skip-modal {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  border-color: rgba(255, 107, 53, 0.5);
}

.tutorial-skip-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(255, 140, 66, 0.2) 100%);
  border: 2px solid rgba(255, 107, 53, 0.4);
  border-radius: 50%;
  color: #ff8c42;
}

.tutorial-skip-modal-icon svg {
  width: 48px;
  height: 48px;
}

.tutorial-skip-modal h3 {
  margin: 0 0 1rem 0;
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tutorial-skip-modal p {
  margin: 0 0 2rem 0;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

html.light .tutorial-skip-modal p {
  color: rgba(0, 0, 0, 0.7);
}

.tutorial-skip-modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.tutorial-skip-modal-btn {
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  min-width: 140px;
}

.tutorial-skip-modal-btn-cancel {
  background: rgba(255, 107, 53, 0.1);
  color: #ff8c42;
  border: 2px solid rgba(255, 107, 53, 0.3);
}

html.light .tutorial-skip-modal-btn-cancel {
  background: rgba(255, 107, 53, 0.08);
  border-color: rgba(255, 107, 53, 0.4);
  color: #ff6b35;
}

.tutorial-skip-modal-btn-cancel:hover {
  background: rgba(255, 107, 53, 0.2);
  border-color: rgba(255, 107, 53, 0.5);
  transform: translateY(-2px);
}

.tutorial-skip-modal-btn-confirm {
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.4);
}

.tutorial-skip-modal-btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 107, 53, 0.5);
}

.tutorial-skip-modal-btn-confirm:active,
.tutorial-skip-modal-btn-cancel:active {
  transform: translateY(0);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .tutorial-skip-modal {
    padding: 2rem 1.5rem;
  }
  
  .tutorial-skip-modal-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1.25rem;
  }
  
  .tutorial-skip-modal-icon svg {
    width: 36px;
    height: 36px;
  }
  
  .tutorial-skip-modal h3 {
    font-size: 1.5rem;
  }
  
  .tutorial-skip-modal p {
    font-size: 0.9375rem;
  }
  
  .tutorial-skip-modal-actions {
    flex-direction: column-reverse;
  }
  
  .tutorial-skip-modal-btn {
    width: 100%;
  }
}

/* ============================================================================
   TUTORIAL COMPLETION ANIMATION
   ============================================================================ */

.tutorial-completion-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(26, 29, 46, 0.98) 100%);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10004; /* Above everything */
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tutorial-completion-overlay.show {
  opacity: 1;
  visibility: visible;
}

.tutorial-completion-content {
  text-align: center;
  transform: scale(0.8) translateY(30px);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tutorial-completion-overlay.show .tutorial-completion-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.completion-icon-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.completion-icon {
  width: 140px;
  height: 140px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(255, 140, 66, 0.2) 100%);
  border: 3px solid #ff6b35;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff8c42;
  animation: completionIconPulse 2s ease-in-out infinite;
  box-shadow: 0 0 40px rgba(255, 107, 53, 0.5),
              0 0 80px rgba(255, 107, 53, 0.3),
              inset 0 0 40px rgba(255, 107, 53, 0.2);
}

@keyframes completionIconPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 40px rgba(255, 107, 53, 0.5),
                0 0 80px rgba(255, 107, 53, 0.3),
                inset 0 0 40px rgba(255, 107, 53, 0.2);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 60px rgba(255, 107, 53, 0.7),
                0 0 100px rgba(255, 107, 53, 0.4),
                inset 0 0 50px rgba(255, 107, 53, 0.3);
  }
}

.completion-icon svg {
  animation: checkmarkDraw 0.8s ease-out 0.3s both;
}

@keyframes checkmarkDraw {
  0% {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    opacity: 0;
  }
  100% {
    stroke-dasharray: 100;
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

/* Sparkles around the icon */
.completion-sparkles {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #ff6b35 0%, #ffa552 100%);
  border-radius: 50%;
  animation: sparkleFloat 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.8);
}

.sparkle-1 {
  top: 10%;
  left: 50%;
  animation-delay: 0s;
}

.sparkle-2 {
  top: 30%;
  left: 85%;
  animation-delay: 0.3s;
}

.sparkle-3 {
  top: 70%;
  left: 85%;
  animation-delay: 0.6s;
}

.sparkle-4 {
  top: 90%;
  left: 50%;
  animation-delay: 0.9s;
}

.sparkle-5 {
  top: 70%;
  left: 15%;
  animation-delay: 1.2s;
}

.sparkle-6 {
  top: 30%;
  left: 15%;
  animation-delay: 1.5s;
}

@keyframes sparkleFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  50% {
    transform: translateY(-20px) scale(1.5);
    opacity: 1;
  }
}

.completion-title {
  margin: 0 0 1rem 0;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 50%, #ffa552 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  animation: titleSlideIn 0.6s ease-out 0.4s both;
}

@keyframes titleSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.completion-message {
  margin: 0 0 2.5rem 0;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  animation: messageSlideIn 0.6s ease-out 0.6s both;
}

@keyframes messageSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.completion-redirect {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: rgba(255, 140, 66, 0.9);
  animation: redirectFadeIn 0.6s ease-out 0.8s both;
}

@keyframes redirectFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.completion-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  animation: redirectFadeIn 0.6s ease-out 0.8s both;
}

.completion-actions .tutorial-btn {
  min-width: 160px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .completion-actions {
    flex-direction: column;
    width: 100%;
    padding: 0 1rem;
  }
  
  .completion-actions .tutorial-btn {
    width: 100%;
    margin-left: 0 !important;
  }
}

.redirect-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 107, 53, 0.3);
  border-top-color: #ff6b35;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Mobile responsive */
@media (max-width: 768px) {
  .completion-icon {
    width: 100px;
    height: 100px;
  }
  
  .completion-icon svg {
    width: 60px;
    height: 60px;
  }
  
  .completion-sparkles {
    width: 150px;
    height: 150px;
  }
  
  .completion-title {
    font-size: 2rem;
  }
  
  .completion-message {
    font-size: 1rem;
    padding: 0 1rem;
  }
}

/* Theme-specific adjustments */
/* html.light .tutorial-overlay {
  background: rgba(255, 255, 255, 0.75);
} */

/* Ensure tutorial content matches theme */
.tutorial-container .dashboard-container,
.tutorial-container .alerts-container {
  background: var(--bg-color);
  min-height: 100vh;
}

/* Fix for mobile buttons in tutorial */
@media (max-width: 992px) {
  .tutorial-container .mobile-buttons-container {
    display: block;
  }
  
  .tutorial-container .mobile-filter-btn,
  .tutorial-container .mobile-trending-btn {
    display: flex;
  }
}

/* Ensure panels are visible in tutorial on desktop */
@media (min-width: 1300px) {
  .tutorial-container .filter-panel,
  .tutorial-container .trending-panel {
    display: block;
  }
}

/* Hide panels on mobile in tutorial */
@media (max-width: 992px) {
  .tutorial-container .filter-panel,
  .tutorial-container .trending-panel {
    display: none;
  }
}

/* Ensure news cards are visible */
.tutorial-container .news-card {
  margin-bottom: 1.5rem;
}

/* News card animation styles */
#news-container-by-token .news-card {
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.7s ease;
  will-change: transform, opacity;
}

/* Initial state for animated cards - appear from top */
.tutorial-container .news-card.animating {
  opacity: 0;
  transform: translateY(-100%);
}

/* Smooth push-down animation for existing cards */
#news-container-by-token {
  position: relative;
}

/* Ensure cards maintain their position during animation */
#news-container-by-token .news-card {
  transform-origin: top center;
  position: relative;
}

/* Glow effect for new cards */
@keyframes newCardGlow {
  0% {
    box-shadow: 0 0 0 rgba(102, 126, 234, 0);
  }
  50% {
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.6), 0 4px 20px rgba(0, 0, 0, 0.2);
  }
  100% {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
}

/* Keyboard focus styles for accessibility */
.tutorial-btn:focus-visible {
  outline: 3px solid #667eea;
  outline-offset: 2px;
}

/* Skip button special positioning on mobile */
@media (max-width: 992px) {
  .tutorial-btn-skip {
    position: relative;
  }
}

/* Ensure proper z-index stacking */
.tutorial-ui {
  isolation: isolate;
}

/* Smooth transitions between tutorial views */
.tutorial-view {
  will-change: opacity;
}

/* Optimize performance */
.tutorial-spotlight {
  will-change: transform, box-shadow;
}

.tutorial-tooltip {
  will-change: transform;
}

/* ============================================================================
   TUTORIAL MODAL STYLES - Matching Original Design
   ============================================================================ */

/* Modal Overlays */
.alert-modal-overlay,
.settings-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000; /* Above spotlight (9999) but below modal spotlight (10001) */
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  padding: 2rem;
  padding-top: calc(80px + 2rem);
}

.alert-modal-overlay.show,
.settings-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Modal Containers */
.alert-modal,
.settings-modal {
  background: var(--card-bg);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 10000;
  transition: transform 0.2s ease;
}

/* Modal Headers */
.alert-modal-header,
.settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-modal-header h2,
.settings-modal-header h2 {
  margin: 0;
  font-size: 24px;
  color: var(--text-primary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
  pointer-events: none;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* Alert Form */
.alert-form {
  padding: 24px;
}

/* Alert Type Selector */
.alert-type-selector {
  margin-bottom: 24px;
}

.alert-type-label {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.alert-type-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.alert-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  pointer-events: none;
}

.alert-type-btn.active {
  background: rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.alert-type-btn svg {
  margin-bottom: 8px;
  color: #667eea;
}

.alert-type-btn span {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.alert-type-btn small {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Form Groups */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: #667eea;
  background: rgba(255, 255, 255, 0.08);
}

/* Sentiment Slider */
.sentiment-slider-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sentiment-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
}

.sentiment-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
}

.sentiment-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  border: none;
}

.sentiment-value {
  font-weight: 600;
  color: #667eea;
  min-width: 45px;
  text-align: right;
}

/* Advanced Settings Toggle */
.advanced-settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  margin: 24px 0;
  pointer-events: none;
}

.advanced-settings-toggle:hover {
  background: rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.5);
}

.advanced-toggle-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.advanced-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(102, 126, 234, 0.2);
  border-radius: 10px;
  color: #667eea;
}

.advanced-toggle-text h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  color: var(--text-primary);
}

.advanced-toggle-text p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.advanced-toggle-arrow {
  color: #667eea;
  transition: transform 0.3s;
}

.advanced-settings-toggle.active .advanced-toggle-arrow {
  transform: rotate(180deg);
}

/* Advanced Settings Panel */
.advanced-settings-panel {
  margin-top: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.advanced-settings-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.advanced-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.advanced-form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.advanced-form-label svg {
  color: #667eea;
}

.dual-input-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.advanced-input {
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  /* border: 1px solid rgba(255, 255, 255, 0.1); */
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
}

.advanced-form-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.advanced-form-hint svg {
  flex-shrink: 0;
  color: #667eea;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary,
.btn-secondary {
  flex: 1;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  pointer-events: none;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5568d3;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Action Buttons Active State */
.action-btn.active {
  background: rgba(102, 126, 234, 0.2);
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.action-btn.primary-btn.active {
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.action-btn.secondary-btn.active {
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Settings Modal Content */
.settings-modal-content {
  padding: 24px;
}

.settings-description {
  margin: 0 0 24px 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* Notification Channels */
.notification-channels {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.channel-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s;
}

.channel-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.channel-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.channel-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
}

.channel-icon.website {
  background: rgba(102, 126, 234, 0.2);
  color: #667eea;
}

.channel-icon.email {
  background: rgba(72, 187, 120, 0.2);
  color: #48bb78;
}

.channel-icon.telegram {
  background: rgba(56, 161, 243, 0.2);
  color: #38a1f3;
}

.channel-info {
  flex: 1;
}

.channel-info h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  color: var(--text-primary);
}

.channel-info p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #667eea;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .alert-modal,
  .settings-modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .alert-type-buttons {
    grid-template-columns: 1fr;
  }

  .dual-input-group {
    grid-template-columns: 1fr;
  }
}

/* Tutorial Alerts View Action Buttons */
#alerts-tutorial .action-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

#alerts-tutorial .action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  pointer-events: none;
  flex: 1;
  min-width: 0;
}

#alerts-tutorial .action-btn.primary-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#alerts-tutorial .action-btn.secondary-btn {
  background: var(--bg-color);
  color: var(--text-primary);
  border: 2px solid #667eea;
}

#alerts-tutorial .action-btn.active {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.25);
  transform: scale(1.02);
}

#alerts-tutorial .action-btn.primary-btn.active {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3), 0 0 0 4px rgba(102, 126, 234, 0.25);
}

#alerts-tutorial .action-btn.secondary-btn.active {
  background: rgba(102, 126, 234, 0.15);
  border-color: #667eea;
}
