* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #1E1F2E;
  min-height: 100vh;
  padding: 20px;
}

.app {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 800px;
  background: #2A2D3A;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  padding: 30px;
  margin: 20px auto;
  border: 1px solid rgba(0, 229, 255, 0.15);
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(77, 208, 225, 0.15);
}

.header h1 {
  font-size: 2.5rem;
  color: #4DD0E1;
  margin-bottom: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.logo {
  width: 60px;
  height: 60px;
  animation: logoFloat 3s ease-in-out infinite;
}

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

.stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.stat {
  background: rgba(77, 208, 225, 0.08);
  color: #4DD0E1;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(77, 208, 225, 0.2);
}

/* Input Section */
.input-section {
  margin-bottom: 25px;
}

.todo-input {
  width: 100%;
  padding: 15px 20px;
  font-size: 1rem;
  border: 2px solid rgba(77, 208, 225, 0.2);
  border-radius: 12px;
  outline: none;
  transition: all 0.3s ease;
  margin-bottom: 15px;
  background: rgba(30, 31, 46, 0.6);
  color: #E0E0E0;
}

.todo-input:focus {
  border-color: #4DD0E1;
  box-shadow: 0 0 10px rgba(77, 208, 225, 0.2);
}

.date-time-picker {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.date-picker-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.date-button {
  width: 100%;
  padding: 12px 20px;
  background: rgba(30, 31, 46, 0.6);
  border: 2px solid rgba(77, 208, 225, 0.2);
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  color: #E0E0E0;
}

.date-button:hover {
  border-color: #4DD0E1;
  background: rgba(77, 208, 225, 0.05);
}

.time-input {
  flex: 1;
  min-width: 150px;
  padding: 12px 20px;
  font-size: 1rem;
  border: 2px solid rgba(77, 208, 225, 0.2);
  border-radius: 12px;
  outline: none;
  transition: all 0.3s ease;
  background: rgba(30, 31, 46, 0.6);
  color: #E0E0E0;
  color-scheme: dark;
}

.time-input:focus {
  border-color: #4DD0E1;
  box-shadow: 0 0 10px rgba(77, 208, 225, 0.2);
}

.add-button {
  width: 100%;
  padding: 15px 30px;
  background: #4DD0E1;
  color: #1E1F2E;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-button:hover {
  transform: translateY(-2px);
  background: #26C6DA;
  box-shadow: 0 4px 12px rgba(77, 208, 225, 0.3);
}

.add-button:active {
  transform: translateY(0);
}

/* Calendar Dropdown */
.calendar-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: #2A2D3A;
  border: 2px solid rgba(77, 208, 225, 0.25);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(0, 229, 255, 0.2);
}

.calendar-header button {
  background: rgba(77, 208, 225, 0.15);
  color: #4DD0E1;
  border: 1px solid rgba(77, 208, 225, 0.25);
  width: 35px;
  height: 35px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.calendar-header button:hover {
  background: #4DD0E1;
  color: #1E1F2E;
  transform: scale(1.05);
}

.calendar-header span {
  font-weight: 600;
  color: #E0E0E0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.calendar-day-header {
  text-align: center;
  font-weight: 600;
  color: #4DD0E1;
  padding: 8px 0;
  font-size: 0.85rem;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  color: #E0E0E0;
}

.calendar-day:not(.empty):hover {
  background: rgba(77, 208, 225, 0.15);
  transform: scale(1.05);
}

.calendar-day.empty {
  cursor: default;
}

.calendar-day.today {
  background: rgba(77, 208, 225, 0.2);
  color: #4DD0E1;
  font-weight: 600;
  border: 1px solid #4DD0E1;
}

.calendar-day.selected {
  background: #4DD0E1;
  color: #1E1F2E;
  font-weight: 600;
}

/* Filter Section */
.filter-section {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.filter-button {
  flex: 1;
  min-width: 100px;
  padding: 10px 20px;
  background: rgba(30, 31, 46, 0.6);
  border: 2px solid rgba(77, 208, 225, 0.2);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #E0E0E0;
}

.filter-button:hover {
  border-color: #4DD0E1;
  color: #4DD0E1;
}

.filter-button.active {
  background: #4DD0E1;
  color: #1E1F2E;
  border-color: #4DD0E1;
}

/* Todo List */
.todo-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 20px;
  background: rgba(30, 31, 46, 0.6);
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 2px solid rgba(77, 208, 225, 0.15);
}

.todo-item:hover {
  background: rgba(77, 208, 225, 0.05);
  transform: translateX(5px);
  border-color: rgba(77, 208, 225, 0.25);
}

.todo-item.completed {
  opacity: 0.6;
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: #666;
}

.todo-checkbox {
  width: 24px;
  height: 24px;
  cursor: pointer;
  accent-color: #4DD0E1;
}

.todo-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.todo-text {
  font-size: 1.05rem;
  color: #E0E0E0;
  font-weight: 500;
}

.todo-reminder {
  font-size: 0.85rem;
  color: #4DD0E1;
  display: flex;
  align-items: center;
  gap: 5px;
}

.delete-button {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
  border: 2px solid rgba(255, 107, 107, 0.4);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-button:hover {
  background: #ff6b6b;
  color: white;
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 0 15px rgba(255, 107, 107, 0.5);
}

.delete-button:active {
  transform: scale(0.95);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.empty-state p {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.empty-state span {
  font-size: 3rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 20px;
    border-radius: 15px;
    margin: 10px auto;
  }

  .header h1 {
    font-size: 1.8rem;
  }

  .stats {
    gap: 10px;
  }

  .stat {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .todo-input {
    font-size: 0.95rem;
    padding: 12px 15px;
  }

  .date-time-picker {
    flex-direction: column;
  }

  .date-picker-wrapper,
  .time-input {
    min-width: 100%;
  }

  .filter-section {
    gap: 8px;
  }

  .filter-button {
    min-width: auto;
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .todo-item {
    padding: 15px;
    gap: 12px;
  }

  .todo-text {
    font-size: 0.95rem;
  }

  .todo-reminder {
    font-size: 0.75rem;
  }

  .delete-button {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .calendar-dropdown {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 1.5rem;
  }

  .stats {
    flex-direction: column;
    gap: 8px;
  }

  .filter-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .calendar-day {
    font-size: 0.8rem;
  }

  .calendar-day-header {
    font-size: 0.75rem;
  }
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.todo-item {
  animation: slideIn 0.3s ease;
}

/* Placeholder Styling */
.todo-input::placeholder {
  color: rgba(224, 224, 224, 0.5);
}

.date-button::placeholder {
  color: rgba(224, 224, 224, 0.5);
}

/* View Toggle */
.view-toggle {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 15px 0;
  flex-wrap: wrap;
}

.view-button {
  padding: 10px 24px;
  background: rgba(30, 31, 46, 0.6);
  border: 2px solid rgba(77, 208, 225, 0.2);
  border-radius: 12px;
  color: #E0E0E0;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-button:hover {
  border-color: #4DD0E1;
}

.view-button.active {
  background: #4DD0E1;
  color: #1E1F2E;
  border-color: #4DD0E1;
}

/* Category Select */
.category-select {
  flex: 1;
  min-width: 150px;
  padding: 12px 20px;
  font-size: 1rem;
  border: 2px solid rgba(77, 208, 225, 0.2);
  border-radius: 12px;
  outline: none;
  transition: all 0.3s ease;
  background: rgba(30, 31, 46, 0.6);
  color: #E0E0E0;
  cursor: pointer;
}

.category-select:focus {
  border-color: #4DD0E1;
  box-shadow: 0 0 10px rgba(77, 208, 225, 0.2);
}

.category-select option {
  background: #2A2D3A;
  color: #E0E0E0;
}

/* Todo Category Badge */
.todo-category {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(77, 208, 225, 0.15);
  border: 1px solid rgba(77, 208, 225, 0.25);
  border-radius: 12px;
  font-size: 0.75rem;
  color: #4DD0E1;
  margin-left: 8px;
}

/* Calendar View Layout */
.container.calendar-view {
  max-width: 100%;
  width: 100%;
}

.calendar-layout {
  display: flex;
  gap: 20px;
  height: calc(100vh - 250px);
  min-height: 600px;
}

.main-calendar {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.calendar-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(30, 31, 46, 0.6);
  border-radius: 12px;
  border: 1px solid rgba(77, 208, 225, 0.15);
}

.calendar-navigation button {
  padding: 10px 20px;
  background: rgba(77, 208, 225, 0.15);
  border: 1px solid rgba(77, 208, 225, 0.25);
  border-radius: 8px;
  color: #4DD0E1;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-weight: 500;
}

.calendar-navigation button:hover {
  background: #4DD0E1;
  color: #1E1F2E;
}

.calendar-navigation h2 {
  color: #E0E0E0;
  font-size: 1.5rem;
  font-weight: 600;
}

/* Calendar View Grid */
.calendar-view-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  flex: 1;
  overflow-y: auto;
}

.calendar-weekday {
  text-align: center;
  font-weight: 600;
  color: #4DD0E1;
  padding: 10px;
  background: rgba(77, 208, 225, 0.08);
  border-radius: 8px;
  font-size: 0.9rem;
}

.calendar-date-cell {
  background: rgba(30, 31, 46, 0.6);
  border: 2px solid rgba(77, 208, 225, 0.15);
  border-radius: 12px;
  padding: 8px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.calendar-date-cell:hover {
  border-color: rgba(77, 208, 225, 0.25);
}

.calendar-date-cell.empty {
  background: transparent;
  border-color: transparent;
}

.calendar-date-cell.today {
  border-color: #4DD0E1;
  background: rgba(77, 208, 225, 0.05);
}

.date-number {
  font-size: 1.2rem;
  font-weight: 600;
  color: #E0E0E0;
  margin-bottom: 8px;
}

.calendar-date-cell.today .date-number {
  color: #4DD0E1;
}

.date-todos {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.calendar-todo {
  background: rgba(77, 208, 225, 0.1);
  border: 1px solid rgba(77, 208, 225, 0.2);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-todo:hover {
  background: rgba(77, 208, 225, 0.2);
  border-color: rgba(77, 208, 225, 0.3);
}

.calendar-todo.completed {
  opacity: 0.5;
  text-decoration: line-through;
}

.calendar-todo .time {
  color: #4DD0E1;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.calendar-todo .text {
  color: #E0E0E0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sidebar */
.sidebar {
  width: 320px;
  background: rgba(30, 31, 46, 0.6);
  border: 2px solid rgba(77, 208, 225, 0.15);
  border-radius: 12px;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar h3 {
  color: #4DD0E1;
  font-size: 1.3rem;
  margin-bottom: 10px;
}

/* Quick Add */
.quick-add {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  background: rgba(77, 208, 225, 0.05);
  border: 1px solid rgba(77, 208, 225, 0.15);
  border-radius: 10px;
}

.quick-input {
  width: 100%;
  padding: 10px;
  background: rgba(30, 31, 46, 0.8);
  border: 1px solid rgba(77, 208, 225, 0.2);
  border-radius: 8px;
  color: #E0E0E0;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s ease;
}

.quick-input:focus {
  border-color: #4DD0E1;
  box-shadow: 0 0 10px rgba(77, 208, 225, 0.2);
}

.quick-category {
  width: 100%;
  padding: 8px;
  background: rgba(30, 31, 46, 0.8);
  border: 1px solid rgba(77, 208, 225, 0.2);
  border-radius: 8px;
  color: #E0E0E0;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.quick-category option {
  background: #2A2D3A;
}

.quick-datetime {
  display: flex;
  gap: 8px;
}

.quick-date,
.quick-time {
  flex: 1;
  padding: 8px;
  background: rgba(30, 31, 46, 0.8);
  border: 1px solid rgba(77, 208, 225, 0.2);
  border-radius: 8px;
  color: #E0E0E0;
  font-size: 0.85rem;
  outline: none;
  color-scheme: dark;
}

.quick-add-btn {
  padding: 10px;
  background: #4DD0E1;
  color: #1E1F2E;
  border: none;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quick-add-btn:hover {
  background: #26C6DA;
  transform: scale(1.05);
}

/* Category Section */
.category-section {
  padding: 15px;
  background: rgba(77, 208, 225, 0.05);
  border: 1px solid rgba(77, 208, 225, 0.15);
  border-radius: 10px;
}

.category-section h4 {
  color: #4DD0E1;
  font-size: 1rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.category-todos {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-todo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(30, 31, 46, 0.6);
  border: 1px solid rgba(77, 208, 225, 0.15);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.sidebar-todo:hover {
  border-color: rgba(77, 208, 225, 0.25);
}

.sidebar-todo input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #4DD0E1;
}

.sidebar-todo-text {
  flex: 1;
  color: #E0E0E0;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-delete {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.4);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.sidebar-delete:hover {
  background: #ff6b6b;
  color: white;
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.4);
}

/* Mobile Responsive for Calendar View */
@media (max-width: 1200px) {
  .calendar-layout {
    flex-direction: column;
    height: auto;
  }

  .sidebar {
    width: 100%;
  }

  .calendar-view-grid {
    grid-template-columns: repeat(7, 1fr);
  }

  .calendar-date-cell {
    min-height: 80px;
  }

  .calendar-weekday {
    font-size: 0.75rem;
    padding: 6px;
  }
}

@media (max-width: 768px) {
  .view-toggle {
    gap: 8px;
  }

  .view-button {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .calendar-navigation {
    flex-direction: column;
    gap: 10px;
  }

  .calendar-navigation button {
    font-size: 0.85rem;
    padding: 8px 16px;
  }

  .calendar-navigation h2 {
    font-size: 1.2rem;
  }

  .calendar-view-grid {
    gap: 5px;
  }

  .calendar-date-cell {
    min-height: 60px;
    padding: 4px;
  }

  .date-number {
    font-size: 0.9rem;
  }

  .calendar-todo {
    font-size: 0.65rem;
    padding: 3px 4px;
  }

  .calendar-weekday {
    font-size: 0.7rem;
    padding: 4px;
  }

  .sidebar {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .calendar-weekday {
    font-size: 0.6rem;
    padding: 3px;
  }

  .calendar-date-cell {
    min-height: 50px;
    padding: 2px;
  }

  .date-number {
    font-size: 0.8rem;
    margin-bottom: 4px;
  }

  .calendar-todo .time,
  .calendar-todo .text {
    font-size: 0.6rem;
  }
}
