:root {
  --primary: #ff6b6b;
  --background-light: #fdfbf7;
  --background-dark: #230f0f;
  --paper: #fffdf5;
  --ink: #2C3E50;
  --secondary-teal: #4ECDC4;
  --warning-yellow: #FFE66D;
  --pencil-yellow: #f4d03f;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}

body {
  font-family: 'Patrick Hand', cursive;
  background-color: var(--background-light);
  background-image: radial-gradient(var(--ink) 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

.font-display {
  font-family: 'Permanent Marker', cursive;
}

.font-hand {
  font-family: 'Kalam', cursive;
}

.font-body {
  font-family: 'Patrick Hand', cursive;
}

.shape-blob {
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}

.shape-card {
  border-radius: 2% 1% 1% 2% / 2% 1% 2% 1%;
}

.shape-button {
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}

.shadow-sketch {
  box-shadow: 3px 3px 0px 0px rgba(44, 62, 80, 1);
}

.shadow-sketch-hover {
  box-shadow: 5px 5px 0px 0px rgba(44, 62, 80, 1);
}

.shadow-sketch-sm {
  box-shadow: 2px 2px 0px 0px rgba(44, 62, 80, 1);
}

::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--ink);
  border-radius: 5px;
  border: 2px solid var(--background-light);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

.sticky-header {
  width: 100%;
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-paper {
  background-color: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0px 0px rgba(44, 62, 80, 1);
  border-radius: 1rem 0.5rem 0.5rem 0.25rem;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bounce-icon {
  color: var(--ink);
  font-size: 2.5rem;
}

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

.app-title {
  color: var(--ink);
  font-size: 2rem;
  letter-spacing: 0.1em;
  margin: 0;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1rem;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  gap: 2rem;
}

.daily-struggle-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

@media (min-width: 768px) {
  .daily-struggle-section {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

.struggle-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.struggle-title {
  font-size: 3rem;
  color: var(--ink);
  line-height: 0.9;
  margin: 0;
}

@media (min-width: 768px) {
  .struggle-title {
    font-size: 4.5rem;
  }
}

.struggle-title .struggle-word {
  position: relative;
  display: inline-block;
  color: var(--primary) !important;
}

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

.struggle-underline {
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 100%;
  height: 0.75rem;
  color: var(--ink);
}

.struggle-subtitle {
  font-size: 1.5rem;
  color: var(--ink);
  margin-top: 0.5rem;
  margin-left: 1rem;
  font-weight: 500;
}

.level-badge {
  background-color: var(--background-dark);
  color: white;
  padding: 0.5rem 1.5rem;
  font-size: 1.125rem;
  border: 2px solid var(--primary);
  box-shadow: 4px 4px 0px 0px var(--primary);
  cursor: pointer;
  transition: all 0.3s;
  align-self: flex-start;
}

@media (min-width: 768px) {
  .level-badge {
    align-self: center;
    padding-bottom: 1rem;
  }
}

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

.level-badge:active {
  transform: scale(0.95);
}

.info-popup {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.info-popup.hidden {
  display: none;
}

.info-popup-content {
  background-color: var(--paper);
  border: 2px solid var(--ink);
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  position: relative;
  border-radius: 1rem;
}

.info-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.3s;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-popup-close:hover {
  transform: rotate(90deg);
}

.info-popup-title {
  font-size: 1.5rem;
  color: var(--ink);
  margin: 0 0 1rem 0;
}

.info-popup-body {
  font-size: 1.125rem;
  color: var(--ink);
  line-height: 1.6;
}

.info-popup-body p {
  margin: 0 0 1rem 0;
}

.info-popup-body p:last-child {
  margin-bottom: 0;
}

.task-input-wrapper {
  width: 100%;
  position: relative;
  z-index: 20;
  margin: 1rem 0;
}

.task-input-container {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--paper);
  border: 2px solid var(--ink);
  padding: 0.5rem;
  padding-right: 0.75rem;
  transition: all 0.3s;
}

.task-input-container:hover {
  box-shadow: 5px 5px 0px 0px rgba(44, 62, 80, 1);
}

.input-icon {
  padding-left: 1rem;
  color: var(--ink);
  font-size: 2rem;
}

.task-form {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.task-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 1.5rem;
  padding: 1rem;
  height: 4rem;
  outline: none;
}

.task-input::placeholder {
  color: rgba(44, 62, 80, 0.5);
}

.add-btn {
  background-color: var(--primary);
  color: white;
  padding: 0 2rem;
  height: 3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  transition: all 0.3s;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0px 0px var(--background-dark);
  cursor: pointer;
  white-space: nowrap;
}

.add-btn:hover {
  background-color: rgba(255, 107, 107, 0.9);
}

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

.add-btn-text {
  display: none;
}

.add-btn-icon {
  font-size: 1.5rem;
  line-height: 1;
  font-weight: normal;
}

@media (min-width: 640px) {
  .add-btn-text {
    display: inline;
  }
}

.bounce-question {
  position: absolute;
  top: -1.5rem;
  right: -1rem;
  width: 3rem;
  height: 3rem;
  background-color: var(--pencil-yellow);
  border-radius: 50%;
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  font-family: 'Permanent Marker', cursive;
  color: var(--ink);
  font-size: 1.5rem;
  transition: transform 0.3s;
}

.bounce-question:hover {
  transform: scale(1.1);
}

.task-list-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
}

.task-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.task-card-wrapper {
  width: 100%;
  transition: all 0.3s;
  position: relative;
  isolation: isolate;
}

.task-card-wrapper:hover {
  z-index: 100;
}

.task-card {
  background-color: var(--paper);
  border: 2px solid var(--ink);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.3s;
  position: relative;
}

.task-card:hover {
  box-shadow: 5px 5px 0px 0px rgba(44, 62, 80, 1);
}

.task-content-wrapper {
  flex: 1;
  min-width: 0;
  position: relative;
}

.task-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  transition: color 0.3s;
  word-break: break-word;
}

.task-card:hover .task-title {
  color: var(--primary);
}

.check-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: transparent;
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
  box-shadow: 2px 2px 0px 0px rgba(0, 0, 0, 0.1);
}

.check-btn:hover {
  background-color: var(--secondary-teal);
  color: white;
}

.check-btn .material-symbols-outlined {
  font-size: 1.5rem;
  font-weight: 700;
}

.check-btn.completed-check {
  background-color: var(--ink);
  color: var(--secondary-teal);
  cursor: pointer;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}

.troll-icon-wrapper {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.troll-icon-wrapper:hover {
  opacity: 1;
}

.troll-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(20%) sepia(10%) saturate(2000%) hue-rotate(180deg);
}

.troll-tooltip {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  right: 0;
  background-color: var(--ink);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
  width: 200px;
  max-width: calc(100vw - 2rem);
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 0.2);
  font-family: 'Patrick Hand', cursive;
}

.troll-tooltip[style*="position: fixed"] {
  z-index: 10001;
}

.troll-icon-wrapper:hover .troll-tooltip {
  opacity: 1;
}

.troll-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 1rem;
  border: 0.5rem solid transparent;
  border-top-color: var(--ink);
}

.delete-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
}

.delete-btn:hover {
  color: #dc2626;
  transform: scale(1.1) rotate(12deg);
}

.delete-btn.disabled {
  color: rgba(44, 62, 80, 0.3);
  cursor: not-allowed;
}

.delete-btn.disabled:hover {
  transform: none;
  color: rgba(44, 62, 80, 0.3);
}

.delete-btn .material-symbols-outlined {
  font-size: 1.875rem;
}

.task-card.completed-bg {
  background-color: #e0e0e0;
  border: 2px dashed rgba(44, 62, 80, 0.4);
}

.task-card-wrapper.completed-card {
  opacity: 0.6;
}

.task-card-wrapper.completed-card:hover {
  opacity: 1;
}

.completed-text {
  color: rgba(44, 62, 80, 0.5);
}

.strikethrough-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 1rem;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.blurry-text {
  transition: filter 0.3s ease;
}

.mirror-text {
  transform: scaleX(-1);
  display: inline-block;
  transition: transform 0.3s ease;
}

@keyframes fakeComplete {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.task-card.fake-complete {
  animation: fakeComplete 1s ease-in-out;
}

.task-card.clingy {
  transition: none;
  cursor: grabbing;
}

.task-card-wrapper.runaway-moving {
  transition: all 0.5s ease;
  transform: scale(1.05);
}

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
}

.toast-container.hidden {
  display: none;
}

.toast-paper {
  background-color: var(--ink);
  color: white;
  padding: 1.5rem;
  border: 2px solid white;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 24rem;
  box-shadow: 4px 4px 0px 0px rgba(255, 255, 255, 0.5);
  transition: transform 0.3s;
}

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

.toast-icon {
  color: var(--warning-yellow);
  font-size: 2.5rem;
  animation: spin 3s linear infinite;
}

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

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 1.125rem;
  letter-spacing: 0.05em;
  color: var(--warning-yellow);
  margin: 0 0 0.25rem 0;
}

.toast-message {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

@media (max-width: 768px) {
  .sticky-header {
    padding-top: 1rem;
    padding-bottom: 0.5rem;
  }
  
  .header-paper {
    padding: 0.5rem;
  }
  
  .app-title {
    font-size: 1.5rem;
  }
  
  .bounce-icon {
    font-size: 2rem;
  }
  
  .task-input {
    font-size: 1.25rem;
    padding: 0.75rem;
    height: 3.5rem;
  }
  
  .add-btn {
    height: 3.5rem;
    padding: 0 1.5rem;
    font-size: 1rem;
  }
  
  .task-card {
    padding: 1rem;
    gap: 1rem;
  }
  
  .task-title {
    font-size: 1.25rem;
  }
  
  .check-btn {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  .check-btn .material-symbols-outlined {
    font-size: 1.5rem;
  }
  
  .delete-btn {
    width: 2rem;
    height: 2rem;
  }
  
  .delete-btn .material-symbols-outlined {
    font-size: 1.5rem;
  }
  
  .troll-icon-wrapper {
    width: 2rem;
    height: 2rem;
  }
  
  .troll-tooltip {
    width: 180px;
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    z-index: 10000;
  }
  
  .toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }
  
  .toast-paper {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .app-title {
    font-size: 1.25rem;
  }
  
  .bounce-icon {
    font-size: 1.75rem;
  }
  
  .task-input {
    font-size: 1rem;
  }
  
  .task-title {
    font-size: 1.125rem;
  }
  
  .bounce-question {
    display: none;
  }
}
