@import url('https://fonts.googleapis.com/css2?family=Proza+Libre:wght@500;700&display=swap');

body {
  touch-action: manipulation;
  font-family: 'Proza Libre', sans-serif;
  font-size: 12px; /* Changed from 14px to 12px */
  font-weight: 500;
  background-color: #f0f0f0;
  margin: 0;
  padding: 0;
  text-transform: uppercase;
  overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: auto;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    padding: 20px;
    text-align: center;
    background: #87CEEB;
    color: #333;
    position: relative;
}

.coins {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.coin-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: gold;
    margin-left: 8px;
    border: 2px solid #b8860b;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.nav-arrows {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #87CEEB;
    color: white;
    font-weight: 700;
    font-size: 12px; 
}

.nav-arrows button {
    background: #ADD8E6;
    color: #333;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-family: 'Proza Libre', sans-serif;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    border: 2px solid #87CEEB;
    width: 48%;
}

.nav-arrows button:hover {
    background: #9CC3D5;
}

main {
    padding: 20px;
    padding-top: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

#current-day-name {
    font-size: 18px;
    margin-top: 10px;
    font-weight: 700;
}

.day-container {
    width: 100%;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
}

.day-view {
    width: 100%;
}

.task-list {
    list-style-type: none;
    padding: 0;
}

.task-list .task {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
    position: relative;
    background: none;
}

.task-list .task.completed::before {
    content: "✓";
    font-size: 20px;
    color: green;
    position: absolute;
    left: 10px;
    font-weight: bold;
}

.task-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px;
    margin-bottom: 2px;
    cursor: pointer;
    position: relative;
    background: none;
}

.task-option input[type="checkbox"] {
    display: none;
}

.task-name {
    flex-grow: 1;
    text-align: left;
    margin-left: 30px;
}

.task-coins {
    display: flex;
    align-items: center;
    font-weight: 700;
    justify-content: flex-end; /* Aligns the coin value and icon to the right */
}

footer {
    padding: 10px;
    background: #87CEEB;
    color: white;
    position: sticky;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-align: center;
}

.footer-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px; /* Space between buttons */
}

.footer-buttons button {
    flex: 1;
    margin: 0;
    padding: 10px;
    text-align: center;
    font-size: 12px;
    background: #ADD8E6;
    color: #333;
    border: 2px solid #87CEEB;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 700;
    width: 45% !important;
}

.footer-buttons button:hover {
    background: #9CC3D5;
}
button {
    background: #ADD8E6;
    color: #333;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    width: 100%;
    font-family: 'Proza Libre', sans-serif;
    font-weight: 700;
    font-size: 12px; /* Changed from 14px to 12px */
    text-transform: uppercase;
    border: 2px solid #87CEEB;
    box-sizing: border-box;
}

button:hover {
    background: #9CC3D5;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 0px 20px 20px 20px;
    border: 1px solid #888;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
.modal-content input,
.modal-content select,
.modal-content button {
    width: 100%;
    font-size: 12px; /* Changed from 14px to 12px */
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 5px;
    padding: 10px;
    box-sizing: border-box;
}

.modal-content select {
    -webkit-appearance: none;
    appearance: none;
    background: #333;
    color: white;
    padding: 10px;
    cursor: pointer;
    text-align: center;
}

.modal-content select:focus {
    outline: none;
}

.close {
    color: #aaa;
    align-self: flex-end;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}
/* Popup styles for coin adjustment */
.coin-popup {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    width: 60px; /* Reduced width to half */
    padding: 3px; /* Reduced padding */
    background-color: white;
    border: 2px solid #87CEEB;
    border-radius: 4px; /* Reduced border radius */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Reduced shadow */
}

.coin-popup button {
    background: none;
    border: none;
    font-size: 14px; /* Reduced font size */
    font-weight: bold;
    color: #333;
    cursor: pointer;
    padding: 0; /* Remove extra padding */
}

.coin-popup span {
    font-size: 14px; /* Reduced font size */
    font-weight: bold;
    margin: 0 5px; /* Reduced margin between the buttons */
}
/* Specific Day Selector Styling */
#taskModal .day-option {
    background: #f0f0f0;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

#taskModal .day-option input[type="checkbox"] {
    display: none;
}

#taskModal .day-option span {
    flex-grow: 1;
    text-align: left;
}

#taskModal .day-option input[type="checkbox"] + span::after {
    content: "✓";
    font-size: 20px;
    color: green;
    display: none;
    position: absolute;
    right: 10px;
    font-weight: bold;
}

#taskModal .day-option input[type="checkbox"]:checked + span::after {
    display: inline-block;
}

/* Manage Tasks Modal Specific Styles */
#manageTasksModal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 20px;
    max-height: 80vh;
    overflow: hidden;
}

#manageTasksModal .modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: none; /* Remove border from the modal content */
}

#manageTasksModal h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

#manageTasksModal ul#manageTaskList {
    list-style-type: none;
    padding: 0;
    margin: 0;
    overflow-y: auto; /* Make the list scrollable */
    flex-grow: 1;
    padding-right: 8px; /* Add some space for scrollbar */
}

#manageTasksModal ul#manageTaskList li.manage-task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    font-size: 10px; /* Ensure consistent font size */
}

#manageTasksModal ul#manageTaskList li.manage-task-item .task-coins {
    display: flex;
    align-items: center;
    font-weight: 700;
    justify-content: flex-end;
}

#manageTasksModal ul#manageTaskList li.manage-task-item .task-coins span {
    margin-right: -4px; /* Space between the value and the icon */
}

#manageTasksModal ul#manageTaskList li.manage-task-item .coin-icon {
    width: 10px; /* Reduced size to match text size */
    height: 10px; /* Reduced size to match text size */
    border-radius: 50%;
    background-color: gold;
    border: 1px solid #b8860b;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
}

#manageTasksModal ul#manageTaskList li.manage-task-item .delete-task {
    color: #ff4d4d; /* Red color for delete */
    font-size: 14px; /* Reduced size from 20px to 14px */
    cursor: pointer;
    margin-left: 10px;
    line-height: 1; /* Ensure the X is vertically centered */
}


/* Clear All Button Styling */
#clearAllButton {
    background-color: #ff4d4d; /* Red color for clear all */
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 16px; /* Smaller button */
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    font-size: 12px; /* Changed from 14px to 12px */
}

#clearAllButton:hover {
    background-color: #e04444; /* Darker red on hover */
}

#manageTasksModal .close {
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

#manageTasksModal .close:hover,
#manageTasksModal .close:focus {
    color: #000;
}

/* Edit Task Modal Specific Styles */
#editTaskModal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 400px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1100; /* Ensure the edit modal appears above the manage tasks modal */
    padding: 20px;
    overflow: hidden;
}
/* Passcode page styles */
.passcode-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f06, #4a90e2);
    background-size: 300% 300%;
    animation: BackgroundAnimation 10s ease infinite;
}

@keyframes BackgroundAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.passcode-modal {
    background: rgba(255, 255, 255, 0.85); /* Slight transparency */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 300px; /* Fixed width to ensure consistent alignment */
    margin: 0 auto; /* Center the modal */
}

.passcode-modal h2 {
    margin-bottom: 15px;
    font-size: 18px; /* Adjust font size if needed */
}

.passcode-modal input {
    width: 100%; /* Ensure the input takes the full width of the modal */
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box; /* Ensure padding doesn't affect the width */
    text-align: center; /* Center text inside the input */
}

.passcode-modal button {
    padding: 10px 20px;
    width: 100%; /* Ensure the button is the same width as the input */
    border: none;
    border-radius: 5px;
    background: #87CEEB;
    color: white;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
}

.passcode-modal button:hover {
    background: #6DBDD6;
}
/* Popup styles for coin adjustment */
.coin-popup {
    display: none;
    position: absolute;
    top: 40px;
    right: 20px;
    background-color: white;
    border: 2px solid #87CEEB;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1100; /* Increase this if needed */
    width: 120px;
    text-align: center;
}

.coin-popup button {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

.coin-popup input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: bold;
}
.coin-popup button:focus {
    outline: none;
}

.coin-popup input:focus {
    outline: none;
}
/* Styling for Total Coin Count */
#totalCoinsValue {
  font-size: 18px;
  font-weight: 700;
}
#totalCoins > div {
  margin-left: 2px;
  width: 16px;
  height: 16px;
}