:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --font-family: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#header {
    background-color: #903030;
    color: #ffffff;
    text-align: left;
    padding: 0 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
}

#header #logo {
    height: 40px;
    vertical-align: middle;
    margin-right: 15px;
	border: 3px solid #ffffff;
	border-radius: 5px;
}

#title {
    font-size: 24px;
    font-weight: 600;
    margin: 20px 0;
}

main {
    display: flex;
    flex: 1;
    padding: 20px;
    gap: 20px;
}

#controls {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 300px;
    height: fit-content;
}

#controls h2 {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.control-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

select,
input[type="checkbox"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

button {
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

#download-link {
    display: block;
    margin-top: 15px;
    text-align: center;
}

#download-link a {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 4px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

#download-link a:hover {
    background-color: #218838;
}

.description {
    font-size: 14px;
    color: var(--secondary-color);
    line-height: 1.5;
    margin-top: 20px;
}

#preview-section {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#preview-title {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--primary-color);
}

#calendarContainer {
    overflow: auto;
    max-height: calc(100vh - 180px);
    border: 1px solid #eee;
    border-radius: 4px;
}

.calendar-page {
    padding: 20px;
    background: white;
    color: black;
    page-break-after: always;
    box-sizing: border-box;
}

.month-header {
    font-size: 45px;
    font-weight: 600;
    text-align: left;
    padding: 0;
    margin-bottom: 15px;
}

.weekday-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--secondary-color);
    text-align: center;
    padding-bottom: 5px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(120px, auto);
    gap: 1px;
    background: #000;
    border: 2px solid #000;
}

.calendar-cell {
    background: white;
    padding: 8px;
    box-sizing: border-box;
    position: relative;
    font-size: 12px;
}

.date-number {
    position: absolute;
    top: 8px;
    right: 8px;
    font-weight: 500;
    font-size: 20px;
    color: #707070;
}

.weekend {
    background-color: #e0e0e0;
}

.calendar-author a {
    color: #909090;
	font-size: 14px;
	text-decoration: none;
	margin-left: 10px;
}

#footer {
    text-align: center;
    padding: 20px;
    font-size: 14px;
    color: #909090;
    background-color: white;
    margin-top: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

#footer a {
    color: var(--primary-color);
    text-decoration: none;
}

#footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    main {
        flex-direction: column;
    }

    #controls {
        width: 100%;
        box-sizing: border-box;
    }
}