/* ================= PALETA DE CORES ================= */

:root {
    --rosa-algodao: #fff0f6;       
    --rosa-claro: #ffe0ef;      
    --rosa-medio: #ff99c2;        
    --rosa-escuro: #ff4d94;        
    --rosa-branco: #ffffff;        
    --cinza-texto: #5c6773;       
    --sombra-fofa: 0 6px 18px rgba(255, 153, 194, 0.4);
    --sombra-leve: 0 2px 4px rgba(0, 0, 0, 0.05);
    --rosa-concluido: #ffd6e8;     
}

/* ================= ESTILO BASE ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html, body {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto; 
}

body {
    color: var(--cinza-texto);
    line-height: 1.6;
    background: linear-gradient(to top, #ffe6f0, #fff0f6);
}

/* ================= LAYOUT PRINCIPAL ================= */

main {
    display: flex;
    justify-content: center; 
    gap: 20px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    min-height: calc(100vh - 40px);
    box-sizing: border-box;
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.main-content {
    flex: 1;
    display: flex;
    justify-content: center; 
    flex-wrap: wrap;         
}

/* ================= COLUNA TAREFAS ================= */

.tarefas {
    width: 600px;
    min-height: 685px;
    max-width: 100%;          
    background-color: var(--rosa-branco);
    padding: 35px;
    border-radius: 20px;
    box-shadow: var(--sombra-fofa);
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;      
}

.main-content {
    margin-left: 290px; 
    flex: 1;
}

/* ================= FORMULÁRIO ================= */

label {
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
    color: var(--cinza-texto);
}

input[type="text"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 2px solid var(--rosa-medio);
    border-radius: 12px;
    background-color: var(--rosa-branco);
    transition: all 0.3s;
    font-size: 1em;
}

input[type="text"]:focus {
    border-color: var(--rosa-escuro);
    outline: none;
    box-shadow: 0 0 8px rgba(255, 77, 148, 0.5);
}

/* ================= BOTÕES GERAIS ================= */

button {
    border: none;
    cursor: pointer;
    text-align: center;
    background-color: var(--rosa-medio);
    color: var(--rosa-branco);
    padding: 10px 15px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

button:hover {
    transform: translateY(1px) scale(1.05);
}

#main-action-btn {
    padding: 12px 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 3px solid var(--rosa-escuro);
}

#main-action-btn:hover {
    background-color: var(--rosa-escuro);
}

#lista {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}


.task-item {
    background-color: var(--rosa-branco);
    border: 2px solid var(--rosa-claro);
    border-left: 6px solid var(--rosa-medio); 
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    word-break: break-word;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    box-sizing: border-box;
}

.task-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.task-icon {
    width: 28px;    
    height: 28px;
    flex-shrink: 0;
    margin-top: 3px;
    border-radius: 50%;
    object-fit: cover;
}

.task-text {
    flex: 1;
    font-size: 1.05em;
    line-height: 1.5;
    color: var(--cinza-texto);
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

/* ================= BOTÕES DAS TAREFAS ================= */

.task-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    width: 100%;
    margin-top: 8px;
}

.task-buttons button {
    background-color: var(--rosa-branco);
    color: var(--rosa-escuro);
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.9em;
    font-weight: 600;
    border: 2px solid var(--rosa-claro);
}

.task-buttons button:hover {
    background-color: var(--rosa-claro);
}

/* ================= POPUP ================= */

.swal2-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.popup-btn {
    padding: 8px 16px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
}

/* ========================= RESPONSIVIDADE AJUSTADA ========================= */

/* ====== Até 1024px (tablets) ====== */
@media (max-width: 1024px) {
  .layout {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .left-column {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    width: 100%;
    gap: 20px;
    position: static;
  }

  .tarefas {
    width: 90%;
    max-width: 600px;
  }
}

/* ====== Até 768px (celulares médios) ====== */
@media (max-width: 768px) {
  .layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .left-column {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
    position: static;
  }

  /* Pomodoro e Lofi lado a lado */
  .pomodoro,
  .lofi-card {
    flex: 1 1 45%;
    max-width: 45%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* Pomodoro reduzido */
  .pomodoro-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 180px;
    min-height: 220px;
    padding: 10px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(255, 100, 150, 0.2);
    box-sizing: border-box;
  }

  #timer {
    font-size: 1.8rem;
  }

  .pomodoro-card img {
    width: 80%;
    max-width: 100px;
    height: auto;
  }

  .pomodoro-card button {
    width: 80%;
    max-width: 130px;
    font-size: 0.9rem;
    margin-top: 8px;
    background-color: #ff7bbf;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }

  .pomodoro-card button:hover {
    background-color: #ff5fae;
  }

  /* Lofi reduzido */
  .lofi-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    padding: 10px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(255, 100, 150, 0.2);
    max-width: 200px;
    height: auto;
  }

  .lofi-cover-container {
    width: 160px;
    height: 130px;
  }

  .volume-container {
    width: 140px;
  }

  .volume-slider {
    height: 5px;
  }

  .lofi-options {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  .lofi-music-btn {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  /* Tarefas abaixo */
  .tarefas {
    width: 90%;
    margin-top: 15px;
  }

  #task {
    width: 100%;
  }
}

/* ====== Até 480px (celulares pequenos) ====== */
@media (max-width: 480px) {
  .left-column {
    flex-direction: row; /* lado a lado */
    justify-content: center;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
  }

  .pomodoro,
  .lofi-card {
    flex: 1 1 45%; /* ocupam quase metade da linha */
    max-width: 45%;
    display: flex;
    justify-content: center;
  }

  .pomodoro-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 150px;
    min-height: 200px;
    padding: 10px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(255, 100, 150, 0.2);
    box-sizing: border-box;
  }

  #timer {
    font-size: 1.5rem;
  }

  .pomodoro-card img {
    width: 70%;
    max-width: 80px;
  }

  .pomodoro-card button {
    width: 80%;
    font-size: 0.9rem;
  }

  .lofi-card {
    max-width: 150px;
    height: auto;
  }

  .lofi-cover-container {
    width: 130px;
    height: 100px;
  }

  .volume-container {
    width: 100px;
  }

  .volume-slider {
    height: 5px;
  }

  .lofi-options {
    gap: 6px;
    flex-wrap: wrap;
  }

  .lofi-music-btn {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .tarefas {
    width: 95%;
    margin-top: 20px;
  }

  #main-action-btn {
    width: 100%;
  }

  .task-item {
    font-size: 0.9rem;
    padding: 10px;
  }

  .task-buttons button {
    font-size: 0.9rem;
    padding: 4px 6px;
  }
}

/* ====== Telas muito pequenas (até 360px) ====== */
@media (max-width: 360px) {
  .left-column {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .pomodoro,
  .lofi-card {
    flex: 1 1 46%;
    max-width: 46%;
  }

  .pomodoro-card {
    max-width: 140px;
    min-height: 180px;
    padding: 8px;
  }

  .lofi-card {
    max-width: 140px;
  }

  #timer {
    font-size: 1.3rem;
  }

  .lofi-cover-container {
    width: 120px;
    height: 100px;
  }

  .volume-container {
    width: 90px;
  }

  .task-item {
    font-size: 0.85rem;
  }

  .task-buttons button {
    font-size: 0.8rem;
    padding: 3px 5px;
  }
}
