:root {
    /* Light theme variables */
    --background: #f8fafc;
    --foreground: #0f172a;
    --card: #ffffff;
    --card-foreground: #0f172a;
    --primary: #0f172a;
    --primary-foreground: #f8fafc;
    --secondary: #f1f5f9;
    --secondary-foreground: #0f172a;
    --muted: #f1f5f9;
    --muted-foreground: #64748b;
    --accent: #f1f5f9;
    --accent-foreground: #0f172a;
    --destructive: #ef4444;
    --destructive-foreground: #f8fafc;
    --border: #e2e8f0;
    --input: #e2e8f0;
    --ring: #0f172a;
    --radius: 0.5rem;
  }
  
  .dark-theme {
    /* Dark theme variables */
    --background: #000000fb;
    --foreground: #dac725eb;
    --card: #000000;
    --card-foreground: #dac725eb;
    --primary: #dac725eb;
    --primary-foreground: #0f172a;
    --secondary: #26202026;
    --secondary-foreground: #dac725eb;
    --muted: #6b6a6a67;
    --muted-foreground: #dac725eb;
    --accent: #6b6a6a67;
    --accent-foreground: #dac725eb;
    --destructive: #7f1d1d;
    --destructive-foreground: #dac725eb;
    --border: #334155;
    --input: #334155;
    --ring: #dac725eb;
  }

  .dark-theme .note-item-content {
    color: #000000;
    font-size: 20px;
    white-space: pre-wrap;
    word-break: break-word;
  }

  .dark-theme .note-modal-content{
    color: #000000;
    background: #dac725eb;
  } 

  .dark-theme .schedule-item {
    display: flex;
    padding: 0.75rem;
    background-color: #6b6a6a26;
    border-radius: var(--radius);
  }

  .dark-theme .quote-overlay{
    background: var(--background);
  }
  
  .dark-theme .todo-container::-webkit-scrollbar-thumb,
.dark-theme .quick-links-list::-webkit-scrollbar-thumb,
.dark-theme .planner-schedule::-webkit-scrollbar-thumb,
.dark-theme .notes-list::-webkit-scrollbar-thumb {
  background-color: var(--foreground);
}

  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
  }
  
  .loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background, #f0f2f5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.5s ease;
  }
  
  .loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
  }
  
  .loading-logo {
    width: 100px;
    animation: bounceZoom 1.5s ease-in-out;
  }
  
  @keyframes bounceZoom {
    0% {
      transform: scale(0.5);
      opacity: 0;
    }
    50% {
      transform: scale(1.2);
      opacity: 1;
    }
    70% {
      transform: scale(0.9);
    }
    100% {
      transform: scale(1);
      opacity: 1;
    }
  }
  
  @media (max-width: 600px) {
    .loading-logo {
      width: 80px;
    }
  }
  
  html, body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    font-size: 16px;
    overflow-x: hidden;
    min-height: 100vh;
  }
  
  .container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
  }
  
  button {
    cursor: pointer;
    font-family: inherit;
  }
  
  input, select, textarea {
    font-family: inherit;
  }
  
  /* Header Styles */
  .header {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
  }
  
  .header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  
  .theme-toggle button {
    background: none;
    border: none;
    color: var(--foreground);
    padding: 0.5rem;
    border-radius: var(--radius);
  }
  
  .theme-toggle button:hover {
    background-color: var(--secondary);
  }
  
  .theme-button {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  
  .theme-popup {
    position: absolute;
    top: 50%;
    left: -300px; /* Moves popup to the left of the button, adjust as needed */
    width: auto; /* Adjust width dynamically */
    height: 60px;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 100;
    visibility: hidden;
    opacity: 0;
    transform: translateX(-10px) translateY(-50%);
    transition: opacity 0.2s ease, 
                transform 0.2s ease, 
                visibility 0.2s;
    display: flex; /* Arrange options in a row */
    gap: 0.5rem; /* Space between options */
    align-items: center;
}

.theme-popup.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(0) translateY(-50%);
}

.theme-selector {
    display: flex; /* Change from grid to flexbox */
    gap: 0.5rem; /* Space between options */
    margin-bottom: 0; /* Remove bottom margin */
    align-items: center; /* Align items properly */
    justify-content: center; /* Center the options */
}

  
  .theme-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--border);
    position: relative;
  }
  
  .theme-swatch.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
  }
  
  .default-swatch {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  }
  
  .light-swatch {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  }
  
  .dark-swatch {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  }
  
  .pink-swatch {
    background: linear-gradient(135deg, #cc8899 0%, #9b5069 100%);
  }
  
  .blue-swatch {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  }
  
  .green-swatch {
    background: linear-gradient(135deg, #5a7326 0%, #3e521a 100%);
  }
  
  .orange-swatch {
    background: linear-gradient(135deg, #f97316 0%, #9a3412 100%);
  }
  
  .dark-blue-swatch {
    background: linear-gradient(135deg, #FFDEDE 0%, #FF0B55 50%, #CF0F47 100%);
  }
  
  .custom-theme-option {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
  }
  
  .custom-theme-label {
    display: block;
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    padding: 0.75rem;
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    margin-top: 0.5rem;
  }
  
  .custom-theme-input {
    display: none;
  }
  
  /* Dashboard Styles */
  .dashboard {
    padding: 2rem 0;
  }
  
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .cards-grid {
      grid-template-columns: 1fr;
    }
  }
  
  /* Animations */
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  @keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }
  
  @keyframes slideUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
  
  .fade-in {
    animation: fadeIn 0.3s ease-out;
  }
  
  .scale-in {
    animation: scaleIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  }
  
  .slide-up {
    animation: slideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }
  
  /* Favorite Image Section */
  .favorite-image-section {
    width: 66.7%;
    margin: 1rem auto; /* Centers it */
    text-align: center;
    padding: 1rem;
    background-color: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
  }
  
.favorite-image-container {
  width: 60%;
  max-height: 300px;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius);
  margin: 1rem 0;
}

.favorite-image {
  width: 100%;
  height: 300px;
  object-fit: cover; /* This ensures the image covers the area without distortion */
  object-position: center; /* Centers the image */
  transition: transform 0.3s ease;
}

.favorite-image:hover {
  transform: scale(1.02);
}

.image-upload-form {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-upload-form input[type="file"] {
  display: none;
}

.custom-file-upload {
  display: inline-block;
  padding: 0.5rem 1rem;
  cursor: pointer;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  transition: background-color 0.3s ease;
}

.custom-file-upload:hover {
  background-color: var(--border);
}

.upload-btn {
  color: black;
  padding: 0.5rem 1rem;
  background-color: var(--primary);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.upload-btn:hover {
  opacity: 0.9;
}

.upload-btn:disabled {
  background-color: var(--muted);
  cursor: not-allowed;
}

/* Custom Timer Styles */
.custom-timer-section {
  margin: 1rem 0;
  padding: 0.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.custom-timer-input {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.custom-timer-input input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
}

.custom-timer-input button {
  padding: 0.5rem 1rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.audio-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Planner Delete Button */
.delete-schedule-item {
  background: none;
  border: none;
  color: var(--destructive);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  opacity: 0.7;
  transition: opacity 0.3s, background-color 0.3s;
}

.delete-schedule-item:hover {
  opacity: 1;
  background-color: var(--secondary);
}

.schedule-item {
  display: grid;
  grid-template-columns: 100px 1fr 40px;
  gap: 1rem;
  align-items: center;
}

.motivational-widget {
  margin-top: 2rem;
  padding: 1rem;
  background-color: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.quotes-container {
  position: relative; /* For overlay positioning */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 150px;
  text-align: center;
  padding: 1rem;
  background: rgba(166, 166, 166, 0.226);
  border-radius: var(--radius);
  margin-bottom: 1.5rem; /* Gap between quotes-container and add button */
}

.quote-display {
  max-width: 80%;
}

.quote-content {
  position: relative;
}

.quote-text {
  font-size: 1.25rem;
  font-weight: 500;
  font-style: italic;
  margin-bottom: 1rem;
  color: var(--card-foreground);
}

.quote-author {
  font-size: 1rem;
  font-weight: 400;
  color: var(--card-foreground);
  opacity: 0.8;
}

.quote-delete {
  position: absolute;
  top: -5px;
  right: -20px;
  background: none;
  border: none;
  color: var(--destructive);
  cursor: pointer;
  padding: 0.25rem;
  display: none;
}

.quote-content:hover .quote-delete {
  display: block;
}

#add-quote-btn {
  display: block;
  margin: 0 auto; /* Center the button */
  padding: 0.5rem 1rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
}

#add-quote-btn:hover {
  background-color: color-mix(in srgb, var(--primary) 80%, #000);
}

.quote-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.quote-input-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--card);
  padding: 0.5rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 1001;
}

.quote-input-container input {
  padding: 0.5rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
}

.quote-input-container button {
  padding: 0.5rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.quote-input-container button:hover {
  background-color: color-mix(in srgb, var(--primary) 80%, #000);
}

@media (max-width: 768px) {
  .schedule-item {
    grid-template-columns: 80px 1fr 30px;
    gap: 0.5rem;
  }
  
  .quote-text {
    font-size: 1rem;
  }
  
  .quote-author {
    font-size: 0.875rem;
  }

  .quote-delete{
    right: -25px;
    top:-15px
  }
}

@media (max-width: 350px) {
  html,body {
    font-size: 12px;
  }

  .theme-popup {
    position: absolute;
    top: 40%;
    left: -270px;
    width: auto;
    display: flex; 
    gap: 0.25rem; 
    align-items: center;
  }
  .theme-selector {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0;
    align-items: center;
    justify-content: center;
  }

  .quote-delete{
    right: -20px;
    top:-15px
  }
}

@media (max-width: 452px) {
  .add-schedule-form {
    display: flex;
    flex-direction: row;
  }
}

.counter-item-delete{
  background-color: #ffffff6f;
  border: unset;
}

.timer-finished {
  text-align: center;
  padding: 20px;
  background-color: var(--card);
  color: var(--card-foreground);
  border-radius: var(--radius);
}

.timer-finished h3 {
  font-size: 2em;
  color: var(--primary);
  margin-bottom: 10px;
}

.timer-finished p {
  font-size: 1.2em;
  color: var(--muted-foreground);
  margin-bottom: 20px;
}

.timer-finished button {
  padding: 10px 20px;
  font-size: 1em;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

/* Pet Container (Super Small and Fixed) */
#cute-pet {
  position: fixed;
  bottom: 10px; /* Stay at the bottom */
  left: 10px; /* Stay at the left */
  width: 60px; /* Small size */
  height: 60px;
  cursor: pointer;
  z-index: 999;
  user-select: none; /* Prevent selection */
}

/* Make sure the pet image stays small */
#cute-pet img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none; /* Prevent accidental dragging */
}

/* Wiggle animation */
@keyframes wiggle {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
  75% { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}

/* Jump animation */
@keyframes jump {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

/* Quick link card styling */
.quick-links-container {
  padding: 10px;
}

.quick-links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  max-height: 150px;
  overflow-y: auto;
  padding-right: 5px;
}

.quick-links-list::-webkit-scrollbar {
  width: 6px;
}

.quick-links-list::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.quick-links-list::-webkit-scrollbar-track {
  background-color: transparent;
}

.quick-link-item {
  position: relative;
  padding: 10px;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quick-link-item:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.quick-link-title {
  font-size: 1.1em;
}

.quick-link-delete {
  display: none;
  background: none;
  border: none;
  color: var(--destructive);
  cursor: pointer;
  padding: 0;
  margin-left: 10px;
}

.quick-link-item:hover .quick-link-delete {
  display: block;
}

.quick-link-input {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-direction: column;
}

.quick-link-input input {
  padding: 8px;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background-color: var(--card);
  color: var(--card-foreground);
  width: 150px;
}

.quick-link-input button {
  padding: 8px 16px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}


  /* Coin Toss Styles */
  .coin-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .coin {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--primary) 60%, color-mix(in srgb, var(--primary) 80%, #ffffff) 100%);
    color: var(--background);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    font-weight: bold;
    border: 3px solid color-mix(in srgb, var(--border) 70%, #ffffff);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }

  .coin.flip {
    animation: coin-toss 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }

  .flip-button {
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
  }

  .flip-button:disabled {
    background: var(--muted);
    cursor: not-allowed;
  }

  .result-text {
    margin: 0;
    font-size: 1rem;
    color: var(--card-foreground);
  }

  .result-text span {
    font-weight: bold;
    color: var(--primary);
  }

  /* Coin Toss Animation */
  @keyframes coin-toss {
    0% {
      transform: translateY(0) rotateY(0deg);
    }
    20% {
      transform: translateY(-60px) rotateY(360deg);
    }
    40% {
      transform: translateY(-80px) rotateY(720deg);
    }
    60% {
      transform: translateY(-60px) rotateY(1080deg);
    }
    80% {
      transform: translateY(-20px) rotateY(1440deg);
    }
    100% {
      transform: translateY(0) rotateY(1800deg);
    }
  }


  .image-container {
    text-align: center;
  }
  
  .image-display {
    margin-bottom: 15px;
  }
  
  .image-display img {
    width: 275px;
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
  }
  
  .image-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
  }
  
  .image-actions button {
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius);
    background: var(--primary);
    color: var(--primary-foreground);
    cursor: pointer;
    font-size: 14px;
  }
  
  .image-actions button:hover {
    background: var(--ring);
  }
  
  .popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }
  
  .popup-content {
    background: var(--card);
    color: var(--card-foreground);
    padding: 20px;
    border-radius: var(--radius);
    max-width: 500px;
    width: 90%;
    position: relative;
  }
  
  .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--card-foreground);
  }
  
  .predefined-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
  }
  
  .predefined-gallery img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    cursor: pointer;
  }
  
  .predefined-gallery img:hover {
    opacity: 0.8;
  }


/* Calendar styles */
.calendar-container {
  position: relative;
}

.calendar-day.has-event {
  background: var(--muted);
}

.event-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  width: 100%;
  height: 100%;
}

.event-input-container {
  position: relative;
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--card-bg);
  padding: 10px;
  border-radius: 4px;
  box-shadow: var(--card-shadow);
  z-index: 1001;
  flex-direction: column;
}

.event-date {
  margin-right: 10px;
  font-size: 14px;
  color: var(--foreground);
}

.event-input {
  padding: 8px;
  border: 1px solid var(--foreground);
  border-radius: 4px;
  width: 200px;
  background: var(--card-bg);
  color: var(--foreground);
}

.event-input:read-only {
  border: none;
  background: transparent;
  border: 1px solid var(--foreground);
}

.event-save-btn {
  background: var(--primary);
  color: var(--background);
  border: none;
  padding: 0;
  border-radius: 4px;
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.event-save-btn:hover {
  background: color-mix(in srgb, var(--primary) 80%, #000);
}

.event-delete-btn {
  background: var(--primary);
  color: var(--background);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.event-delete-btn:hover {
  background: color-mix(in srgb, var(--primary) 80%, #000);
}
