Certainly! Below is a comprehensive and visually appealing CSS designed to enhance your HTML and JavaScript app. This CSS incorporates the specified color schemes, utilizes modern design techniques like gradients, shadows, and transitions, and ensures a feature-rich interface with responsive design elements.
/* Reset and Base Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Roboto', sans-serif;
background: linear-gradient(135deg, #1A2634, #323C4F, #424D5C);
color: #F2F2F2;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
}
.container {
background: rgba(26, 38, 52, 0.85);
border-radius: 15px;
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
max-width: 800px;
width: 100%;
padding: 30px;
display: flex;
flex-direction: column;
gap: 20px;
}
/* Header Styles */
header {
display: flex;
flex-direction: column;
gap: 15px;
}
.editable-title {
font-size: 2em;
font-weight: 700;
border-bottom: 2px solid #D8A7A1;
padding-bottom: 10px;
cursor: text;
transition: border-color 0.3s ease;
}
.editable-title:focus {
border-color: #B38184;
outline: none;
}
.slider-background {
position: relative;
width: 100%;
height: 25px;
background: #2C3E50;
border-radius: 12.5px;
overflow: hidden;
}
.slider-fill {
height: 100%;
background: linear-gradient(90deg, #B38184, #D8A7A1);
width: 0%;
transition: width 0.4s ease;
position: relative;
}
.numerical-label {
position: absolute;
top: -35px;
background: rgba(0, 0, 0, 0.6);
padding: 5px 10px;
border-radius: 20px;
font-weight: 500;
transform: translateX(-50%);
transition: left 0.4s ease;
}
.item-count {
display: flex;
gap: 10px;
align-items: center;
font-size: 0.9em;
}
.item-count label {
font-weight: 500;
}
.flex-container {
display: flex;
align-items: center;
gap: 5px;
}
/* Search Box */
.narrow-search-box {
padding: 10px 15px;
border: none;
border-radius: 25px;
width: 100%;
max-width: 400px;
outline: none;
font-size: 1em;
transition: box-shadow 0.3s ease;
}
.narrow-search-box:focus {
box-shadow: 0 0 10px rgba(216, 167, 161, 0.7);
}
/* Checklist Container */
.checklist-container {
display: flex;
flex-direction: column;
gap: 10px;
max-height: 400px;
overflow-y: auto;
padding-right: 10px;
}
/* Checklist Items */
.checklist-item {
background: rgba(50, 60, 79, 0.9);
border-left: 5px solid #D8A7A1;
border-radius: 8px;
padding: 10px 15px;
display: grid;
grid-template-columns: auto 1fr auto;
align-items: center;
gap: 10px;
transition: background 0.3s ease, transform 0.2s ease;
cursor: grab;
}
.checklist-item.dragging {
opacity: 0.6;
transform: rotate(2deg);
}
.checklist-item:hover {
background: rgba(72, 85, 109, 0.95);
}
.checklist-item input[type="checkbox"] {
width: 20px;
height: 20px;
accent-color: #D8A7A1;
cursor: pointer;
transition: transform 0.2s ease;
}
.checklist-item input[type="checkbox"]:hover {
transform: scale(1.1);
}
.checklist-item textarea {
width: 100%;
background: transparent;
border: none;
resize: none;
font-size: 1em;
color: #F2F2F2;
padding: 5px;
outline: none;
transition: background 0.3s ease;
}
.checklist-item textarea:focus {
background: rgba(255, 255, 255, 0.1);
border-radius: 5px;
}
.priority-box {
background: linear-gradient(135deg, #B38184, #D8A7A1);
padding: 5px 10px;
border-radius: 20px;
cursor: pointer;
transition: transform 0.2s ease, box-shadow 0.3s ease;
font-weight: 500;
user-select: none;
}
.priority-box:hover {
transform: scale(1.05);
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
button {
padding: 10px 20px;
border: none;
border-radius: 25px;
background: linear-gradient(135deg, #B38184, #D8A7A1);
color: #F2F2F2;
font-size: 1em;
font-weight: 500;
cursor: pointer;
transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}
button:hover {
background: linear-gradient(135deg, #D8A7A1, #B38184);
transform: translateY(-2px);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
button:active {
transform: translateY(0);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.button-container {
display: flex;
gap: 15px;
justify-content: flex-end;
flex-wrap: wrap;
}
/* Progress Bar Label */
.numerical-label {
font-size: 0.9em;
color: #F2F2F2;
pointer-events: none;
}
/* Scrollbar Styles */
.checklist-container::-webkit-scrollbar {
width: 8px;
}
.checklist-container::-webkit-scrollbar-thumb {
background: #D8A7A1;
border-radius: 4px;
}
.checklist-container::-webkit-scrollbar-track {
background: #2C3E50;
}
/* Responsive Design */
@media (max-width: 600px) {
.container {
padding: 20px;
}
.editable-title {
font-size: 1.5em;
}
button {
padding: 8px 16px;
font-size: 0.9em;
}
.narrow-search-box {
font-size: 0.9em;
}
}
Explanation of Key Styles:
-
Base Styles and Reset:
- Ensures consistent styling across different browsers by resetting margins and paddings.
- Sets the
Roboto font family and applies the primary text color #F2F2F2.
-
Container:
- Uses a semi-transparent background with a blur effect to create a modern glassmorphism look.
- Applies a gradient background as specified, with rounded corners and shadows for depth.
-
Header Elements:
- Editable Title: Styled with a focus border and smooth transitions to enhance interactivity.
- Progress Slider: Incorporates a warm gradient fill that animates based on user interaction.
- Item Count: Displays total and active items with clear labeling.
-
Search Box:
- Features a sleek, rounded design with focus effects to improve user experience.
-
Checklist Items:
- Each item is styled with a subtle gradient border, shadow, and hover effects.
- Draggable items have visual cues when being moved.
- The priority box and delete button are interactive with hover and click animations.
-
Buttons:
- All buttons utilize the warm accent gradient.
- Interactive states like hover and active are enhanced with transitions, shadows, and slight movements to provide feedback.
-
Responsive Design:
- Adjusts padding, font sizes, and button sizes for smaller screens to maintain usability.
-
Scrollbar Styling:
- Customizes the scrollbar within the checklist container to match the overall color scheme.
Integration:
Make sure to replace the --your output will pasted here-- placeholder in your HTML with the above CSS code. This will ensure that all styles are correctly applied to your application. Here's how you can do it:
<style>
/* Paste the above CSS code here */
</style>
Additional Recommendations:
-
Icons and Enhancements: Consider integrating icon libraries like Font Awesome for better visuals on buttons (e.g., a plus icon for the Add button).
-
Animations: For a more dynamic interface, you can add keyframe animations to elements like the progress bar or checklist items.
-
Accessibility: Ensure that all interactive elements are accessible via keyboard navigation and have appropriate aria labels where necessary.
Feel free to customize and expand upon this CSS to better fit the specific needs and functionalities of your application!