/* Habit Tracker Styles */
.habit-tracker-container {
  margin-bottom: 1.5rem;
  position: relative;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(252, 252, 252, 0.4) 100%);
  backdrop-filter: blur(20px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.03),
    0 1px 3px rgba(0, 0, 0, 0.02),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
}


/* Progress Sections Container */
.habit-progress-sections {
  margin: 1rem 0 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Today Section - Prominent & Gratifying */
.habit-progress-today {
  position: relative;
  padding: 1rem 1.2rem;
  background: 
    linear-gradient(135deg, 
      rgba(52, 211, 153, calc(0.08 + var(--progress-intensity, 0) * 0.14)) 0%, 
      rgba(16, 185, 129, calc(0.06 + var(--progress-intensity, 0) * 0.12)) 50%, 
      rgba(5, 150, 105, calc(0.05 + var(--progress-intensity, 0) * 0.08)) 100%);
  border-radius: 14px;
  border: 1.5px solid rgba(52, 211, 153, calc(0.25 + var(--progress-intensity, 0) * 0.35));
  box-shadow: 
    0 6px 20px rgba(16, 185, 129, calc(0.15 + var(--shadow-intensity, 0) * 0.25)),
    0 2px 8px rgba(5, 150, 105, calc(0.08 + var(--shadow-intensity, 0) * 0.15)),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.habit-progress-today.habit-progress-complete {
  background: 
    linear-gradient(135deg, rgba(52, 211, 153, 0.25) 0%, rgba(16, 185, 129, 0.20) 50%, rgba(5, 150, 105, 0.15) 100%);
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 
    0 4px 12px rgba(16, 185, 129, 0.15),
    0 2px 6px rgba(5, 150, 105, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  animation: completePulse 2s ease-in-out infinite;
}

@keyframes completePulse {
  0%, 100% {
    box-shadow: 
      0 4px 12px rgba(16, 185, 129, 0.15),
      0 2px 6px rgba(5, 150, 105, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }
  50% {
    box-shadow: 
      0 6px 16px rgba(16, 185, 129, 0.2),
      0 3px 8px rgba(5, 150, 105, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }
}

/* Confetti pieces - handled by JavaScript animation */
.habit-confetti-piece {
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

.habit-progress-today::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.habit-progress-today-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.habit-progress-today-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #047857;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.habit-progress-icon {
  flex-shrink: 0;
  opacity: 0.9;
}

.habit-progress-today-percentage {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #10b981, #059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1;
}

.habit-progress-today-bar-container {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  margin-bottom: 0.75rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.habit-progress-today-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
  border-radius: 8px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 
    0 0 15px rgba(16, 185, 129, 0.4),
    0 2px 6px rgba(5, 150, 105, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
}

.habit-progress-today-footer {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
  z-index: 1;
}

.habit-progress-today-message {
  font-size: 0.85rem;
  font-weight: 600;
  color: #065f46;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.habit-progress-today-summary {
  font-size: 0.7rem;
  color: #047857;
  line-height: 1.4;
  font-weight: 500;
  opacity: 0.9;
}

/* Overall Section - Different Style (Blue/Purple Theme) */
.habit-progress-overall {
  position: relative;
  padding: 1rem 1.2rem;
  background: 
    linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.06) 50%, rgba(168, 85, 247, 0.04) 100%);
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 
    0 4px 12px rgba(99, 102, 241, 0.1),
    0 1px 4px rgba(139, 92, 246, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.habit-progress-overall-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.1rem;
}

.habit-progress-overall-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.habit-progress-overall-percentage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.15rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 5px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.habit-progress-overall-main {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
}

.habit-progress-overall-bar-wrapper {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.habit-progress-overall-bar-container {
  width: 75px;
  height: 75px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-end;
  box-shadow: inset 0 3px 6px rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.habit-progress-overall-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  justify-content: center;
}

.habit-progress-overall-message {
  font-size: 0.73rem;
  font-weight: 500;
  color: #4b5563;
  line-height: 1.5;
}

.habit-progress-overall-summary {
  font-size: 0.69rem;
  color: #6b7280;
  line-height: 1.5;
  font-weight: 500;
}

.habit-progress-overall-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  border-radius: 0 0 10px 10px;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
  position: relative;
  overflow: hidden;
  min-height: 8px;
}

.habit-progress-overall-bar-fill::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 0;
  right: 0;
  height: 6px;
  background: 
    radial-gradient(ellipse 80% 50% at 0% 50%, rgba(255, 255, 255, 0.7) 0%, transparent 50%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(255, 255, 255, 0.7) 0%, transparent 50%),
    linear-gradient(90deg, 
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.6) 25%,
      rgba(255, 255, 255, 0.3) 50%,
      rgba(255, 255, 255, 0.6) 75%,
      rgba(255, 255, 255, 0.3) 100%);
  background-size: 60% 100%, 60% 100%, 200% 100%;
  background-position: 
    -30% 0,
    130% 0,
    0% 0;
  animation: waterWaves 3s ease-in-out infinite;
  border-radius: 10px 10px 0 0;
  filter: blur(0.5px);
}

.habit-progress-overall-bar-fill::after {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 30%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0.4) 70%,
    transparent 100%);
  background-size: 150% 100%;
  animation: waterShine 2.5s ease-in-out infinite;
  border-radius: 8px 8px 0 0;
}

@keyframes waterWaves {
  0% {
    background-position: 
      -30% 0,
      130% 0,
      0% 0;
  }
  50% {
    background-position: 
      30% 0,
      70% 0,
      100% 0;
  }
  100% {
    background-position: 
      -30% 0,
      130% 0,
      200% 0;
  }
}

@keyframes waterShine {
  0% {
    opacity: 0.4;
    background-position: -150% 0;
  }
  50% {
    opacity: 0.8;
    background-position: 50% 0;
  }
  100% {
    opacity: 0.4;
    background-position: 250% 0;
  }
}

.habit-progress-overall-summary {
  font-size: 0.7rem;
  color: #6b7280;
  line-height: 1.5;
  font-weight: 500;
  flex: 1;
  display: flex;
  align-items: center;
  padding-left: 0.2rem;
}

.habit-add-section {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: center;
}

.habit-add-btn {
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.habit-add-btn:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.habit-tracker-content {
  padding: 0;
}

.habit-week-view {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  font-size: 0.8rem;
}

.habit-dates-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
  padding: 0.1rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  align-items: flex-start;
  position: relative;
  border-radius: 4px;
}

.habit-date-label {
  width: 80px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.habit-month-today-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.habit-month-display {
  font-size: 0.7rem;
  font-weight: 500;
  color: #666;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  min-height: 32px;
  display: flex;
  align-items: center;
}


.habit-phase-display {
  font-size: 0.6rem;
  font-weight: 400;
  color: #28a745;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.habit-week-nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  justify-content: space-between;
}

.habit-dates-header::after {
  content: '';
  position: absolute;
  bottom: -0.25rem;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    rgba(0, 0, 0, 0.06) 0%, 
    rgba(0, 0, 0, 0.02) 50%, 
    transparent 100%);
  opacity: 0.5;
}

.habit-date-label {
  font-weight: 500;
  color: #666;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.habit-week-nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  justify-self: center;
}

.habit-dates-row {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  justify-content: space-around;
  min-width: 0;
}

.habit-nav-btn {
  background: none;
  border: none;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #888;
  font-size: 1rem;
  font-weight: 300;
  border-radius: 4px;
  margin: 0 0.1rem;
}

.habit-nav-btn:hover:not(:disabled) {
  color: #333;
  background: rgba(0, 0, 0, 0.04);
}

.habit-nav-btn:disabled {
  opacity: 0.15;
  cursor: not-allowed;
}

.habit-today-btn {
  background: rgba(46, 204, 113, 0.08);
  border: 1px solid rgba(46, 204, 113, 0.15);
  color: #27ae60;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  transition: all 0.15s ease;
  letter-spacing: 0.02em;
  font-feature-settings: 'kern' 1;
  white-space: nowrap;
}

.habit-today-btn:hover {
  background: rgba(46, 204, 113, 0.12);
  border-color: rgba(46, 204, 113, 0.2);
  color: #219a52;
}

.habit-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.1rem;
  height: 28px;
  width: 14px;
}


/* .habit-date.today - today highlighting is handled by .habit-date.today .habit-date-day */

.habit-date.today .habit-date-day {
  color: #28a745;
  font-weight: 700;
}

.habit-date.today .habit-date-weekday {
  color: #28a745;
  font-weight: 500;
}

.habit-date-day {
  font-weight: 500;
  color: #1a1a1a;
  font-size: 0.75rem;
  line-height: 1;
  margin-bottom: 0.15rem;
  font-feature-settings: 'tnum' 1;
  font-variant-numeric: tabular-nums;
}

.habit-date-weekday {
  font-weight: 450;
  color: #888;
  font-size: 0.6rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.habit-list {
  margin: 0.7rem 0 0 0;
  position: relative;
}

/* Phase Group Styles */
.habit-phase-group {
  margin-bottom: 1.5rem;
}

.habit-phase-group:last-child {
  margin-bottom: 0;
}

.habit-phase-header {
  font-size: 0.7rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: relative;
}

.habit-phase-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 40px;
  height: 1px;
  background: rgba(40, 167, 69, 0.4);
}

.habit-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  padding: 0.1rem 0;
  position: relative;
  border-radius: 4px;
}


.habit-name-container {
  width: 80px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: flex-start;
}

.habit-header {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
  position: relative;
  justify-content: space-between;
}

.habit-actions {
  display: flex;
  gap: 0.4rem;
  opacity: 1;
  position: relative;
}

.habit-name {
  font-size: 0.85rem;
  line-height: 1.3;
  color: #1a1a1a;
  font-weight: 400;
  margin-bottom: 0;
  letter-spacing: 0.005em;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  cursor: pointer;
  flex: 1;
}

.habit-progress-container {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex-shrink: 0;
  align-self: center;
  margin-right: 6px;
  min-width: 0;
}

.habit-progress-badge {
  font-size: 0.6rem;
  font-weight: 400;
  color: #888;
  white-space: nowrap;
  flex-shrink: 0;
}

.habit-progress-bar-container {
  width: 60px;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.habit-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #27ae60, #2ecc71);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.habit-edit-btn-minimal,
.habit-delete-btn-minimal {
  background: none;
  border: none;
  font-size: 0.65rem;
  cursor: pointer;
  padding: 0.15rem 0.3rem;
  border-radius: 3px;
  font-family: inherit;
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: all 0.15s ease;
}

.habit-edit-btn-minimal {
  color: #999;
}

.habit-edit-btn-minimal:hover {
  color: #666;
  background: rgba(0, 0, 0, 0.05);
}

.habit-delete-btn-minimal {
  color: #bbb;
}

.habit-delete-btn-minimal:hover {
  color: #dc3545;
  background: rgba(220, 53, 69, 0.05);
}


.habit-days-row {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 0.2rem;
  justify-content: space-around;
  margin: 0 calc(20px + 0.4rem);
  min-width: 0;
  padding-top: 0.1rem;
  position: relative;
}

/* Today column highlight - handled by JavaScript */

.habit-day-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.5rem;
  font-weight: 500;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  transition: opacity 0.15s ease;
  border: none;
}

.habit-day-btn.pending {
  background: var(--habit-pending, #e5e7eb);
  color: transparent;
}

.habit-day-btn.pending::after {
  display: none;
}

.habit-day-btn.pending:hover {
  opacity: 0.7;
}

.habit-day-btn.completed {
  background: var(--habit-completed, #6366f1) !important;
  color: white !important;
}

/* Ensure completed days are always indigo, even if they're past dates */
.habit-day-btn.completed.missed {
  background: var(--habit-completed, #6366f1) !important;
  color: white !important;
}

.habit-day-btn.completed::after {
  content: '✓';
  position: absolute;
  font-size: 10px;
  font-weight: 500;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.habit-day-btn.completed:hover {
  opacity: 0.8;
}

.habit-day-btn.habit-boundary {
  border: 2px solid var(--habit-boundary, #8b5cf6) !important;
}

.habit-day-btn.habit-start,
.habit-day-btn.habit-end {
  background: white !important;
  border: 2px solid var(--habit-boundary, #8b5cf6) !important;
}

.habit-day-btn.habit-start.completed,
.habit-day-btn.habit-end.completed {
  background: var(--habit-completed, #6366f1) !important;
  border: 2px solid var(--habit-boundary, #8b5cf6) !important;
  color: white !important;
}

.habit-day-btn.habit-start.completed::after,
.habit-day-btn.habit-end.completed::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 500;
}

.habit-day-btn.habit-start.missed,
.habit-day-btn.habit-end.missed,
.habit-day-btn.habit-start.pending,
.habit-day-btn.habit-end.pending {
  background: white !important;
  border: 2px solid var(--habit-boundary, #8b5cf6) !important;
}

.habit-day-btn.missed {
  background: var(--habit-missed, #ec4899) !important;
  color: white !important;
}

.habit-day-btn.missed::after {
  content: '×';
  position: absolute;
  font-size: 10px;
  font-weight: 500;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.habit-day-btn.missed:hover {
  opacity: 0.8;
}


.habit-empty {
  text-align: center;
  padding: 1.5rem 1rem;
  color: #999;
  font-size: 0.8rem;
}

.habit-empty-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

.habit-empty-title {
  margin-bottom: 0.5rem;
  color: #95a5a6;
  font-size: 1rem;
  font-weight: 500;
}

.habit-empty-subtitle {
  color: #7f8c8d;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.habit-empty-btn {
  background: none;
  border: none;
  color: #aaa;
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-family: inherit;
  border-radius: 4px;
  margin-top: 0.5rem;
}

.habit-empty-btn:hover {
  color: #666;
  background: rgba(0, 0, 0, 0.04);
}

.habit-add-section {
  margin: 0.4rem 0 0 0;
  padding: 0.4rem 0.5rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.habit-add-btn {
  background: #f5f7f9;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #666;
  font-size: 0.8rem;
  padding: 0.45rem 0.75rem;
  height: 2rem;
  line-height: 1rem;
  cursor: pointer;
  font-family: inherit;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.habit-add-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #28a745 50%, transparent 100%);
}

.habit-add-btn:hover {
  background: #eef2f5;
  color: #333;
  transform: translateY(-0.5px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Habit Motivational Quotes Carousel - Updated with 2 carousels */

.habit-quotes-carousel {
  margin-top: 2rem;
  padding: 0;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.habit-quote-card {
  position: relative;
  min-height: auto;
  width: 100%;
  padding: var(--space-4, 1rem) var(--space-5, 1.25rem);
  background: transparent;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: none;
  border-bottom: 1px solid var(--color-border, #e0e0e0);
  cursor: default;
}

.habit-quote-card::before {
  display: none;
}

.habit-quote-card:hover {
  transform: none;
}

.habit-quote-bg {
  display: none;
}

.habit-quote-icon {
  display: none;
}

.habit-quote-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 0.5rem);
  max-width: 800px;
  width: 100%;
}

.habit-quote-text {
  font-size: 0.9375rem;
  line-height: var(--line-height-base, 1.6);
  font-weight: 400;
  color: var(--color-text-muted, #666);
  font-style: italic;
  letter-spacing: 0;
  margin: 0;
  font-family: var(--font-sans, system-ui);
}

.habit-quote-author {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--color-text-subtle, #999);
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
  padding-top: 0;
  border-top: none;
  position: relative;
  font-family: var(--font-sans, system-ui);
}

.habit-quote-card-minimal {
  min-height: auto;
  width: 100%;
  padding: var(--space-4, 1rem) var(--space-5, 1.25rem);
  background: transparent;
  text-align: center;
}

.habit-quote-card-minimal .habit-quote-text {
  font-size: 0.9375rem;
  line-height: var(--line-height-base, 1.6);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  color: var(--color-text-muted, #666);
}

.habit-quote-card-minimal .habit-quote-author {
  font-size: 0.8125rem;
  padding-top: 0;
  font-weight: 400;
  color: var(--color-text-subtle, #999);
}


@media (max-width: 768px) {
  .habit-quotes-carousel {
    margin-top: 1.5rem;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .habit-quote-card {
    min-height: auto;
    width: 100%;
    max-width: 100%;
    padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
  }

  .habit-quote-card-minimal {
    min-height: auto;
    width: 100%;
    max-width: 100%;
    padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
  }

  .habit-quote-text {
    font-size: 0.875rem;
    line-height: 1.6;
  }

  .habit-quote-author {
    font-size: 0.75rem;
  }
}

/* Cheers Feedback Section */
.habit-cheers-section {
  margin-top: 2rem;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 1rem;
}

.cheers-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
}

.cheers-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2, 0.5rem);
  padding: var(--space-3, 0.75rem) var(--space-5, 1.25rem);
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e0e0e0);
  border-radius: var(--radius-round, 999px);
  color: var(--color-text, #1a1a1a);
  font-size: var(--font-size-base, 15px);
  font-weight: 500;
  font-family: var(--font-sans, system-ui);
  cursor: pointer;
  transition: all var(--dur-base, 200ms) var(--ease-standard, cubic-bezier(0.4, 0, 0.2, 1));
  position: relative;
  box-shadow: var(--shadow-1, 0 1px 3px rgba(0, 0, 0, 0.08));
  user-select: none;
}

.cheers-btn::before {
  display: none;
}

.cheers-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2, 0 2px 6px rgba(0, 0, 0, 0.1));
  border-color: var(--color-border-strong, #ddd);
  background: var(--color-surface, #ffffff) !important;
}

.cheers-btn:active {
  transform: translateY(0) scale(0.98);
}

.cheers-btn.cheers-animate {
  animation: cheerBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes cheerBounce {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.1) rotate(-5deg); }
  50% { transform: scale(1.15) rotate(5deg); }
  75% { transform: scale(1.05) rotate(-2deg); }
}

.cheers-icon {
  font-size: 1.2rem;
  display: inline-block;
  transition: transform 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.cheers-text {
  font-weight: 600;
  letter-spacing: 0.02em;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.cheers-count {
  display: inline-block;
  background: rgba(102, 126, 234, 0.2);
  color: #667eea;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  margin-left: 0.25rem;
  animation: countPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

@keyframes countPop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.feedback-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(102, 126, 234, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: #667eea;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  user-select: none;
}

.feedback-btn:hover {
  transform: translateY(-2px) scale(1.1);
  border-color: rgba(102, 126, 234, 0.4);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
  background: rgba(102, 126, 234, 0.05);
}

.feedback-btn:active {
  transform: translateY(0) scale(0.95);
}

/* Feedback Modal */
.feedback-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

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

.feedback-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.feedback-modal-content {
  position: relative;
  z-index: 1;
  background: var(--color-surface, #ffffff);
  border-radius: var(--radius-3, 6px);
  width: 90%;
  max-width: 480px;
  box-shadow: var(--shadow-3, 0 4px 12px rgba(0, 0, 0, 0.15));
  animation: slideUp 0.2s ease-out;
}

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

.feedback-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.feedback-modal-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text, #1a1a1a);
  font-family: var(--font-sans, system-ui);
}

.feedback-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted, #666);
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-2, 4px);
  transition: all var(--dur-base, 200ms) var(--ease-standard, cubic-bezier(0.4, 0, 0.2, 1));
}

.feedback-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-text, #1a1a1a);
}

.feedback-modal-body {
  padding: 1.5rem;
}

.feedback-textarea {
  width: 100%;
  padding: 1rem;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #2a2a2a;
  resize: vertical;
  min-height: 100px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.feedback-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.feedback-textarea::placeholder {
  color: #999;
}

.feedback-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  justify-content: flex-end;
}

.feedback-submit-btn,
.feedback-cancel-btn {
  padding: var(--space-2, 0.5rem) var(--space-5, 1.25rem);
  border: 1px solid var(--color-border, #e0e0e0);
  border-radius: var(--radius-2, 4px);
  font-family: var(--font-sans, system-ui);
  font-size: var(--font-size-base, 15px);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-base, 200ms) var(--ease-standard, cubic-bezier(0.4, 0, 0.2, 1));
}

.feedback-submit-btn {
  background: var(--color-success, #27ae60);
  color: white;
  border-color: var(--color-success, #27ae60);
}

.feedback-submit-btn:hover {
  background: #229954;
  border-color: #229954;
  transform: translateY(-1px);
  box-shadow: var(--shadow-1, 0 1px 3px rgba(0, 0, 0, 0.08));
}

.feedback-submit-btn:active {
  transform: translateY(0);
}

.feedback-cancel-btn {
  background: var(--color-surface, #ffffff);
  color: var(--color-text-muted, #666);
}

.feedback-cancel-btn:hover {
  color: var(--color-text, #1a1a1a);
  border-color: var(--color-border-strong, #ddd);
  background: rgba(0, 0, 0, 0.02);
}

.feedback-success {
  margin-top: 1rem;
  padding: 0.8rem 1.2rem;
  background: linear-gradient(135deg, rgba(67, 233, 123, 0.1) 0%, rgba(56, 249, 215, 0.1) 100%);
  border: 1px solid rgba(67, 233, 123, 0.3);
  border-radius: 8px;
  color: #27ae60;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  animation: slideInSuccess 0.3s ease;
  transition: all 0.3s ease;
}

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

@media (max-width: 768px) {
  .cheers-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }

  .feedback-modal-content {
    max-width: 100%;
    margin: 1rem;
  }

  .feedback-modal-header {
    padding: 1.2rem 1.2rem 0.8rem;
  }

  .feedback-modal-body {
    padding: 1.2rem;
  }

  .feedback-actions {
    flex-direction: column-reverse;
  }

  .feedback-submit-btn,
  .feedback-cancel-btn {
    width: 100%;
  }
}

