

/* -------------------- Base -------------------- */
body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f5f5;
  margin: 0;
  display: flex;
  min-height: 100vh;
}

/* -------------------- Layout -------------------- */
.layout {
  display: flex;
  width: 100%;
}

/* Side menu */
.side-menu-main-frame {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 250px;
  background-color: #000;
  color: #fff;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

.side-menu-main-frame ul {
  list-style: none;
  padding: 0;
  width: 100%;
}

.side-menu-main-frame li {
  text-align: center;
  margin: 0.5rem 0;
}

/* Main content */
.main-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem;
  box-sizing: border-box;
}

/* Container for tasks */
.container {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 500px;
}

h1 {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* -------------------- Input -------------------- */
.input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

#taskInput {
  flex: 1;
  padding: 0.5rem;
  font-size: 1rem;
  border: 2px solid #ccc;
  border-radius: 8px;
  outline: none;
  transition: 0.2s all ease;
  text-align: center;
}

#taskInput:focus {
  border-color: #d6336c;
  box-shadow: 0 0 5px rgba(214, 51, 108, 0.5);
}

#addBtn {
  padding: 0.5rem 1rem;
  cursor: pointer;
  border: none;
  background-color: #d6336c;
  color: #fff;
  border-radius: 5px;
  transition: 0.2s ease;
}

#addBtn:hover {
  background-color: #b52a58;
}

/* -------------------- Task list -------------------- */
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

a { 
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 1rem;
  border-bottom: 1px solid #eee;
  word-break: break-word;
  font-family: "Montagu Slab", serif;
  font-size: 0.9em;
  position: relative;
  text-align: center;
  color: white;
  text-decoration: none;
  transition: text-shadow 0.5s ease;

  cursor: pointer;
}

@keyframes hover {
  from {text-shadow: none;}
  to {text-shadow: 5px 10px 10px white;}
}

a:hover {
  animation-name: hover;
  animation-duration: 0.5s; 
  animation-fill-mode: forwards; 
}
li {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 1rem;
  border-bottom: 1px solid #eee;
  word-break: break-word;
  font-family: "Montagu Slab", serif;
  font-size: 0.9em;
  position: relative;
}

li.completed {
  text-decoration: line-through;
  color: #888;
}

/* Buttons inside tasks */
button {
  border: none;
  background: transparent;
  cursor: pointer;
}

button.removeBtn {
  color: red;
  font-weight: bold;
}

button.emoji {
  font-size: 1rem;
  cursor: pointer;
}

/* -------------------- Emoji popup -------------------- */

div.main_p {
  display: inline-block;
  background-color: #fff;
  border-radius: 5px;
  z-index: 999;
  padding: 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  max-width: 300px;
}

div.sub_p {
  width: 100%;
  background-color: #fff;
  border-radius: 4px;
  padding: 5px;
  box-sizing: border-box; /* includes padding in width */
}

div.content_p {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
  gap: 5px; /* smaller gap */
  width: 100%;
  box-sizing: border-box; /* ensures padding doesn’t overflow */
  background-color: #f0f0f0;
  border-radius: 10px;
  border: 2px groove rgba(175, 170, 173, 0.5);
  padding: 5px; /* smaller padding */
  margin-top: 0.5rem;
  max-width: 100%; /* ensure it never exceeds sub_p */
}


/* -------------------- Resources box -------------------- */
div.resource {
  display: flex;
  gap: 0.5rem;
  background: #fff;
  padding: 0.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  word-break: break-word;
}

/* -------------------- Misc -------------------- */
input.set {
  border: none;
  box-shadow: 0 2px 10px rgba(9, 255, 50, 0.1);
}


input.set:focus {
  border-bottom: #d6336c;
  box-shadow: 0 0 5px rgba(214, 51, 108, 0.5);
}






/* Modal */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 50;
  backdrop-filter: blur(2px);
}

.modal-content {
  background-color: #fff;
  padding: 2rem;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  text-align: center;
  font-family: "Arial", sans-serif;
  animation: popIn 0.3s ease-out;
}

.modal-content h1 {
  color: #d6336c;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.modal-content input {
  width: 80%;
  padding: 10px 12px;
  margin: 10px 0;
  border: 2px sollid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: "Arial", sans-serif;
  outline: none;
  transition: 0.2s all ease;
}

.modal-content h2 {
  color: #728cd8;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.modal-content button {
  padding: 8px 20px;
  border-radius: 8px;
  background: #d6336c;
  color: white;
  cursor: pointer;
  font-family: "Courier New", Courier, monospace;
  transition: 0.2s all ease;
}

.modal-content p {
  color: #fbbf24;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.modal-content button:hover {
  background-color: #b02a5e;
  transform: translateY(-2px);
}

.modal-content input:focus {
  border-bottom: #d6336c;
  box-shadow: 0 0 5px rgba(214, 51, 108, 0.5);
}

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