/* General Body Styling */ body { font-family: 'Arial', sans-serif; background: linear-gradient(to right, #2ecc71, #1abc9c); color: #fff; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; height: 100vh; transition: background-color 0.3s, color 0.3s, background-image 0.5s ease; } /* Container for Centering the Content */ .container { background: rgba(255, 255, 255, 0.1); border-radius: 20px; border: solid; padding: 20px; text-align: center; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); width: 100%; max-width: 450px; box-sizing: border-box; transition: all 0.3s ease; } /* Header Section Styling */ header { margin-bottom: 20px; } /* Search Section Styling */ .search-section { display: flex; justify-content: space-between; margin-bottom: 20px; width: 100%; } #searchInput { padding: 8px 10px; flex: 1; margin-right: 10px; border: none; border-radius: 5px; outline: none; transition: border-color 0.3s ease; } #searchBtn { padding: 8px 12px; background: linear-gradient(to right, #27ae60, #2ecc71); border: 1px solid #27ae60; border-radius: 5px; color: white; cursor: pointer; transition: all 0.3s ease; } /* Input Section and Task Buttons */ .input-section { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; width: 100%; } #taskInput { padding: 8px 10px; flex: 1; margin-right: 10px; border: none; border-radius: 5px; outline: none; transition: border-color 0.3s ease; } .buttons-right { display: flex; justify-content: space-between; width: 100%; max-width: 150px; gap: 10px; } .btn { padding: 8px 12px; font-size: 14px; background: linear-gradient(to right, #27ae60, #2ecc71); border: 1px solid #27ae60; border-radius: 5px; color: white; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); } .btn::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 5px; background: linear-gradient(to right, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)); opacity: 0; transition: opacity 0.3s ease; } .btn:hover { transform: scale(1.02); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); } .btn:hover::after { opacity: 1; } .clear-btn { margin-top: 20px; background: linear-gradient(to right, #e74c3c, #c0392b); border: 1px solid #e74c3c; } /* Task List Styling */ #taskList { list-style: none; padding: 0; margin: 0; height: 700px; /* Fixed height */ overflow-y: auto; /* Enable vertical scrolling */ max-height: 700px; } .task-item { background: rgba(255, 255, 255, 0.2); padding: 10px; margin-bottom: 10px; border-radius: 5px; display: flex; align-items: center; justify-content: space-between; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transition: all 0.3s ease; } .task-item:hover { background: rgba(255, 255, 255, 0.3); transform: translateX(5px); } .task-text { flex-grow: 1; padding-right: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } /* Popup Styling */ .popup { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); justify-content: center; align-items: center; z-index: 10; } .popup-content { background: #fff; color: #333; padding: 20px; border-radius: 10px; text-align: center; width: 300px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); } .popup-content input { width: 100%; padding: 10px; margin: 10px -10px; border: 1px solid #ccc; border-radius: 5px; } /* Dark Mode Styling */ @media (prefers-color-scheme: dark) { body { background: #333; color: #fff; } .container { background: rgba(255, 255, 255, 0.1); } .btn { background: linear-gradient(to right, #1e7f43, #16a085); border: 1px solid #1e7f43; } .clear-btn { background: linear-gradient(to right, #c0392b, #e74c3c); border: 1px solid #c0392b; } .task-item { background: rgba(255, 255, 255, 0.1); } } /* Mobile-Friendly Enhancements */ @media (max-width: 600px) { .container { width: 90%; } .input-section { flex-direction: column; align-items: flex-start; } .buttons-right { width: 100%; justify-content: flex-start; } .task-item { flex-direction: column; text-align: left; } .task-text { white-space: normal; } .btn { padding: 10px 15px; font-size: 16px; } .clear-btn { font-size: 16px; } } /* Light and Dark Themes */ body.light { background: linear-gradient(135deg, #f3f4f9, #e4e9f2); /* Soft light gradient */ color: #333; } body.dark { background-color: #121212; /* Deep dark background */ color: #ffffff; } /* Button Styling */ .theme-toggle-btn { position: fixed; top: 20px; right: 20px; background-color: transparent; border: none; cursor: pointer; font-size: 24px; padding: 10px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background-color 0.3s, transform 0.3s; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); } .theme-toggle-btn:hover { transform: scale(1.1); background-color: rgba(0, 0, 0, 0.1); } .icon { display: none; font-size: 20px; transition: opacity 0.3s; } #sun-icon { color: #ffdd00; } #moon-icon { color: #f1f1f1; } /* Show icons based on the theme */ body.light #sun-icon { display: inline; } body.dark #moon-icon { display: inline; } body.dark #sun-icon { display: inline; } body.light #moon-icon { display: inline; } footer { font-size: 0.8em; text-align: center; margin-top: 20px; background-color: #f1f1f1; padding: 10px 5px; color: #333; border: solid; border-radius: 10px; width: 50%; max-height: 17px; margin-left: auto; margin-right: auto; display: flex; align-items: center; justify-content: center; } footer strong { font-weight: bold; } /* Add some padding to the buttons */ .btn { padding: 10px 15px; /* Increased right padding for better touch targets */ margin-left: 5px; font-size: 16px; /* Consistent font size */ } /* Style the 'In' and 'Out' task types */ .task-type.in { color: green; font-weight: bold; background-color: rgba(76, 175, 80, 0.2); /* Light green background */ padding: 2px 8px; border-radius: 12px; font-size: 14px; text-transform: uppercase; } .task-type.out { color: red; font-weight: bold; background-color: rgba(244, 67, 54, 0.2); /* Light red background */ padding: 2px 8px; border-radius: 12px; font-size: 14px; text-transform: uppercase; } /* Style the toggle buttons with icons */ .toggle-btn { background: none; border: none; color: inherit; font-size: 1.2rem; cursor: pointer; display: inline-flex; align-items: center; padding: 5px 10px; transition: all 0.3s ease; border-radius: 4px; /* Added border radius for a softer look */ } /* 'In' button style (Green check mark) */ .toggle-btn.in { color: green; } .toggle-btn.in::before { content: "✅"; /* Green check mark */ margin-right: 5px; } /* 'Out' button style (Red cross mark) */ .toggle-btn.out { color: red; } .toggle-btn.out::before { content: "❌"; /* Red cross */ margin-right: 5px; } /* Hover effect for toggle buttons */ .toggle-btn:hover { opacity: 0.8; background-color: rgba(0, 0, 0, 0.1); /* Subtle background on hover */ } /* Tooltip for the toggle buttons */ .toggle-btn[title] { position: relative; } .toggle-btn[title]:hover::after { content: attr(title); position: absolute; top: -25px; left: 50%; transform: translateX(-50%); padding: 5px; color: white; border-radius: 4px; font-size: 12px; white-space: nowrap; z-index: 10; } /* Style for task item with 'In' status */ .task-item .task-type.in::before { content: "✅"; /* Green check mark for tasks marked "In" */ margin-right: 8px; } /* Style for task item with 'Out' status */ .task-item .task-type.out::before { content: "❌"; /* Red cross for tasks marked "Out" */ margin-right: 8px; } /* Responsive adjustments */ @media (max-width: 600px) { .btn, .toggle-btn { font-size: 14px; /* Slightly smaller font size on small screens */ padding: 8px 12px; /* Adjust padding for smaller screens */ } } /* Calculate Button Styling (Smaller Version) with Custom Colors */ #calculateBtn { padding: 8px 12px; /* Reduced padding */ background: linear-gradient(to right, #1e7f43, #16a085); /* Custom gradient */ border: 1px solid #1e7f43; /* Custom border color */ border-radius: 5px; border: inset; color: white; cursor: pointer; transition: all 0.3s ease; margin-top: 20px; /* Space between task list and button */ font-size: 13px; /* Smaller font size */ width: auto; /* Adjust width to content */ text-transform: capitalize; font-weight: bold; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); } /* Hover Effect for Calculate Button */ #calculateBtn:hover { background: linear-gradient(to right, #16a085, #1e7f43); /* Reversed gradient on hover */ transform: scale(1.05); box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); } /* Focus Effect for Accessibility */ #calculateBtn:focus { outline: none; box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.5); /* Light green focus */ } /* Payment Popup Styling */ .payment-popup { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); justify-content: center; align-items: center; z-index: 10; animation: fadeIn 0.5s ease-out; padding: 15px; } /* Slide In Animation for Popup */ @keyframes slideIn { 0% { transform: translateY(-50%); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } } /* Payment Popup Content */ .payment-popup-content { background: #fff; color: #333; padding: 25px; border-radius: 10px; text-align: center; width: 350px; max-width: 90%; box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); animation: slideIn 0.5s ease-out; } /* Popup Title */ .payment-popup-content h3 { margin-bottom: 20px; font-size: 22px; color: #2980b9; } /* Total Amount Styling */ .payment-popup-content .total { font-size: 20px; margin: 15px 0; font-weight: bold; color: #2ecc71; /* Green for totals */ } .payment-popup-content .total span { font-weight: bolder; color: #e74c3c; /* Red for result */ } /* Close Button Styling */ .payment-popup-content .close-btn { margin-top: 25px; padding: 10px 15px; background: #e74c3c; border: none; color: white; cursor: pointer; border-radius: 5px; transition: all 0.3s ease; font-size: 16px; font-weight: bold; } /* Close Button Hover Effect */ .payment-popup-content .close-btn:hover { background: #c0392b; transform: scale(1.05); } /* Close Button Focus Effect */ .payment-popup-content .close-btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.5); /* Red focus */ } /* Fade In and Out for the Popup */ @keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } } /* Popup Visibility */ .payment-popup:target { display: flex; /* Show the popup when it's targeted */ } /* Improved Styling for Background Overlay */ .payment-popup { background: rgba(0, 0, 0, 0.6); transition: opacity 0.3s ease-out; } /* Add transition for the close button hover */ .payment-popup-content .close-btn { transition: background-color 0.3s ease; } /* Accessibility: For screen readers */ .payment-popup-content .total span { font-size: 24px; font-weight: bold; color: #2ecc71; } .payment-popup-content h3, .payment-popup-content .total { line-height: 1.4; }