/* Basic Reset & Body Styling */
body {
margin: 0;
font-family: 'Poppins', sans-serif; /* Using the Google Font */
background-color: #f0f2f5; /* Light grey background */
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
color: #333; /* Dark grey text */
padding: 20px; /* Padding for small screens */
box-sizing: border-box; /* Include padding in element's total width and height */
}
/* Calendar Container */
.calendar-container {
background-color: #ffffff;
border-radius: 15px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); /* Soft shadow */
padding: 30px;
width: 100%;
max-width: 600px; /* Max width for larger screens */
border: 1px solid #e0e0e0; /* Subtle border */
}
/* Calendar Header */
.calendar-header {
text-align: center;
margin-bottom: 30px;
border-bottom: 2px solid #6c5ce7; /* Accent color for underline */
padding-bottom: 15px;
}
.calendar-header h1 {
font-size: 2.5em;
margin: 0;
color: #6c5ce7; /* Accent color for heading */
font-weight: 700;
}
.calendar-header p {
font-size: 1.1em;
color: #777;
margin-top: 5px;
}
/* Weekdays */
.weekdays {
display: grid;
grid-template-columns: repeat(7, 1fr); /* 7 equal columns */
gap: 10px; /* Space between cells */
text-align: center;
margin-bottom: 15px;
font-weight: 600;
color: #555;
font-size: 1em;
}
.weekdays div {
padding: 10px 0;
background-color: #e8e6fb; /* Lighter shade of accent color */
border-radius: 8px;
}
/* Dates Grid */
.dates {
display: grid;
grid-template-columns: repeat(7, 1fr); /* 7 equal columns */
gap: 10px; /* Space between cells */
text-align: center;
}
.date-cell, .empty {
display: flex;
justify-content: center;
align-items: center;
padding: 15px 0;
font-size: 1.1em;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease; /* Smooth transitions for hover effects */
}
.date-cell {
background-color: #fdfdfd;
border: 1px solid #e0e0e0;
color: #444;
font-weight: 400;
}
.date-cell:hover {
background-color: #6c5ce7; /* Accent color on hover */
color: #ffffff; /* White text on hover */
transform: translateY(-3px); /* Subtle lift effect */
box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3); /* Shadow on hover */
border-color: #6c5ce7;
}
.empty {
background-color: #f7f7f7;
border: 1px solid #f0f0f0;
pointer-events: none; /* Make empty cells not clickable */
}
/* Optional: Highlight a specific day (e.g., today or an event) */
/* You would typically add this class with JavaScript based on the current date */
/* For a static calendar, you can manually add this to a .date-cell */
.date-cell.today {
background-color: #ff7675; /* A vivid red/orange */
color: white;
font-weight: 600;
border-color: #ff7675;
box-shadow: 0 5px 15px rgba(255, 118, 117, 0.3);
}
.date-cell.today:hover {
background-color: #e15f60; /* Darker red on hover */
}
/* Responsive Adjustments */
@media (max-width: 768px) {
.calendar-container {
padding: 20px;
max-width: 95%;
}
.calendar-header h1 {
font-size: 2em;
}
.calendar-header p {
font-size: 0.9em;
}
.weekdays, .dates {
gap: 5px; /* Reduce gap on smaller screens */
}
.weekdays div, .date-cell, .empty {
font-size: 0.9em;
padding: 12px 0;
}
}
@media (max-width: 480px) {
.calendar-container {
padding: 15px;
border-radius: 10px;
}
.calendar-header {
margin-bottom: 20px;
padding-bottom: 10px;
}
.calendar-header h1 {
font-size: 1.8em;
}
.weekdays div, .date-cell, .empty {
font-size: 0.8em;
padding: 10px 0;
border-radius: 6px;
}
}