/* =================== CSS VARIABLES =================== */
     :root {
      /* Colors */
      --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
      --primary: #0369a1;
      --primary-dark: #075985;
      --secondary: #2D3142;
      --accent: #0ea5e9;
      --accent-dark: #0284c7;
      --bg-light: #f8fafc;
      --bg-card: #FFFFFF;
      --text-dark: #1A1A1A;
      --text-muted: #64748b;
      --border: rgba(0, 0, 0, 0.08);
      --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
      --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
      --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
      --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
      
      /* Typography */
      --font-display: 'Fraunces', serif;
      --font-body: 'DM Sans', sans-serif;
      --font-quote: 'Crimson Pro', serif;
      --font-mono: 'Space Mono', monospace;
      
      /* Spacing */
      --space-xs: 0.25rem;
      --space-sm: 0.5rem;
      --space-md: 1rem;
      --space-lg: 1.5rem;
      --space-xl: 2rem;
      --space-2xl: 3rem;
      --space-3xl: 4rem;
      
      /* Transitions */
      --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
      
      /* ADDED: Mood Colors for history tracking */
      --mood-amazing: #10b981;      /* Green - Amazing */
      --mood-good: #3b82f6;         /* Blue - Good */
      --mood-okay: #eab308;         /* Yellow - Okay */
      --mood-bad: #f97316;          /* Orange - Bad */
      --mood-terrible: #ef4444;     /* Red - Terrible */
      --mood-default: #0ea5e9;      /* Default blue for no mood */
      --mood-empty: #e2e8f0;        /* Light gray for empty/no data */
    }

    /* =================== GLOBAL STYLES =================== */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: var(--font-body);
      background: var(--bg-gradient);
      background-attachment: fixed;
      color: var(--text-dark);
      line-height: 1.6;
      overflow-x: hidden;
      position: relative;
      min-height: 100vh;
    }

    /* Subtle animated background pattern */
    /* Subtle animated background pattern */
    body::before {
      content: '';
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-image: 
        radial-gradient(circle at 20% 30%, rgba(3, 105, 161, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(14, 165, 233, 0.04) 0%, transparent 50%);
      pointer-events: none;
      z-index: 0;
      animation: subtleFloat 20s ease-in-out infinite;
    }

    @keyframes subtleFloat {
      0%, 100% { transform: translate(0, 0) scale(1); }
      33% { transform: translate(-5px, 5px) scale(1.02); }
      66% { transform: translate(5px, -5px) scale(0.98); }
    }

    /* =================== CONTAINER =================== */
    .app-container {
      max-width: 1400px;
      margin: 0 auto;
      padding: var(--space-xl);
      position: relative;
      z-index: 1;
    }

    /* =================== HEADER =================== */
    .header {
      text-align: center;
      margin-bottom: var(--space-2xl);
      animation: fadeInDown 0.8s ease-out;
    }

    .main-title1 {
      font-family: var(--font-display);
      font-size: 2.75rem;
      font-weight: 900;
      background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
      margin-bottom: var(--space-md);
      letter-spacing: -0.02em;
    }

    .header-subtitle {
      font-size: 1.125rem;
      color: var(--text-muted);
      font-weight: 500;
      margin-bottom: var(--space-lg);
    }

    .date-badge {
      display: inline-flex;
      align-items: center;
      gap: var(--space-sm);
      padding: var(--space-sm) var(--space-lg);
      background: var(--bg-card);
      border-radius: 50px;
      font-family: var(--font-mono);
      font-size: 0.875rem;
      color: var(--text-muted);
      box-shadow: var(--shadow-sm);
      border: 1px solid var(--border);
    }

    /* Dark Streak Badge - Below Date */
    .streak-badge {
      display: inline-flex;
      align-items: center;
      gap: var(--space-sm);
      padding: var(--space-sm) var(--space-lg);
      background: var(--secondary);
      color: white;
      border-radius: 50px;
      font-family: var(--font-body);
      font-size: 0.875rem;
      font-weight: 600;
      box-shadow: var(--shadow-md);
      margin-top: var(--space-md);
      animation: fadeInUp 0.8s ease-out 0.2s both;
    }

    .streak-badge i {
      font-size: 1rem;
      color: var(--accent);
      animation: flamePulse 2s ease-in-out infinite;
    }

    .streak-badge .streak-count {
      font-size: 1rem;
      font-weight: 700;
      line-height: 1;
    }

    @keyframes flamePulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.15); }
    }

    /* =================== MOOD FILTER SECTION =================== */
    .mood-filter-section {
      margin-bottom: var(--space-xl);
      animation: fadeInUp 0.8s ease-out 0.1s both;
    }

    .mood-filters {
      display: flex;
      justify-content: center;
      gap: var(--space-md);
      padding: var(--space-md);
      flex-wrap: wrap;
      background: #e8f0f7;
      border-radius: 16px;
    }

    .mood-btn {
      min-width: 110px;
      padding: var(--space-md) var(--space-lg);
      background: white;
      border: 2px solid transparent;
      border-radius: 12px;
      cursor: pointer;
      transition: var(--transition);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: var(--space-sm);
      position: relative;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .mood-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      border-color: var(--primary);
    }

    .mood-btn.active {
      background: linear-gradient(135deg, rgba(3, 105, 161, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
      border: 2px solid var(--primary);
      box-shadow: 0 4px 12px rgba(3, 105, 161, 0.2);
    }

    .mood-icon {
      font-size: 1.75rem;
      transition: var(--transition);
      color: var(--text-dark);
    }

    .mood-btn.active .mood-icon {
      animation: bounceIn 0.6s ease-out;
      color: var(--primary);
    }

    .mood-label {
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--text-dark);
      text-align: center;
      line-height: 1.2;
    }

    .mood-btn.active .mood-label {
      color: var(--primary);
    }

    /* =================== MAIN CONTENT AREA =================== */
    .main-content {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: var(--space-2xl);
      margin-bottom: var(--space-2xl);
      animation: fadeInUp 0.8s ease-out 0.2s both;
    }

    /* =================== LEFT COLUMN - QUOTE DISPLAY =================== */
    .left-column {
      display: flex;
      flex-direction: column;
      gap: var(--space-xl);
    }

    .quote-display-container {
      position: relative;
      border-radius: 24px;
      overflow: hidden;
      box-shadow: var(--shadow-xl);
      background: var(--bg-card);
    }

    /* Overlay Mode */
    .quote-display-container.overlay-mode {
      aspect-ratio: 4/3;
    }

    .quote-display-container.overlay-mode.portrait {
      aspect-ratio: 3/4;
    }

    .quote-display-container.overlay-mode.portrait .quote-overlay {
      padding: var(--space-2xl) var(--space-xl);
    }

    .quote-image {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: var(--transition-slow);
    }

    .quote-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      padding: var(--space-3xl);
      opacity: 0;
      transition: var(--transition);
      overflow: hidden;
    }

    .overlay-mode .quote-overlay {
      opacity: 1;
    }

    .quote-text-overlay {
      font-family: var(--font-quote);
      font-size: clamp(1.25rem, 4vw, 2rem);
      font-weight: 600;
      color: white;
      text-align: center;
      line-height: 1.4;
      margin-bottom: var(--space-xl);
      text-shadow: 0 2px 8px rgba(0,0,0,0.3);
      max-width: 100%;
      word-wrap: break-word;
      overflow-wrap: break-word;
      hyphens: auto;
    }

    .quote-author-overlay {
      font-family: var(--font-body);
      font-size: clamp(1rem, 2.5vw, 1.25rem);
      font-weight: 500;
      color: rgba(255, 255, 255, 0.95);
      text-shadow: 0 1px 4px rgba(0,0,0,0.3);
      max-width: 100%;
      word-wrap: break-word;
    }

    /* Card Mode */
    .quote-display-container.card-mode {
      display: flex;
      flex-direction: column;
    }

    .quote-display-container.card-mode .quote-image {
      aspect-ratio: 16/9;
      width: 100%;
      height: auto;
    }

    .quote-display-container.card-mode.portrait .quote-image {
      aspect-ratio: 4/3;  /* More balanced - not too tall */
    }

    .quote-card-content {
      padding: var(--space-2xl);
      display: none;
      flex-direction: column;
      gap: var(--space-lg);
      background: white;
      position: relative;
    }

    .card-mode .quote-card-content {
      display: flex;
    }

    .quote-text-card {
      font-family: var(--font-quote);
      font-size: clamp(1.25rem, 3vw, 1.75rem);
      font-weight: 600;
      color: var(--text-dark);
      line-height: 1.5;
      word-wrap: break-word;
      overflow-wrap: break-word;
      hyphens: auto;
    }

    .quote-author-card {
      font-family: var(--font-body);
      font-size: clamp(1rem, 2vw, 1.125rem);
      font-weight: 600;
      color: var(--primary);
      word-wrap: break-word;
    }

    /* Image Icons (stay on image) */
    .image-icons {
      position: absolute;
      top: var(--space-lg);
      left: var(--space-lg);
      right: var(--space-lg);
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      z-index: 10;
      pointer-events: none;
    }

    .image-icons > * {
      pointer-events: auto;
    }

    /* Mood Badge on Quote Image */
    .mood-badge {
      position: absolute;
      bottom: var(--space-lg);
      left: var(--space-lg);
      z-index: 10;
      display: inline-flex;
      align-items: center;
      gap: 0.375rem;
      padding: 0.45rem 0.85rem;
      background: rgba(255, 255, 255, 0.18);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid rgba(255, 255, 255, 0.3);
      border-radius: 20px;
      font-family: var(--font-body);
      font-size: 0.8125rem;
      font-weight: 600;
      color: rgba(255, 255, 255, 0.95);
      text-shadow: 0 1px 3px rgba(0,0,0,0.3);
      transition: var(--transition);
    }

    .mood-badge:hover {
      background: rgba(255, 255, 255, 0.28);
    }

    .mood-badge .mood-badge-emoji {
      font-size: 1rem;
    }

    .card-mode .mood-badge {
      position: relative;
      bottom: auto;
      left: auto;
      margin-bottom: var(--space-sm);
      align-self: flex-start;
      background: rgba(14, 165, 233, 0.1);
      border: 1px solid rgba(14, 165, 233, 0.25);
      color: var(--primary);
      text-shadow: none;
    }
    
    /* Hide overlay badges in card mode */
    .card-mode #moodBadge,
    .card-mode #qotdBadgeOverlay {
      display: none !important;
    }

    .card-mode .mood-badge:hover {
      background: rgba(14, 165, 233, 0.18);
    }


    .favorite-btn {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.95);
      border: none;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: var(--transition);
      box-shadow: var(--shadow-md);
      backdrop-filter: blur(10px);
    }

    .favorite-btn:hover {
      transform: scale(1.1);
      box-shadow: var(--shadow-lg);
    }

    .favorite-btn i {
      font-size: 1.25rem;
      color: var(--text-muted);
      transition: var(--transition);
    }

    .favorite-btn.active i {
      color: #dc2626;
      animation: heartBeat 0.6s ease-out;
    }

    @keyframes heartBeat {
      0%, 100% { transform: scale(1); }
      25% { transform: scale(1.3); }
      50% { transform: scale(1.1); }
    }

    .aspect-toggle {
      display: flex;
      gap: var(--space-xs);
      background: rgba(255, 255, 255, 0.95);
      padding: var(--space-xs);
      border-radius: 50px;
      box-shadow: var(--shadow-md);
      backdrop-filter: blur(10px);
    }

    .aspect-btn {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: none;
      background: transparent;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: var(--transition);
      color: var(--text-muted);
    }

    .aspect-btn:hover {
      background: rgba(3, 105, 161, 0.1);
      color: var(--primary);
    }

    .aspect-btn.active {
      background: var(--primary);
      color: white;
    }

    /* Action Buttons - Now below image */
    .action-buttons {
      display: flex;
      flex-direction: column;
      gap: var(--space-md);
      padding: var(--space-md);
      background: var(--bg-card);
      border-radius: 16px;
      box-shadow: var(--shadow-md);
    }

    /* Layout Toggle Buttons */
    .layout-toggle {
      display: flex;
      gap: var(--space-sm);
      background: var(--bg-light);
      padding: 4px;
      border-radius: 12px;
    }

    .layout-btn {
      flex: 1;
      padding: var(--space-sm) var(--space-md);
      background: transparent;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: var(--space-sm);
      font-family: var(--font-body);
      font-size: clamp(0.75rem, 1.5vw, 0.875rem);
      font-weight: 600;
      color: var(--text-muted);
      transition: var(--transition);
    }

    .layout-btn:hover {
      background: rgba(3, 105, 161, 0.05);
      color: var(--primary);
    }

    .layout-btn.active {
      background: white;
      color: var(--primary);
      box-shadow: var(--shadow-sm);
    }

    /* Font Selector */
    .font-selector {
      display: flex;
      gap: var(--space-sm);
      background: var(--bg-light);
      padding: 4px;
      border-radius: 12px;
      flex-wrap: wrap;
    }

    .font-btn {
      flex: 1;
      min-width: 60px;
      padding: var(--space-sm) var(--space-md);
      background: transparent;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      font-family: var(--font-body);
      font-size: clamp(0.75rem, 1.5vw, 0.875rem);
      font-weight: 600;
      color: var(--text-muted);
      transition: var(--transition);
    }

    .font-btn:hover {
      background: rgba(3, 105, 161, 0.05);
      color: var(--primary);
    }

    .font-btn.active {
      background: white;
      color: var(--primary);
      box-shadow: var(--shadow-sm);
    }

    /* Copy and Download Buttons */
    .utility-buttons {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: var(--space-sm);
    }

    .utility-btn {
      padding: var(--space-md);
      background: var(--bg-light);
      border: 1px solid var(--border);
      border-radius: 12px;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: var(--space-sm);
      transition: var(--transition);
      font-family: var(--font-body);
      font-size: clamp(0.75rem, 1.5vw, 0.875rem);
      font-weight: 600;
      color: var(--text-dark);
    }

    .utility-btn:hover {
      background: white;
      border-color: var(--primary);
      transform: translateY(-2px);
      box-shadow: var(--shadow-md);
    }

    .utility-btn i {
      font-size: clamp(1.125rem, 2.5vw, 1.25rem);
      color: var(--primary);
    }

    /* Share Buttons */
    .share-section {
      background: white;
      padding: var(--space-lg);
      border-radius: 16px;
      box-shadow: var(--shadow-md);
    }

    .share-title {
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--text-dark);
      margin-bottom: var(--space-md);
      text-align: center;
    }

    .share-buttons {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: var(--space-sm);
    }

    .share-btn {
      padding: var(--space-md);
      border: 2px solid var(--border);
      background: white;
      border-radius: 12px;
      cursor: pointer;
      transition: var(--transition);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: var(--space-xs);
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--text-muted);
    }

    .share-btn i {
      font-size: 1.25rem;
      transition: var(--transition);
    }

    .share-btn:hover {
      transform: translateY(-2px);
      box-shadow: var(--shadow-sm);
    }

    .share-btn.twitter:hover {
      border-color: #1DA1F2;
      background: #1DA1F2;
      color: white;
    }

    .share-btn.twitter:hover i {
      color: white;
    }

    .share-btn.facebook:hover {
      border-color: #1877F2;
      background: #1877F2;
      color: white;
    }

    .share-btn.facebook:hover i {
      color: white;
    }

    .share-btn.whatsapp:hover {
      border-color: #25D366;
      background: #25D366;
      color: white;
    }

    .share-btn.whatsapp:hover i {
      color: white;
    }

    /* =================== QUOTE OF THE WEEK (COMPACT CARD - RIGHT COLUMN) =================== */
    .week-quote-card {
      background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
      border-radius: 20px;
      padding: 0;
      box-shadow: var(--shadow-lg);
      overflow: hidden;
      position: relative;
      animation: fadeInUp 0.6s ease-out 0s both;
    }

    .week-quote-badge {
      position: absolute;
      top: 12px;
      right: 12px;
      background: rgba(251, 191, 36, 1);
      color: white;
      padding: 0.375rem 0.75rem;
      border-radius: 16px;
      font-size: 0.625rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      display: flex;
      align-items: center;
      gap: 0.25rem;
      box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
      z-index: 2;
      animation: pulse 2s ease-in-out infinite;
    }

    .week-quote-image-container {
      position: relative;
      height: 180px;
      overflow: hidden;
    }

    .week-quote-image {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .week-quote-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(to bottom, transparent 0%, rgba(124, 58, 237, 0.8) 100%);
    }

    .week-quote-content {
      padding: var(--space-xl);
      color: white;
    }

    .week-quote-text {
      font-family: var(--font-quote);
      font-size: 1.125rem;
      font-weight: 600;
      line-height: 1.6;
      margin-bottom: var(--space-md);
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .week-quote-author {
      font-size: 0.9375rem;
      font-weight: 600;
      opacity: 0.95;
      margin-bottom: var(--space-lg);
    }

    .week-quote-stats {
      display: flex;
      gap: var(--space-lg);
      margin-bottom: var(--space-lg);
      font-size: 0.8125rem;
      opacity: 0.9;
    }

    .week-quote-stat {
      display: flex;
      align-items: center;
      gap: 0.375rem;
    }

    .week-quote-btn {
      width: 100%;
      padding: var(--space-md);
      background: white;
      color: var(--primary);
      border: none;
      border-radius: 12px;
      font-family: var(--font-body);
      font-size: 0.9375rem;
      font-weight: 700;
      cursor: pointer;
      transition: var(--transition);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: var(--space-sm);
    }

    .week-quote-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    }

        /* =================== RIGHT COLUMN - ENGAGEMENT FEATURES =================== */
    .right-column {
      display: flex;
      flex-direction: column;
      gap: var(--space-lg);
    }

    /* Engagement Card Base Styles */
    .engagement-card {
      background: white;
      border-radius: 20px;
      padding: var(--space-xl);
      box-shadow: var(--shadow-md);
      transition: var(--transition);
      animation: fadeInUp 0.6s ease-out both;
    }

    .engagement-card:hover {
      box-shadow: var(--shadow-lg);
      transform: translateY(-2px);
    }

    .engagement-card-header {
      display: flex;
      align-items: center;
      gap: var(--space-md);
      margin-bottom: var(--space-lg);
    }

    .engagement-card-icon {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5rem;
      background: linear-gradient(135deg, rgba(3, 105, 161, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
      color: var(--primary);
    }

    .engagement-card-title {
      font-family: var(--font-display);
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--text-dark);
    }

    /* Daily Challenge Widget */
    .challenge-list {
      display: flex;
      flex-direction: column;
      gap: var(--space-md);
      margin-bottom: var(--space-lg);
    }

    .challenge-item {
      display: flex;
      align-items: center;
      gap: var(--space-md);
      padding: var(--space-md);
      background: var(--bg-light);
      border-radius: 12px;
      transition: var(--transition);
      cursor: pointer;
    }

    .challenge-item:hover {
      background: #e2e8f0;
      transform: translateX(4px);
    }

    .challenge-item.completed {
      background: rgba(14, 165, 233, 0.1);
      border: 2px solid rgba(14, 165, 233, 0.3);
    }

    .challenge-checkbox {
      width: 24px;
      height: 24px;
      border-radius: 6px;
      border: 2px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      transition: var(--transition);
    }

    .challenge-item.completed .challenge-checkbox {
      background: var(--accent);
      border-color: var(--accent);
      color: white;
    }

    .challenge-text {
      flex: 1;
      font-size: 0.9375rem;
      font-weight: 500;
      color: var(--text-dark);
    }

    .challenge-item.completed .challenge-text {
      color: var(--text-muted);
      text-decoration: line-through;
    }

    .challenge-progress {
      margin-top: var(--space-md);
    }

    .challenge-progress-text {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: var(--space-sm);
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--text-muted);
    }

    .challenge-progress-bar {
      height: 8px;
      background: var(--bg-light);
      border-radius: 10px;
      overflow: hidden;
      position: relative;
    }

    .challenge-progress-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
      border-radius: 10px;
      transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      overflow: hidden;
    }

    .challenge-progress-fill::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
      animation: shimmer 2s infinite;
    }

    @keyframes shimmer {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(100%); }
    }

    .challenge-reward {
      margin-top: var(--space-md);
      padding: var(--space-md);
      background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%);
      border-radius: 12px;
      display: flex;
      align-items: center;
      gap: var(--space-sm);
      font-size: 0.875rem;
      font-weight: 600;
      color: #f57c00;
    }

/* =================== UPDATED DID YOU KNOW CARD STYLES =================== */
/* Compact Did You Know Content - Reduced vertical spacing */
.did-you-know-content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* Reduced from 1.5rem to 0.75rem */
}

/* Badges container - category and difficulty */
.did-you-know-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

/* Category badge - light purple/blue background */
.did-you-know-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #e0e7ff;
  color: #4f46e5;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  width: fit-content;
}

.did-you-know-category i {
  display: none; /* No icon in category */
}

/* Difficulty badges - RECTANGULAR background with single emoji */
.did-you-know-difficulty {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 4px; /* Rectangular, not fully rounded */
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  width: fit-content;
}

/* Remove duplicate icons - only show emoji inside i tag */
.did-you-know-difficulty i {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1;
}

/* Easy - Green background */
.did-you-know-difficulty.easy {
  background: #dcfce7;
  color: #166534;
}

/* Medium - Yellow background */
.did-you-know-difficulty.medium {
  background: #fef3c7;
  color: #92400e;
}

/* Hard - Pink background */
.did-you-know-difficulty.hard {
  background: #fce7f3;
  color: #9f1239;
}

/* Fact display box - clean left border, reduced padding */
.did-you-know-fact {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-dark);
  padding: 0.875rem 1rem;
  background: #f9fafb;
  border-left: 4px solid #0ea5e9;
  border-radius: 6px;
  margin: 0.5rem 0; /* Reduced vertical margin */
  font-weight: 400;
}

/* Source info - compact spacing */
.did-you-know-source {
  font-size: 0.75rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 0.5rem; /* Reduced from 1rem */
  position: relative;
}

.did-you-know-source::before {
  content: "📖";
  font-size: 0.9rem;
}

.did-you-know-source::after {
  content: "''";
  color: #fbbf24;
  font-size: 1.1rem;
  font-weight: bold;
  margin-left: auto;
  font-family: Georgia, serif;
  line-height: 1;
}

.did-you-know-source i {
  display: none;
}

/* Actions container - reduced spacing */
.did-you-know-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem; /* Reduced from 1rem */
}

/* Next button - more compact */
.next-fact-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.next-fact-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.next-fact-btn:active {
  transform: translateY(0);
}

.next-fact-btn i {
  font-size: 0.75rem;
}

/* Play/Pause button - compact */
.autoplay-btn {
  padding: 0.75rem 1rem;
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 100px;
}

.autoplay-btn:hover {
  background: rgba(3, 105, 161, 0.05);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.autoplay-btn:active {
  transform: translateY(0);
}

.autoplay-btn.playing {
  background: var(--primary);
  color: white;
}

.autoplay-btn.playing:hover {
  background: var(--primary-dark);
}

.autoplay-btn i {
  font-size: 0.75rem;
}

/* Autoplay timer indicator - thinner */
.autoplay-timer {
  height: 2px;
  background: rgba(3, 105, 161, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.5rem;
  display: none;
}

.autoplay-timer.active {
  display: block;
}

.autoplay-timer-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.1s linear;
}


    /* =================== MOOD TRACKER (LEFT COLUMN) =================== */
    .mood-tracker-card {
      background: var(--bg-card);
      border-radius: 16px;
      padding: var(--space-lg);
      box-shadow: var(--shadow-md);
    }

    .mood-tracker-header {
      margin-bottom: var(--space-lg);
    }

    .mood-tracker-title {
      font-size: clamp(1rem, 2vw, 1.25rem);
      font-weight: 700;
      color: var(--text-dark);
      margin-bottom: var(--space-sm);
    }

    .mood-tracker-subtitle {
      font-size: clamp(0.75rem, 1.5vw, 0.875rem);
      color: var(--text-muted);
    }

    .mood-selector {
      display: flex;
      flex-wrap: nowrap;
      gap: var(--space-sm);
      margin-bottom: var(--space-lg);
      overflow-x: auto;
    }

    .mood-option {
      flex: 1 1 0;
      min-width: 60px;
      padding: var(--space-md) var(--space-sm);
      background: var(--bg-light);
      border: 2px solid transparent;
      border-radius: 12px;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: var(--space-xs);
      transition: var(--transition);
    }

    .mood-option:hover {
      background: white;
      border-color: var(--primary);
      transform: translateY(-2px);
    }

    .mood-option.selected {
      background: linear-gradient(135deg, rgba(3, 105, 161, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
      border-color: var(--primary);
    }

    .mood-emoji {
      font-size: clamp(1.5rem, 3vw, 2rem);
    }

    .mood-name {
      font-size: clamp(0.75rem, 1.5vw, 0.875rem);
      font-weight: 600;
      color: var(--text-dark);
    }

    .mood-chart-container {
      margin-bottom: var(--space-lg);
    }

    .mood-chart-title {
      display: flex;
      align-items: center;
      gap: var(--space-sm);
      font-size: clamp(0.875rem, 1.5vw, 1rem);
      font-weight: 600;
      color: var(--text-dark);
      margin-bottom: var(--space-md);
    }

.mood-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 8px;
  height: 180px;
  padding: 20px 10px 40px 10px; /* Extra bottom padding for labels */
  background: linear-gradient(to top, 
    rgba(148, 163, 184, 0.1) 0%, 
    transparent 100%);
  border-radius: 12px;
  position: relative;
}

/* Grid lines for reference */
.mood-chart::before {
  content: '';
  position: absolute;
  bottom: 40px; /* Adjusted for label space */
  left: 0;
  right: 0;
  height: calc(100% - 60px);
  background: 
    linear-gradient(to top, 
      rgba(148, 163, 184, 0.1) 1px, 
      transparent 1px);
  background-size: 100% 25%;
  pointer-events: none;
}

/* Mood Bar - SIMPLIFIED for direct children */
.mood-bar {
  flex: 1 1 auto; /* CHANGED: Allow bars to flex and shrink */
  min-width: 40px; /* CHANGED: Minimum width instead of fixed */
  max-width: 80px; /* CHANGED: Maximum width to prevent too large */
  /* NO min-height - let inline styles control */
  background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%);
  border-radius: 8px 8px 0 0;
  position: relative;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mood-bar:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  filter: brightness(1.1);
}

/* Day Labels - INSIDE the bar at bottom */
.mood-bar-label {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

/* Today indicator */
.mood-bar.current-day {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3),
              0 4px 12px rgba(0, 0, 0, 0.15);
}

.mood-bar.current-day::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: #3b82f6;
  border-radius: 50%;
  box-shadow: 0 0 10px #3b82f6;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(-50%) scale(1.3);
    opacity: 0.7;
  }
}

/* Mood-specific colors */
.mood-bar[data-mood="motivated"] {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.mood-bar[data-mood="happy"] {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

.mood-bar[data-mood="calm"] {
  background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%);
}

.mood-bar[data-mood="sad"] {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.mood-bar[data-mood="stressed"] {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.mood-bar[data-mood="none"] {
  background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%);
  opacity: 1;
}
    /* Wrapper for each day's bar and label - NOT USED in this HTML structure */
    /* Keeping for compatibility but won't affect layout */
    .mood-chart .chart-bar-wrapper {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: var(--space-xs);
      flex: 1;
      max-width: 80px;
      position: relative;
      justify-content: flex-end;
    }

    /* chart-bar class - Use mood-bar instead for this HTML structure */
    .chart-bar {
      flex: 0 0 auto;
      width: 60px;
      background: linear-gradient(to top, var(--primary), var(--accent));
      border-radius: 8px 8px 0 0;
      position: relative;
      transition: all 0.3s ease;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .mood-bar:hover,
    .chart-bar:hover {
      transform: translateY(-4px) scale(1.05);
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
      filter: brightness(1.1);
    }

    .mood-bar-label,
    .chart-day-label {
      font-size: clamp(0.625rem, 1.2vw, 0.75rem);
      color: var(--text-muted);
      white-space: nowrap;
      font-weight: 600;
      margin-top: var(--space-xs);
      text-align: center;
    }
    
    .chart-day-label.current {
      color: var(--primary);
      font-weight: 700;
    }
    
    /* Current day indicator */
    .chart-bar.current-day {
      box-shadow: 0 0 0 1.5px rgba(3, 105, 161, 0.3),
                  0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .chart-bar.current-day::before {
      content: '';
      position: absolute;
      top: -8px;
      left: 50%;
      transform: translateX(-50%);
      width: 8px;
      height: 8px;
      background: var(--primary);
      border-radius: 50%;
      box-shadow: 0 0 10px var(--accent);
      animation: pulseIndicator 2s ease-in-out infinite;
    }

    @keyframes pulseIndicator {
      0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
      }
      50% {
        transform: translateX(-50%) scale(1.3);
        opacity: 0.7;
      }
    }

    .mood-insight {
      display: flex;
      align-items: center;
      gap: var(--space-sm);
      padding: var(--space-md);
      background: linear-gradient(135deg, rgba(14, 165, 233, 0.05), rgba(3, 105, 161, 0.05));
      border-radius: 12px;
      font-size: clamp(0.75rem, 1.5vw, 0.875rem);
      color: var(--text-muted);
    }

    .mood-insight i {
      color: var(--accent);
      font-size: clamp(1rem, 2vw, 1.125rem);
    }

    /* =================== ACHIEVEMENT PROGRESS (REDESIGNED - LIGHT THEME) =================== */
    .achievement-section {
      margin: var(--space-3xl) 0;
      animation: fadeInUp 0.8s ease-out 0.5s both;
    }

    .achievement-container {
      background: white;
      border-radius: 24px;
      padding: var(--space-2xl);
      box-shadow: var(--shadow-lg);
    }

    .achievement-header {
      text-align: center;
      margin-bottom: var(--space-2xl);
    }

    .achievement-title {
      font-family: var(--font-display);
      font-size: 2rem;
      font-weight: 900;
      color: var(--text-dark);
      margin-bottom: var(--space-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: var(--space-md);
    }

    .achievement-title-icon {
      font-size: 2.25rem;
    }

    .achievement-subtitle {
      color: var(--text-muted);
      font-size: 1rem;
      font-weight: 500;
    }

    .achievement-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: var(--space-xl);
      margin-bottom: var(--space-2xl);
    }

    .achievement-item {
      background: var(--bg-light);
      border: 2px solid var(--border);
      border-radius: 20px;
      padding: var(--space-xl);
      transition: var(--transition);
      position: relative;
      overflow: hidden;
    }

    .achievement-item::before {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      width: 100px;
      height: 100px;
      background: radial-gradient(circle, rgba(3, 105, 161, 0.08) 0%, transparent 70%);
      border-radius: 50%;
      transform: translate(30%, -30%);
    }

    .achievement-item:hover {
      transform: translateY(-4px);
      box-shadow: var(--shadow-lg);
      border-color: var(--accent);
    }

    .achievement-item.completed {
      background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
      border-color: #06b6d4;
      box-shadow: 0 8px 24px rgba(6, 182, 212, 0.2);
    }

    .achievement-item.completed::after {
      content: '✓';
      position: absolute;
      top: var(--space-md);
      right: var(--space-md);
      width: 32px;
      height: 32px;
      background: #10b981;
      color: white;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 900;
      font-size: 1.25rem;
      box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    }

    .achievement-item[data-achievement="streak"] {
      border-color: #fecaca;
    }

    .achievement-item[data-achievement="streak"]:hover {
      border-color: #f87171;
      box-shadow: 0 8px 24px rgba(248, 113, 113, 0.3);
    }

    .achievement-item[data-achievement="quotes"] {
      border-color: #bfdbfe;
    }

    .achievement-item[data-achievement="quotes"]:hover {
      border-color: #60a5fa;
      box-shadow: 0 8px 24px rgba(96, 165, 250, 0.3);
    }

    .achievement-item[data-achievement="favorites"] {
      border-color: #f5d0fe;
    }

    .achievement-item[data-achievement="favorites"]:hover {
      border-color: #d946ef;
      box-shadow: 0 8px 24px rgba(217, 70, 239, 0.3);
    }

    .achievement-item[data-achievement="challenges"] {
      border-color: #bbf7d0;
    }

    .achievement-item[data-achievement="challenges"]:hover {
      border-color: #4ade80;
      box-shadow: 0 8px 24px rgba(74, 222, 128, 0.3);
    }

    .achievement-icon-container {
      width: 56px;
      height: 56px;
      border-radius: 14px;
      background: white;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: var(--space-lg);
      position: relative;
      z-index: 1;
      box-shadow: var(--shadow-sm);
      border: 2px solid var(--border);
    }

    .achievement-item.completed .achievement-icon-container {
      animation: achievementPulse 2s ease-in-out infinite;
      border-color: var(--accent);
    }

    @keyframes achievementPulse {
      0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7); 
      }
      50% { 
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(6, 182, 212, 0); 
      }
    }

    .achievement-icon {
      font-size: 1.75rem;
    }

    .achievement-item[data-achievement="streak"] .achievement-icon {
      color: #ef4444;
    }

    .achievement-item[data-achievement="quotes"] .achievement-icon {
      color: #3b82f6;
    }

    .achievement-item[data-achievement="favorites"] .achievement-icon {
      color: #d946ef;
    }

    .achievement-item[data-achievement="challenges"] .achievement-icon {
      color: #22c55e;
    }

    .achievement-info {
      position: relative;
      z-index: 1;
    }

    .achievement-name {
      font-family: var(--font-display);
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--text-dark);
      margin-bottom: var(--space-sm);
    }

    .achievement-description {
      font-size: 0.875rem;
      color: var(--text-muted);
      margin-bottom: var(--space-lg);
      line-height: 1.5;
    }

    .achievement-progress-container {
      margin-bottom: var(--space-sm);
    }

    .achievement-progress-text {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: var(--space-sm);
      font-size: 0.8125rem;
      color: var(--text-muted);
      font-weight: 600;
    }

    .achievement-progress-bar {
      height: 10px;
      background: rgba(0, 0, 0, 0.08);
      border-radius: 10px;
      overflow: hidden;
      position: relative;
    }

    .achievement-progress-fill {
      height: 100%;
      border-radius: 10px;
      transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
    }

    .achievement-item[data-achievement="streak"] .achievement-progress-fill {
      background: linear-gradient(90deg, #f87171 0%, #ef4444 100%);
    }

    .achievement-item[data-achievement="quotes"] .achievement-progress-fill {
      background: linear-gradient(90deg, #60a5fa 0%, #3b82f6 100%);
    }

    .achievement-item[data-achievement="favorites"] .achievement-progress-fill {
      background: linear-gradient(90deg, #e879f9 0%, #d946ef 100%);
    }

    .achievement-item[data-achievement="challenges"] .achievement-progress-fill {
      background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
    }

    .achievement-progress-fill::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
      animation: shimmer 2s infinite;
    }

    .achievement-completed-badge {
      display: inline-flex;
      align-items: center;
      gap: var(--space-xs);
      padding: var(--space-xs) var(--space-md);
      background: rgba(16, 185, 129, 0.15);
      color: #059669;
      border-radius: 20px;
      font-size: 0.75rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-top: var(--space-sm);
    }

    .achievement-stats {
      padding-top: var(--space-xl);
      border-top: 2px solid var(--border);
      display: flex;
      justify-content: center;
      gap: var(--space-3xl);
    }

    .achievement-stat {
      text-align: center;
    }

    .achievement-stat-value {
      font-family: var(--font-display);
      font-size: 2.5rem;
      font-weight: 900;
      background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
      display: block;
      margin-bottom: var(--space-xs);
    }

    .achievement-stat-label {
      color: var(--text-muted);
      font-size: 0.875rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    /* =================== QUICK QUOTE LIBRARY (RIGHT COLUMN) =================== */    /* =================== QUICK QUOTE LIBRARY (RIGHT COLUMN) =================== */
    .quick-library-card {
      background: white;
      border-radius: 20px;
      padding: var(--space-xl);
      box-shadow: var(--shadow-md);
      transition: var(--transition);
      animation: fadeInUp 0.6s ease-out 0.4s both;
    }

    .quick-library-card:hover {
      box-shadow: var(--shadow-lg);
    }

    .library-header {
      margin-bottom: var(--space-lg);
    }

    .library-title {
      font-family: var(--font-display);
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--text-dark);
      margin-bottom: var(--space-sm);
    }

    .library-subtitle {
      font-size: 0.875rem;
      color: var(--text-muted);
    }

    .library-collections {
      display: flex;
      flex-direction: column;
      gap: var(--space-md);
    }

    .collection-item {
      padding: var(--space-lg);
      background: var(--bg-light);
      border: 2px solid transparent;
      border-radius: 14px;
      cursor: pointer;
      transition: var(--transition);
      position: relative;
      overflow: hidden;
    }

    .collection-item::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 4px;
      height: 100%;
      background: linear-gradient(180deg, var(--primary), var(--accent));
      transform: scaleY(0);
      transition: var(--transition);
    }

    .collection-item:hover {
      background: white;
      border-color: var(--accent);
      transform: translateX(4px);
      box-shadow: var(--shadow-sm);
    }

    .collection-item:hover::before {
      transform: scaleY(1);
    }

    .collection-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: var(--space-sm);
    }

    .collection-title-row {
      display: flex;
      align-items: center;
      gap: var(--space-md);
    }

    .collection-icon {
      font-size: 1.5rem;
      filter: grayscale(0.3);
      transition: var(--transition);
    }

    .collection-item:hover .collection-icon {
      filter: grayscale(0);
      transform: scale(1.15);
    }

    .collection-name {
      font-size: 1rem;
      font-weight: 600;
      color: var(--text-dark);
    }

    .collection-count {
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--text-muted);
      background: rgba(3, 105, 161, 0.1);
      padding: 0.25rem 0.5rem;
      border-radius: 12px;
    }

    .collection-preview {
      font-size: 0.875rem;
      color: var(--text-muted);
      line-height: 1.5;
      font-style: italic;
      max-height: 0;
      opacity: 0;
      overflow: hidden;
      transition: var(--transition);
    }

    .collection-item:hover .collection-preview {
      max-height: 60px;
      opacity: 1;
      margin-top: var(--space-sm);
    }

    .library-divider {
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--border), transparent);
      margin: var(--space-lg) 0;
    }

    .create-collection-btn {
      width: 100%;
      padding: var(--space-lg);
      background: linear-gradient(135deg, rgba(3, 105, 161, 0.05), rgba(14, 165, 233, 0.05));
      border: 2px dashed var(--accent);
      border-radius: 14px;
      color: var(--primary);
      font-family: var(--font-body);
      font-size: 0.9375rem;
      font-weight: 600;
      cursor: pointer;
      transition: var(--transition);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: var(--space-sm);
    }

    .create-collection-btn:hover {
      background: linear-gradient(135deg, rgba(3, 105, 161, 0.1), rgba(14, 165, 233, 0.1));
      transform: translateY(-2px);
    }

    /* =================== QUOTE OF THE WEEK (FULL WIDTH ABOVE HISTORY) =================== */
    .quote-of-week-section {
      margin: var(--space-3xl) 0 var(--space-2xl) 0;
      animation: fadeInUp 0.8s ease-out 0.6s both;
    }

    .quote-of-week-container {
      background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
      border-radius: 24px;
      padding: 0;
      box-shadow: var(--shadow-xl);
      position: relative;
      overflow: hidden;
    }

    .quote-of-week-container::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
      pointer-events: none;
    }

    .quote-of-week-badge {
      position: absolute;
      top: var(--space-xl);
      left: var(--space-xl);
      background: rgba(251, 191, 36, 1);
      color: white;
      padding: var(--space-sm) var(--space-lg);
      border-radius: 20px;
      font-family: var(--font-body);
      font-size: 0.75rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
      display: flex;
      align-items: center;
      gap: var(--space-xs);
      box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
      z-index: 2;
      animation: pulse 2s ease-in-out infinite;
    }

    .week-content {
      display: grid;
      grid-template-columns: 400px 1fr;
      gap: 0;
      position: relative;
      z-index: 1;
    }

    .week-image-container {
      position: relative;
      height: 100%;
      min-height: 350px;
    }

    .week-image {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .week-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(to right, transparent 0%, rgba(124, 58, 237, 0.3) 100%);
    }

    .week-info {
      padding: var(--space-3xl);
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: var(--space-xl);
    }

    .week-header {
      display: flex;
      align-items: center;
      gap: var(--space-md);
      margin-bottom: var(--space-md);
    }

    .week-icon {
      width: 56px;
      height: 56px;
      background: rgba(255, 255, 255, 0.2);
      backdrop-filter: blur(10px);
      border-radius: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.75rem;
    }

    .week-title {
      font-family: var(--font-display);
      font-size: 1.5rem;
      font-weight: 900;
      color: white;
      line-height: 1.2;
    }

    .week-quote-text {
      font-family: var(--font-quote);
      font-size: 1.75rem;
      font-weight: 600;
      color: white;
      line-height: 1.5;
      margin-bottom: var(--space-lg);
      position: relative;
      padding-left: var(--space-lg);
    }

    .week-quote-text::before {
      content: '"';
      position: absolute;
      left: 0;
      top: -10px;
      font-size: 4rem;
      color: rgba(255, 255, 255, 0.3);
      font-family: var(--font-display);
      line-height: 1;
    }

    .week-author {
      font-size: 1.125rem;
      font-weight: 600;
      color: rgba(255, 255, 255, 0.9);
      margin-bottom: var(--space-xl);
    }

    .week-stats {
      display: flex;
      gap: var(--space-2xl);
      margin-bottom: var(--space-xl);
    }

    .week-stat {
      display: flex;
      align-items: center;
      gap: var(--space-sm);
      color: rgba(255, 255, 255, 0.9);
      font-size: 0.9375rem;
      font-weight: 600;
    }

    .week-stat i {
      font-size: 1.125rem;
      color: rgba(255, 255, 255, 0.7);
    }

    .week-trending-badge {
      display: inline-flex;
      align-items: center;
      gap: var(--space-sm);
      padding: var(--space-sm) var(--space-lg);
      background: rgba(236, 72, 153, 0.3);
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 20px;
      color: white;
      font-size: 0.875rem;
      font-weight: 600;
      margin-bottom: var(--space-xl);
    }

    .week-trending-badge i {
      animation: pulse 1.5s ease-in-out infinite;
    }

    .week-action-btn {
      align-self: flex-start;
      padding: var(--space-lg) var(--space-2xl);
      background: white;
      color: var(--primary);
      border: none;
      border-radius: 14px;
      font-family: var(--font-body);
      font-size: 1rem;
      font-weight: 700;
      cursor: pointer;
      transition: var(--transition);
      display: flex;
      align-items: center;
      gap: var(--space-md);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    }

    .week-action-btn:hover {
      transform: translateY(-3px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    }

    /* =================== HISTORY & FAVORITES SECTION =================== */
    .history-section {
      margin-top: var(--space-3xl);
      animation: fadeInUp 0.8s ease-out 0.4s both;
    }

    .section-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: var(--space-xl);
    }

    .section-title {
      font-family: var(--font-display);
      font-size: 1.75rem;
      font-weight: 700;
      color: var(--text-dark);
    }

    .view-toggle {
      display: flex;
      gap: var(--space-sm);
      background: white;
      padding: var(--space-xs);
      border-radius: 12px;
      box-shadow: var(--shadow-sm);
    }

    .view-btn {
      padding: var(--space-sm) var(--space-lg);
      border: none;
      background: transparent;
      border-radius: 8px;
      cursor: pointer;
      font-family: var(--font-body);
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--text-muted);
      transition: var(--transition);
    }

    .view-btn:hover {
      background: var(--bg-light);
      color: var(--text-dark);
    }

    .view-btn.active {
      background: var(--primary);
      color: white;
    }

    .history-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: var(--space-lg);
    }

    .history-card {
      background: white;
      border-radius: 16px;
      overflow: hidden;
      box-shadow: var(--shadow-md);
      transition: var(--transition);
      cursor: pointer;
      position: relative;
    }

    .history-card:hover {
      transform: translateY(-4px) scale(1.02);
      box-shadow: var(--shadow-lg);
    }
    
    /* Hover overlay for better button visibility */
    .history-card::before {
      content: '';
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0);
      transition: var(--transition);
      pointer-events: none;
      z-index: 1;
    }
    
    .history-card:hover::before {
      background: rgba(0, 0, 0, 0.08);
    }
    
    /* Favorite cards without content section should have rounded bottom */
    .favorite-overlay-mode .history-card-image {
      border-radius: 16px;
    }
    
    /* Card mode favorites keep normal layout */
    .favorite-card-mode .history-card-image {
      border-radius: 16px 16px 0 0;
    }
    
    /* Action buttons container for history cards */
    .history-card-actions {
      position: absolute;
      bottom: 12px;
      left: 0;
      right: 0;
      display: flex;
      justify-content: flex-end; /* Right-align by default (Past 6 Days) */
      padding: 0 12px;
      opacity: 0;
      transform: translateY(10px);
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      pointer-events: none;
      z-index: 2;
      gap: 8px; /* Space between buttons when both exist */
    }
    
    /* For favorites with both buttons, use space-between */
    .history-card-actions.has-delete {
      justify-content: space-between;
    }
    
    .history-card:hover .history-card-actions {
      opacity: 1;
      transform: translateY(0);
      pointer-events: all;
    }
    
    /* Individual action buttons */
    .history-action-btn {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: none;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(8px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
    }
    
    .history-action-btn:hover {
      transform: scale(1.1);
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }
    
    .history-action-btn:active {
      transform: scale(0.95);
    }
    
    /* Eye button (load quote) - bottom right */
    .history-action-btn.load-btn {
      background: rgba(3, 105, 161, 0.95);
    }
    
    .history-action-btn.load-btn i {
      color: white;
      font-size: 1rem;
    }
    
    .history-action-btn.load-btn:hover {
      background: var(--primary-dark);
    }
    
    /* Delete button (favorites only) - bottom left */
    .history-action-btn.delete-btn {
      background: rgba(239, 68, 68, 0.95);
    }
    
    .history-action-btn.delete-btn i {
      color: white;
      font-size: 1rem;
    }
    
    .history-action-btn.delete-btn:hover {
      background: #dc2626;
    }
    
    /* Tooltip styling - Compact size */
    .history-action-btn::after {
      content: attr(aria-label);
      position: absolute;
      bottom: calc(100% + 10px);
      left: 50%;
      transform: translateX(-50%) translateY(-5px);
      background: var(--secondary);
      color: white;
      padding: 4px 8px; /* Reduced from 8px 14px */
      border-radius: 6px; /* Reduced from 8px */
      font-size: 0.65rem; /* Reduced from 0.75rem */
      font-weight: 600;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
      z-index: 100;
    }
    
    .history-action-btn::before {
      content: '';
      position: absolute;
      bottom: calc(100% + 4px);
      left: 50%;
      transform: translateX(-50%);
      border: 5px solid transparent; /* Reduced from 7px */
      border-top-color: var(--secondary);
      opacity: 0;
      pointer-events: none;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      z-index: 100;
    }
    
    .history-action-btn:hover::after {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
    
    .history-action-btn:hover::before {
      opacity: 1;
    }
    
    /* Ensure parent container doesn't hide tooltips */
    .history-card {
      position: relative;
      overflow: visible; /* Changed from hidden to visible for tooltips */
    }
    
    .history-card-image {
      position: relative;
      overflow: hidden; /* Keep image overflow hidden */
      border-radius: 16px 16px 0 0;
    }

    .history-card-image {
      width: 100%;
      height: 200px;
      object-fit: cover;
      position: relative;
      overflow: hidden;
      border-radius: 16px 16px 0 0;
    }
    
    .history-card-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    
    /* Overlay mode favorites: Portrait card with taller height */
    .favorite-overlay-mode {
      aspect-ratio: 3/4; /* Portrait aspect ratio */
    }
    
    .favorite-overlay-mode .history-card-image {
      height: 100%; /* Fill the portrait container */
      border-radius: 16px; /* All corners rounded */
    }
    
    /* Card mode favorites: Standard landscape card */
    .favorite-card-mode .history-card-image {
      height: 200px;
      border-radius: 16px 16px 0 0; /* Top corners rounded */
    }
    
    /* Card mode: Content section with compact padding */
    .favorite-card-mode .history-card-content {
      padding: 0.75rem 1rem; /* Reduced padding to minimize blank space */
    }
    
    /* Permanent quote overlay on favorites (always visible) */
    .favorite-quote-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.75));
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      padding: 1.25rem;
      z-index: 1;
    }
    
    .favorite-quote-text {
      font-family: var(--font-quote);
      font-size: 1rem; /* Increased from 0.85rem */
      font-weight: 600;
      color: white;
      text-align: center;
      line-height: 1.5;
      margin-bottom: 0.75rem;
      text-shadow: 0 2px 8px rgba(0,0,0,0.5);
      max-width: 100%;
    }
    
    .favorite-quote-author {
      font-family: var(--font-body);
      font-size: 0.875rem; /* Increased from 0.75rem */
      font-weight: 600;
      color: rgba(255, 255, 255, 0.95);
      text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    }

    .favorite-badge {
      position: absolute;
      top: var(--space-md);
      right: var(--space-md);
      width: 36px;
      height: 36px;
      background: rgba(255, 255, 255, 0.95);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: var(--shadow-sm);
    }

    .favorite-badge i {
      color: #dc2626;
      font-size: 1rem;
    }

    .history-card-content {
      padding: var(--space-lg);
    }

    .history-card-date {
      font-family: var(--font-mono);
      font-size: 0.75rem;
      color: var(--text-muted);
      margin-bottom: var(--space-sm);
    }

    .history-card-quote {
      font-family: var(--font-quote);
      font-size: 1rem;
      font-weight: 600;
      color: var(--text-dark);
      line-height: 1.5;
      margin-bottom: var(--space-sm);
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .history-card-author {
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--primary);
    }
    
    /* Mode badge (overlay/card indicator) */
    .history-mode-badge {
      position: absolute;
      top: 12px;
      left: 12px;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(8px);
      padding: 6px 10px;
      border-radius: 20px;
      font-size: 0.75rem;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 4px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      z-index: 2;
      transition: var(--transition);
    }
    
    .history-mode-badge i {
      font-size: 0.875rem;
    }
    
    .history-mode-badge.mode-overlay {
      color: var(--primary);
      border: 1px solid rgba(3, 105, 161, 0.3);
    }
    
    .history-mode-badge.mode-card {
      color: var(--accent);
      border: 1px solid rgba(14, 165, 233, 0.3);
    }
    
    /* "New" badge */
    .history-new-badge {
      position: absolute;
      top: 12px;
      right: 12px;
      background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
      color: white;
      padding: 6px 12px;
      border-radius: 20px;
      font-size: 0.7rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
      z-index: 2;
      animation: newBadgePulse 2s ease-in-out infinite;
    }
    
    @keyframes newBadgePulse {
      0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
      }
      50% {
        transform: scale(1.05);
        box-shadow: 0 4px 16px rgba(245, 158, 11, 0.6);
      }
    }
    
    /* Sort toggle buttons */
    .favorites-sort-toggle {
      display: flex;
      gap: var(--space-sm);
      margin-bottom: var(--space-lg);
      justify-content: center;
      flex-wrap: wrap;
    }
    
    .sort-btn {
      padding: var(--space-sm) var(--space-lg);
      border: 2px solid transparent;
      background: white;
      border-radius: 10px;
      cursor: pointer;
      font-family: var(--font-body);
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--text-muted);
      transition: var(--transition);
      box-shadow: var(--shadow-sm);
      display: flex;
      align-items: center;
      gap: var(--space-sm);
    }
    
    .sort-btn i {
      font-size: 0.875rem;
      transition: var(--transition);
    }
    
    .sort-btn:hover {
      transform: translateY(-2px);
      box-shadow: var(--shadow-md);
      border-color: var(--primary);
      color: var(--text-dark);
    }
    
    .sort-btn.active {
      background: linear-gradient(135deg, rgba(3, 105, 161, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
      border-color: var(--primary);
      color: var(--primary);
      box-shadow: var(--shadow-md);
    }
    
    .sort-btn.active i {
      color: var(--primary);
    }
    
    /* Clear All Favorites button */
    .clear-favorites-btn {
      display: block;
      margin: var(--space-xl) auto 0;
      padding: var(--space-md) var(--space-xl);
      background: transparent;
      border: 2px solid #ef4444;
      border-radius: 12px;
      color: #ef4444;
      font-family: var(--font-body);
      font-size: 0.875rem;
      font-weight: 600;
      cursor: pointer;
      transition: var(--transition);
      display: flex;
      align-items: center;
      gap: var(--space-sm);
      justify-content: center;
    }
    
    .clear-favorites-btn:hover {
      background: #ef4444;
      color: white;
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }
    
    .clear-favorites-btn i {
      font-size: 1rem;
    }
    
    /* Empty state styling updates */
    .empty-state {
      grid-column: 1 / -1;
      text-align: center;
      padding: var(--space-3xl);
      color: var(--text-muted);
    }
    
    .empty-state i {
      font-size: 3rem;
      color: var(--primary);
      opacity: 0.5;
      margin-bottom: var(--space-lg);
    }
    
    .empty-state p {
      font-size: 1rem;
      font-weight: 500;
    }

    /* =================== MODAL =================== */
    
    /* Loading animation for quote switching */
    .history-action-btn.loading {
      pointer-events: none;
    }
    
    .history-action-btn.loading i {
      animation: buttonSpin 0.6s ease-in-out;
    }
    
    @keyframes buttonSpin {
      0% {
        transform: rotate(0deg) scale(1);
      }
      50% {
        transform: rotate(180deg) scale(1.2);
      }
      100% {
        transform: rotate(360deg) scale(1);
      }
    }
    
    /* Quote display transition animation */
    .quote-display-container.transitioning {
      animation: quoteTransition 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    @keyframes quoteTransition {
      0% {
        opacity: 1;
        transform: scale(1);
      }
      50% {
        opacity: 0.3;
        transform: scale(0.98);
      }
      100% {
        opacity: 1;
        transform: scale(1);
      }
    }
    
    .modal {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.85);
      backdrop-filter: blur(8px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      opacity: 0;
      visibility: hidden;
      transition: var(--transition);
      padding: var(--space-xl);
    }

    .modal.active {
      opacity: 1;
      visibility: visible;
    }

    .modal-content {
      background: white;
      border-radius: 24px;
      max-width: 800px;
      width: 100%;
      max-height: 90vh;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      box-shadow: var(--shadow-xl);
      transform: scale(0.95);
      transition: var(--transition);
    }

    .modal.active .modal-content {
      transform: scale(1);
    }

    .modal-image-container {
      position: relative;
      width: 100%;
      height: 400px;
      overflow: hidden;
    }

    .modal-image {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .modal-close {
      position: absolute;
      top: var(--space-lg);
      right: var(--space-lg);
      width: 48px;
      height: 48px;
      background: rgba(255, 255, 255, 0.95);
      border: none;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: var(--transition);
      box-shadow: var(--shadow-md);
    }

    .modal-close:hover {
      background: white;
      transform: rotate(90deg);
    }

    .modal-close i {
      font-size: 1.25rem;
      color: var(--text-dark);
    }

    .modal-body {
      padding: var(--space-2xl);
      overflow-y: auto;
    }

    .modal-quote-text {
      font-family: var(--font-quote);
      font-size: 1.75rem;
      font-weight: 600;
      color: var(--text-dark);
      line-height: 1.5;
      margin-bottom: var(--space-lg);
    }

    .modal-quote-author {
      font-size: 1.125rem;
      font-weight: 600;
      color: var(--primary);
    }

    /* =================== TOAST =================== */
     .toast-container {
      position: fixed;
      top: var(--space-xl);
      right: var(--space-xl);
      z-index: 10000;
      display: flex;
      flex-direction: column;
      gap: var(--space-sm);
      max-width: 400px;
      pointer-events: none;
    }
 .toast {
      background: white;
      padding: 14px 20px;
      border-radius: 12px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
      display: flex;
      align-items: center;
      gap: 12px;
      opacity: 0;
      transform: translateX(400px);
      transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      font-size: 0.95rem;
      border-left: 4px solid var(--primary);
      pointer-events: auto;
      position: relative;
      min-width: 280px;
    }

    .toast.success {
      border-left-color: #10b981;
    }

    .toast.error {
      border-left-color: #ef4444;
    }

    .toast i {
      font-size: 1.25rem;
      color: #10b981;
    }

    .toast.error i {
      color: #ef4444;
    }

    @keyframes slideInRight {
      from {
        transform: translateX(400px);
        opacity: 0;
      }
      to {
        transform: translateX(0);
        opacity: 1;
      }
    }

    /* =================== ANIMATIONS =================== */
    @keyframes fadeInDown {
      from {
        opacity: 0;
        transform: translateY(-30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes bounceIn {
      0% { transform: scale(0.5); }
      50% { transform: scale(1.1); }
      100% { transform: scale(1); }
    }

    /* =================== RESPONSIVE =================== */
    @media (max-width: 968px) {
      .main-content {
        grid-template-columns: 1fr;
      }

      .history-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      }

      .main-title {
        font-size: 2rem;
      }

    }

    @media (max-width: 640px) {
        
    .did-you-know-actions {
    flex-direction: column;
    }
  
  .autoplay-btn {
    width: 100%;
  }
  
  .did-you-know-fact {
    font-size: 0.9rem;
    padding: 0.75rem 0.875rem;
  } 
        
      .app-container {
        padding: var(--space-md);
      }

      .mood-filters {
        gap: var(--space-sm);
      }

      .mood-btn {
        width: 80px;
        height: 80px;
      }

      .mood-icon {
        font-size: 1.5rem;
      }

      .main-title {
        font-size: 1.75rem;
      }

      .history-grid {
        grid-template-columns: 1fr;
      }

      .share-buttons {
        grid-template-columns: 1fr;
      }
    }


    /* =================== QUIZ MODAL =================== */
    .quiz-trigger-card {
      background: white;
      border-radius: 20px;
      box-shadow: var(--shadow-md);
      overflow: hidden;
      transition: var(--transition);
      animation: fadeInUp 0.6s ease-out 0.35s both;
    }

    .quiz-trigger-card:hover {
      box-shadow: var(--shadow-lg);
      transform: translateY(-2px);
    }

    .quiz-trigger-header {
      display: flex;
      align-items: center;
      gap: var(--space-md);
      padding: var(--space-xl) var(--space-xl) var(--space-lg);
    }

    .quiz-trigger-icon {
      width: 44px;
      height: 44px;
      border-radius: 12px;
      background: linear-gradient(135deg, #8b5cf6, #a78bfa);
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 1.25rem;
    }

    .quiz-trigger-text h3 {
      font-family: var(--font-display);
      font-size: 1.125rem;
      font-weight: 700;
      color: var(--text-dark);
      line-height: 1.3;
    }

    .quiz-trigger-text span {
      font-size: 0.8125rem;
      color: var(--text-muted);
    }

    .quiz-trigger-body {
      padding: 0 var(--space-xl) var(--space-xl);
    }

    .quiz-trigger-preview {
      display: flex;
      gap: var(--space-sm);
      margin-bottom: var(--space-lg);
    }

    .quiz-type-chip {
      padding: 0.375rem 0.75rem;
      border-radius: 20px;
      font-size: 0.75rem;
      font-weight: 600;
      background: #ede9fe;
      color: #7c3aed;
    }

    .quiz-start-btn {
      width: 100%;
      padding: var(--space-md) var(--space-lg);
      background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
      color: white;
      border: none;
      border-radius: 14px;
      font-family: var(--font-body);
      font-size: 1rem;
      font-weight: 700;
      cursor: pointer;
      transition: var(--transition);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: var(--space-sm);
      box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
    }

    .quiz-start-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
    }

    /* ── Quiz Modal Overlay ── */
    .quiz-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.7);
      backdrop-filter: blur(6px);
      z-index: 2000;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: var(--space-xl);
      opacity: 0;
      visibility: hidden;
      transition: var(--transition);
    }

    .quiz-modal-overlay.open {
      opacity: 1;
      visibility: visible;
    }

    .quiz-modal {
      background: white;
      border-radius: 28px;
      width: 100%;
      max-width: 540px;
      box-shadow: var(--shadow-xl);
      overflow: hidden;
      transform: scale(0.94) translateY(20px);
      transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .quiz-modal-overlay.open .quiz-modal {
      transform: scale(1) translateY(0);
    }

    /* Quiz Progress Bar */
    .quiz-progress-strip {
      height: 5px;
      background: #ede9fe;
    }

    .quiz-progress-strip-fill {
      height: 100%;
      background: linear-gradient(90deg, #7c3aed, #a855f7);
      transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .quiz-modal-body {
      padding: var(--space-2xl);
    }

    .quiz-step-label {
      font-size: 0.8125rem;
      font-weight: 700;
      color: #8b5cf6;
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: var(--space-sm);
    }

    .quiz-question {
      font-family: var(--font-display);
      font-size: 1.375rem;
      font-weight: 700;
      color: var(--text-dark);
      line-height: 1.4;
      margin-bottom: var(--space-xl);
    }

    .quiz-options {
      display: flex;
      flex-direction: column;
      gap: var(--space-md);
    }

    .quiz-option {
      display: flex;
      align-items: center;
      gap: var(--space-md);
      padding: var(--space-lg);
      border: 2px solid var(--border);
      border-radius: 14px;
      background: var(--bg-light);
      cursor: pointer;
      transition: var(--transition);
    }

    .quiz-option:hover {
      border-color: #c4b5fd;
      background: #f5f3ff;
      transform: translateX(4px);
    }

    .quiz-option.selected {
      border-color: #7c3aed;
      background: #ede9fe;
      transform: translateX(4px);
      box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
    }

    .quiz-option.selected .quiz-option-emoji {
      transform: scale(1.2);
    }

    .quiz-option-emoji {
      font-size: 1.625rem;
      flex-shrink: 0;
      width: 40px;
      text-align: center;
    }

    .quiz-option-text {
      flex: 1;
    }

    .quiz-option-text strong {
      display: block;
      font-size: 0.9375rem;
      font-weight: 600;
      color: var(--text-dark);
      margin-bottom: 0.125rem;
    }

    .quiz-option-text span {
      font-size: 0.8125rem;
      color: var(--text-muted);
    }

    /* ── Result Screen ── */
    .quiz-result {
      text-align: center;
    }

    .quiz-result-icon {
      width: 96px;
      height: 96px;
      border-radius: 50%;
      background: linear-gradient(135deg, #7c3aed, #a855f7);
      margin: 0 auto var(--space-xl);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2.75rem;
      box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
      animation: resultPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    @keyframes resultPop {
      0% { transform: scale(0); opacity: 0; }
      100% { transform: scale(1); opacity: 1; }
    }

    .quiz-result-type {
      font-family: var(--font-display);
      font-size: 1.75rem;
      font-weight: 900;
      color: var(--text-dark);
      margin-bottom: var(--space-sm);
    }

    .quiz-result-desc {
      font-size: 0.9375rem;
      color: var(--text-muted);
      line-height: 1.6;
      margin-bottom: var(--space-xl);
      max-width: 380px;
      margin-left: auto;
      margin-right: auto;
    }

    .quiz-result-traits {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: var(--space-sm);
      margin-bottom: var(--space-xl);
    }

    .quiz-trait {
      padding: 0.375rem 0.875rem;
      background: #ede9fe;
      color: #7c3aed;
      border-radius: 20px;
      font-size: 0.8125rem;
      font-weight: 600;
    }

    .quiz-result-quote-label {
      font-size: 0.8125rem;
      font-weight: 700;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.75px;
      margin-bottom: var(--space-md);
    }

    .quiz-result-quote-box {
      background: linear-gradient(135deg, #f5f3ff, #ede9fe);
      border-radius: 16px;
      padding: var(--space-lg) var(--space-xl);
      margin-bottom: var(--space-xl);
      border-left: 4px solid #7c3aed;
    }

    .quiz-result-quote-box p {
      font-family: var(--font-quote);
      font-size: 1.125rem;
      font-weight: 600;
      color: var(--text-dark);
      line-height: 1.55;
    }

    .quiz-result-quote-box .quiz-result-author {
      font-family: var(--font-body);
      font-size: 0.875rem;
      color: #7c3aed;
      font-weight: 600;
      margin-top: var(--space-sm);
    }

    .quiz-result-actions {
      display: flex;
      gap: var(--space-md);
    }

    .quiz-result-actions button {
      flex: 1;
      padding: var(--space-md);
      border-radius: 12px;
      font-family: var(--font-body);
      font-size: 0.9375rem;
      font-weight: 700;
      cursor: pointer;
      transition: var(--transition);
      border: none;
    }

    .quiz-btn-load {
      background: linear-gradient(135deg, #7c3aed, #a855f7);
      color: white;
      box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
    }

    .quiz-btn-load:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
    }

    .quiz-btn-retake {
      background: var(--bg-light);
      color: var(--text-dark);
      border: 2px solid var(--border);
    }

    .quiz-btn-retake:hover {
      border-color: var(--accent);
      background: white;
    }

    .quiz-close-btn {
      position: absolute;
      top: var(--space-lg);
      right: var(--space-lg);
      width: 36px;
      height: 36px;
      border-radius: 10px;
      border: none;
      background: var(--bg-light);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      transition: var(--transition);
      z-index: 10;
    }

    .quiz-close-btn:hover {
      background: #fee2e2;
      color: #dc2626;
    }
/* =================== QUOTE OF THE DAY BADGE =================== */
.qotd-badge-style {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  animation: qotdGlow 2s ease-in-out infinite;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
  padding: 0.35rem 0.65rem !important;
  font-size: 0.7rem !important;
  gap: 0.25rem !important;
}

.qotd-badge-style i {
  font-size: 0.75rem;
  animation: qotdSpin 3s linear infinite;
  margin-right: 4px;
}

@keyframes qotdGlow {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.6);
  }
}

@keyframes qotdSpin {
  0% { transform: rotate(0deg); }
  10% { transform: rotate(15deg); }
  20% { transform: rotate(0deg); }
  30% { transform: rotate(-15deg); }
  40% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

/* =================== PAST 6 DAYS CARD BADGE =================== */
.past-6-days-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(3, 105, 161, 0.4);
  z-index: 5;
}

.past-6-days-badge i {
  font-size: 0.75rem;
}

/* Adjust history card image positioning for badge */
.history-card-image {
  position: relative;
}
/* =================== OPTION A: MOOD SUGGESTION SYSTEM - NEW STYLES =================== */

:root {
  /* NEW: Mood Suggestion Colors */
  --suggestion-glow: rgba(251, 191, 36, 0.3);
  --suggestion-border: #fbbf24;
  --suggestion-bg: rgba(254, 243, 199, 0.5);
}

/* =================== MOOD SUGGESTION STYLES =================== */

/* Mood Filter Button - Suggested State */
.mood-btn.suggested {
  position: relative;
  transform: scale(1.05);
  border: 2px solid var(--suggestion-border) !important;
  background: var(--suggestion-bg) !important;
  box-shadow: 0 0 20px var(--suggestion-glow),
              0 4px 12px rgba(251, 191, 36, 0.2) !important;
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px var(--suggestion-glow),
                0 4px 12px rgba(251, 191, 36, 0.2);
  }
  50% {
    box-shadow: 0 0 30px var(--suggestion-glow),
                0 6px 16px rgba(251, 191, 36, 0.3);
  }
}

/* Suggestion Badge on Mood Button */
.mood-btn .suggestion-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
  z-index: 10;
  pointer-events: none;
  animation: badgeBounce 0.5s ease-out;
  white-space: nowrap;
}

@keyframes badgeBounce {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.mood-btn .suggestion-badge i {
  margin-right: 2px;
  font-size: 0.6rem;
}

/* Mood Insight Box - Enhanced when suggestion is active */
.mood-insight.has-suggestion {
  background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
  border: 2px solid #fbbf24;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.15);
}

.mood-insight.has-suggestion i {
  color: #f59e0b;
  animation: lightbulbGlow 1.5s ease-in-out infinite;
}

@keyframes lightbulbGlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Mood Suggestion Panel - Additional info when mood is selected */
.mood-suggestion-panel {
  background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
  border: 2px solid #fbbf24;
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.15);
  animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mood-suggestion-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #78350f;
  margin-bottom: 8px;
}

.mood-suggestion-panel-header i {
  color: #f59e0b;
}

.mood-suggestion-panel-text {
  color: #92400e;
  font-size: 0.9rem;
  line-height: 1.5;
}

.mood-suggestion-panel-filters {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.mood-suggestion-panel-filter {
  background: white;
  border: 2px solid #fbbf24;
  color: #78350f;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mood-suggestion-panel-filter:hover {
  background: #fef3c7;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(251, 191, 36, 0.2);
}

.mood-suggestion-panel-filter i {
  font-size: 0.8rem;
}

/* Override Indicator - Shows when user chooses different filter than suggested */
.override-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  color: #3730a3;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 12px;
  border-left: 3px solid #6366f1;
  animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.override-notice i {
  color: #6366f1;
}

/* Learning Indicator - Shows when system learns user preference */
.learning-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  margin-top: 8px;
  animation: slideInUp 0.4s ease-out;
}

.learning-indicator i {
  color: #3b82f6;
  animation: rotate360 2s linear infinite;
}

@keyframes rotate360 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Toast Notification Styles */
/* =================== FIXED: TOAST NOTIFICATION SYSTEM =================== */
/* Toast Container - Fixed positioning for stacking notifications */
.toast-container {
  position: fixed;
  top: var(--space-xl);
  right: var(--space-xl);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 400px;
  pointer-events: none;
}

/* Individual Toast Styles */
.toast {
  background: white;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
  border-left: 4px solid var(--primary);
  pointer-events: auto;
  position: relative;
  min-width: 280px;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.hide {
  opacity: 0;
  transform: translateX(400px) scale(0.9);
}

/* Toast Icon */
.toast i {
  font-size: 1.3rem;
  color: var(--primary);
  flex-shrink: 0;
}

/* Toast Content */
.toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toast-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.toast-message {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Close Button for Toasts */
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--transition);
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-dark);
}

/* Toast Type Styles */
.toast.toast-success {
  border-left-color: #10b981;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.toast.toast-success i {
  color: #10b981;
}

.toast.toast-mood-suggestion {
  background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
  color: #78350f;
  border-left: 4px solid #fbbf24;
}

.toast.toast-mood-suggestion i {
  color: #f59e0b;
}

.toast.toast-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
  border-left-color: #f59e0b;
}

.toast.toast-warning i {
  color: #f59e0b;
}
    
    /* =================== MOOD CHART WITH HISTORY COLORS =================== */
    .mood-chart {
      background: var(--bg-card);
      border-radius: 16px;
      padding: var(--space-xl);
      box-shadow: var(--shadow-md);
      border: 1px solid var(--border);
    }

    .mood-chart-title {
      display: flex;
      align-items: center;
      gap: var(--space-sm);
      font-size: 1.125rem;
      font-weight: 700;
      color: var(--text-dark);
      margin-bottom: var(--space-lg);
    }

    .mood-chart-title i {
      color: var(--primary);
      font-size: 1.25rem;
    }

    .chart-container {
      display: flex;
      align-items: flex-end;
      justify-content: space-around;
      gap: var(--space-sm);
      height: 180px;
      padding: var(--space-md) 0;
    }

    .chart-bar-wrapper {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: var(--space-sm);
      flex: 1;
      max-width: 80px;
    }

    /* IMPROVED: Mood Bar with Dynamic Colors */
.chart-bar {
  flex: 1;
  width: 100%;
  border-radius: 8px 8px 0 0;
  position: relative;
  /* REMOVED: min-height: 20%; - This was forcing equal heights */
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  /* Height will be set via inline style from JavaScript */
}

    /* Mood-specific colors - Applied via data attributes */
    .chart-bar[data-mood="amazing"] {
      background: linear-gradient(180deg, var(--mood-amazing) 0%, #059669 100%);
    }

    .chart-bar[data-mood="good"] {
      background: linear-gradient(180deg, var(--mood-good) 0%, #2563eb 100%);
    }

    .chart-bar[data-mood="okay"] {
      background: linear-gradient(180deg, var(--mood-okay) 0%, #ca8a04 100%);
    }

    .chart-bar[data-mood="bad"] {
      background: linear-gradient(180deg, var(--mood-bad) 0%, #ea580c 100%);
    }

    .chart-bar[data-mood="terrible"] {
      background: linear-gradient(180deg, var(--mood-terrible) 0%, #dc2626 100%);
    }

    .chart-bar[data-mood="none"],
    .chart-bar[data-mood=""] {
      background: var(--mood-empty);
      opacity: 0.5;
    }

    /* Hover effect */
    .chart-bar:hover {
      transform: translateY(-4px) scale(1.05);
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
      filter: brightness(1.1);
    }

    /* Current day indicator */
    .chart-bar.current-day {
      box-shadow: 0 0 0 1.5px rgba(3, 105, 161, 0.3),
                  0 4px 12px rgba(0, 0, 0, 0.15);
      position: relative;
    }

    .chart-bar.current-day::before {
      content: '';
      position: absolute;
      top: -8px;
      left: 50%;
      transform: translateX(-50%);
      width: 8px;
      height: 8px;
      background: var(--primary);
      border-radius: 50%;
      box-shadow: 0 0 10px var(--accent);
      animation: pulseIndicator 2s ease-in-out infinite;
    }

    @keyframes pulseIndicator {
      0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
      }
      50% {
        transform: translateX(-50%) scale(1.3);
        opacity: 0.7;
      }
    }

    /* Mood Emoji Indicator on Bar */
    .chart-bar-emoji {
      position: absolute;
      top: -30px;
      left: 50%;
      transform: translateX(-50%);
      font-size: 1.2rem;
      opacity: 0;
      transition: var(--transition);
      pointer-events: none;
    }

    .chart-bar:hover .chart-bar-emoji,
    .chart-bar[data-mood]:not([data-mood=""]):not([data-mood="none"]) .chart-bar-emoji {
      opacity: 1;
    }

    /* Day Labels */
    .chart-day-label {
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--text-muted);
      text-align: center;
      margin-top: var(--space-xs);
    }

    .chart-day-label.current {
      color: var(--primary);
      font-weight: 700;
    }
    
    /* Mood Legend */
    .mood-legend {
      display: flex;
      justify-content: center;
      gap: var(--space-lg);
      margin-top: var(--space-xl);
      padding-top: var(--space-lg);
      border-top: 1px solid var(--border);
      flex-wrap: wrap;
    }

    .legend-item {
      display: flex;
      align-items: center;
      gap: var(--space-xs);
      font-size: 0.85rem;
      color: var(--text-muted);
    }

    .legend-color {
      width: 16px;
      height: 16px;
      border-radius: 4px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .legend-color.amazing { background: var(--mood-amazing); }
    .legend-color.good { background: var(--mood-good); }
    .legend-color.okay { background: var(--mood-okay); }
    .legend-color.bad { background: var(--mood-bad); }
    .legend-color.terrible { background: var(--mood-terrible); }

    /* Tooltip for detailed info */
    .chart-tooltip {
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%) translateY(-8px);
      background: var(--secondary);
      color: white;
      padding: 10px 16px;
      border-radius: 8px;
      font-size: 0.85rem;
      font-weight: 600;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: var(--transition);
      z-index: 100;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .chart-tooltip::after {
      content: '';
      position: absolute;
      top: 100%;
      left: 50%;
      transform: translateX(-50%);
      border: 6px solid transparent;
      border-top-color: var(--secondary);
    }

    .chart-bar:hover .chart-tooltip {
      opacity: 1;
      transform: translateX(-50%) translateY(-12px);
    }
    
    /* Empty State Message */
    .mood-chart-empty {
      text-align: center;
      padding: var(--space-2xl);
      color: var(--text-muted);
      font-size: 0.95rem;
    }

    .mood-chart-empty i {
      font-size: 3rem;
      color: var(--border);
      margin-bottom: var(--space-md);
      display: block;
    }

/* Responsive adjustments for mood suggestions */
@media (max-width: 768px) {
  .mood-btn.suggested {
    transform: scale(1.03);
  }

  .mood-suggestion-panel {
    padding: 12px;
  }

  .mood-suggestion-panel-filters {
    gap: 6px;
  }

  .mood-suggestion-panel-filter {
    font-size: 0.8rem;
    padding: 4px 8px;
  }

     .toast-container {
        top: var(--space-md);
        right: var(--space-md);
        left: var(--space-md);
        max-width: none;
      }

      .toast {
        min-width: auto;
        width: 100%;
      }

      /* Chart adjustments */
      .chart-container {
        height: 140px;
        gap: var(--space-xs);
      }

      .chart-bar-wrapper {
        max-width: 60px;
      }

      .chart-day-label {
        font-size: 0.7rem;
      }

      .mood-legend {
        gap: var(--space-md);
      }

      .legend-item {
        font-size: 0.75rem;
      }
    }
}

/* Connection Indicator Line (visual connection between mood tracker and filter) */
.mood-connection-line {
  position: relative;
  margin: 20px 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--suggestion-border) 20%, 
    var(--suggestion-border) 80%, 
    transparent 100%);
  opacity: 0;
  animation: fadeInLine 0.6s ease-out 0.3s forwards;
}

@keyframes fadeInLine {
  to {
    opacity: 1;
  }
}

.mood-connection-line::before,
.mood-connection-line::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  background: var(--suggestion-border);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 8px var(--suggestion-glow);
}

.mood-connection-line::before {
  left: 20%;
  animation: pulse 2s ease-in-out infinite;
}

.mood-connection-line::after {
  right: 20%;
  animation: pulse 2s ease-in-out infinite 1s;
}

@keyframes pulse {
  0%, 100% {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-50%) scale(1.5);
    opacity: 0.5;
  }
}

/* =================== ENHANCEMENTS FROM VISUAL REFERENCE GUIDE =================== */
/* All 7 improvements CSS below */

/* IMPROVEMENT #2: Challenge Completion Animation */
.challenge-item.challenge-completing {
  animation: challengeComplete 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes challengeComplete {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.05);
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
  }
  50% {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
  }
  100% {
    transform: scale(1);
    background: transparent;
  }
}

.challenge-item.challenge-completing .challenge-checkbox {
  animation: checkboxGlow 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes checkboxGlow {
  0%, 100% {
    box-shadow: 0 0 0 rgba(16, 185, 129, 0);
  }
  50% {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    background: #10b981;
  }
}

/* IMPROVEMENT #3: Active Collection Highlighting */
.collection-item {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.collection-item.collection-active {
  border: 2px solid var(--primary) !important;
  background: linear-gradient(135deg, rgba(3, 105, 161, 0.05) 0%, rgba(2, 132, 199, 0.05) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(3, 105, 161, 0.15), 
              0 0 0 1px rgba(3, 105, 161, 0.1);
}

.collection-checkmark {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(3, 105, 161, 0.3);
  animation: checkmarkAppear 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

@keyframes checkmarkAppear {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* IMPROVEMENT #4: Milestone Toast Styles */
.milestone-toast {
  border-left: 4px solid #f59e0b !important;
  background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%) !important;
  font-weight: 600;
  animation: milestoneEnter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-achievement {
  border-left: 4px solid #10b981 !important;
  background: linear-gradient(135deg, #d1fae5 0%, #ffffff 100%) !important;
}

@keyframes milestoneEnter {
  0% {
    transform: translateX(400px) scale(0.8);
    opacity: 0;
  }
  60% {
    transform: translateX(-10px) scale(1.02);
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

/* IMPROVEMENT #5: Time-based suggestion toast */
.toast-clickable {
  cursor: pointer;
  transition: all 0.2s;
}

.toast-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

/* IMPROVEMENT #6: Achievement Tooltips */
.achievement-item {
  position: relative;
}

.achievement-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 280px;
  white-space: normal;
  text-align: center;
}

.achievement-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: var(--secondary);
}

.achievement-tooltip.show {
  opacity: 1;
  bottom: calc(100% + 15px);
}

.achievement-item:hover .achievement-tooltip {
  opacity: 1;
  bottom: calc(100% + 15px);
}

/* Mobile: Show tooltip on tap */
@media (max-width: 768px) {
  .achievement-tooltip {
    max-width: 240px;
    font-size: 0.8rem;
    padding: 10px 14px;
  }
}

/* Auto-complete indicator (subtle) */
.challenge-item[data-challenge="read"].auto-completed {
  animation: autoCompleteHighlight 2s ease-out;
}

@keyframes autoCompleteHighlight {
  0%, 100% {
    background: transparent;
  }
  10%, 30% {
    background: rgba(16, 185, 129, 0.1);
  }
}

/* Enhanced toast container for mobile */
@media (max-width: 768px) {
  .toast-container {
    top: var(--space-md);
    right: var(--space-md);
    left: var(--space-md);
    max-width: none;
  }
  
  .toast {
    min-width: auto;
    width: 100%;
  }
  
  .milestone-toast {
    font-size: 0.9rem;
  }
}

/* Collection hover effects enhancement */
.collection-item:not(.collection-active):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Smooth transitions for all collection items */
.collection-item * {
  transition: all 0.2s ease;
}

/* Progress bar animation enhancement */
.challenge-progress-fill,
.achievement-progress-fill {
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reward message enhancement */
.challenge-reward {
  animation: rewardBounce 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes rewardBounce {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Ensure proper stacking and visibility */
.collection-item {
  z-index: 1;
}

.collection-item.collection-active {
  z-index: 2;
}

/* Toast improvements for better visibility */
.toast-info {
  border-left: 4px solid #3b82f6;
  background: linear-gradient(135deg, #dbeafe 0%, #ffffff 100%);
}

.toast-success {
  border-left: 4px solid #10b981;
  background: linear-gradient(135deg, #d1fae5 0%, #ffffff 100%);
}