/* Raleway Font */
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

/* Roboto Font */
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');


*{
    margin:0;
    padding: 0;
    box-sizing: border-box;
}

:root{
    --text-color: #fff;
    --background-color: rgb(167, 8, 167);
    --box-shadow: rgba( 0,0,0, 0.5);
    --box-color: rgba(255,255,255,0.18);
    --input-background: rgba(255,194,209,0.3);
    --input-color: #bcbcbc;
    --plus-color:#d060f0;
    --hover-plus:#f0b8ff;
}


body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to bottom, var(--text-color), var(--background-color))
    no-repeat center center/cover;
}

.logo{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: absolute;
    top:-40%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.logo h1{
    font-family: 'Raleway', sans-serif;
    font-size: 50px;
    font-weight: 900;
    color: white;
    text-shadow: 5px 0 0 var(--hover-plus);
}

.todo-container{
    display: flex;
    position: relative;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 20px;
}

.todo{
    width: 100%;
    max-width: 420px;
    height: 100%;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    color: #fff;
    border-radius: 20px ;
    box-shadow: 0 0 100px var(--box-shadow);
    border: 3px solid var(--box-color) ;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.todo:hover{
    transform: scale(1.1);
}

.todo h1{
    font-family: 'Raleway', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    text-shadow: 2px 2px 2px var(--text-color);
}

.todo-input{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 1.1rem;
    border: none;
    outline: none;
}

.todo-input input{
    flex: 1; 
    padding: 12px 17px;
    border: none;
    outline: none;
    border-radius: 20px;
    background: var(--input-background);
    color: var(--text-color);
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
}

.todo-input input:hover{
    transform: scalex(1.1);
}

.todo-input input::placeholder{
    color: var(--input-color);
}

.todo-input button{
    display: flex;
    align-items: center;
    justify-content: center ;
    margin-left: 18px;
    padding: 8px;
    border-radius: 50%;
    background: var(--box-color);
    transition: all 0.3s ease;
    color: var(--text-color);
    border: 2px solid var(--box-color);
    font-size: 1.1rem;
    cursor: pointer;
}

.todo-input button:hover{
    transform: scale(1.2);
    background: var(--plus-color);
}

.input-container{
    display:flex;
    align-items: center;
    padding: 10px;
    justify-content: center;
}

/* List Style */
ul#task-list {
    list-style: none;
    width: 100%;
    padding: 0;
    margin-top: 10px;
}

.task-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    margin-top: 10px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    transition: 0.3s ease;
}

.task-item:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.25);
}

.task-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.task-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    transition: 0.2s ease;
}

.task-actions button:hover {
    color: var(--hover-plus);
    transform: scale(1.2);
}

/* Jika task sudah selesai */
.completed .task-text {
    text-decoration: line-through;
    opacity: 0.6;
}


@media (max-width: 768px) {
  body {
    flex-direction: column;
    padding: 20px;
  }

  .logo h1 {
    font-size: 1.8rem;
    text-align: center;
    text-shadow: 3px 0 0 var(--hover-plus);
  }

  .todo {
    max-width: 340px;
    padding: 1.5rem;
    gap: 15px;
  }

  .todo h1 {
    font-size: 2rem;
  }

  .todo-input input {
    font-size: 14px;
    padding: 10px 14px;
  }

  .todo-input button {
    padding: 6px;
    margin-left: 12px;
  }

  .task-item {
    font-size: 14px;
    padding: 8px 12px;
  }
}

/* Untuk layar handphone kecil (<= 480px) */
@media (max-width: 480px) {
  .logo {
    top: -30%;
  }

  .logo h1 {
    font-size: 1.5rem !important;
    line-height: 1.5;
  }

  .todo {
    width: 100%;
    max-width: 300px;
    padding: 1.2rem;
    border-radius: 15px;
  }

  .todo h1 {
    font-size: 1.6rem;
  }

  .todo-input {
    flex-direction: column;
    gap: 10px;
  }

  .todo-input input {
    width: 90%;
    border-radius: 15px;
    font-size: 13px;
  }

  .todo-input button {
    margin-left: 0;
    padding: 10px;
    width: 35px;
    height: 35px;
  }

  .task-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .task-actions {
    align-self: flex-end;
  }

   .todo-input {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .todo-input input {
    flex: 1;
    width: auto;
    min-width: 0;
    padding: 10px 12px;
    font-size: 14px;
  }

  .todo-input button {
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Untuk layar sangat kecil (<= 360px) */
@media (max-width: 360px) {
  .logo h1 {
    font-size: 1.6rem;
  }

  .todo h1 {
    font-size: 1.4rem;
  }

  .todo-input input {
    font-size: 12px;
  }
}
