* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #F5C842;
    background-image: 
        url('tile-pattern-1.jpg'),
        url('tile-pattern-2.jpg');
    background-repeat: repeat;
    background-size: 300px 300px, 300px 300px;
    background-position: 0 0, 300px 300px;
    font-family: 'Courier New', monospace;
    display: flex;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

#sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    background-color: white;
    color: #1a1a1a;
    border: 3px solid #1a1a1a;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#sidebar-toggle:hover {
    background-color: #f0f0f0;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background-color: #1a1a1a;
    border-right: 3px solid #D4A5A5;
    transition: left 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #D4A5A5;
}

.sidebar-header h2 {
    color: #D4A5A5;
    font-size: 22px;
    margin: 0;
}

.add-calendar-btn {
    background-color: #D4A5A5;
    color: #1a1a1a;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-weight: bold;
    line-height: 1;
}

.add-calendar-btn:hover {
    background-color: #e4b5b5;
    transform: scale(1.1);
}

.calendar-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calendar-item {
    background-color: #2a2a2a;
    color: #D4A5A5;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-item:hover {
    background-color: #3a3a3a;
    border-color: #D4A5A5;
}

.calendar-item.active {
    background-color: #D4A5A5;
    color: #1a1a1a;
    border-color: #D4A5A5;
}

.calendar-item-name {
    flex: 1;
    font-weight: bold;
    font-size: 16px;
}

.delete-calendar-btn {
    background-color: transparent;
    color: inherit;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.delete-calendar-btn:hover {
    opacity: 1;
}

#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    gap: 20px;
    transition: margin-left 0.3s ease;
}

#main-content.sidebar-open {
    margin-left: 320px;
}

#calendar-title {
    color: #1a1a1a;
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    margin: 0;
    padding: 15px 30px;
    background-color: white;
    border-radius: 12px;
    border: 3px solid #1a1a1a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#date-display {
    background-color: rgba(26, 26, 26, 0.85);
    color: #D4A5A5;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    min-height: 24px;
    min-width: 200px;
    text-align: center;
    border: 2px solid #D4A5A5;
}

#calendar-container {
    background-color: #1a1a1a;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 20px solid transparent;
    border-image: url('border-tile.jpg') 33% repeat;
    max-width: 2200px;
    width: 95%;
}

.calendar-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    max-width: 100%;
}

.day {
    width: 80px;
    height: 80px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #2a2a2a;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    position: relative;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-size: cover;
    background-position: center;
}

.day:hover:not(.inactive):not(.clicked):not(.locked) {
    opacity: 0.8;
}

.day.clicked {
    cursor: default;
    border: 2px solid #d4a574;
}

.day.inactive {
    cursor: not-allowed;
    opacity: 0.25;
    color: #444;
    filter: grayscale(80%) brightness(45%);
}

.day.locked {
    cursor: not-allowed;
    opacity: 0.3;
    color: #444;
    filter: grayscale(70%) brightness(55%);
}

.day.month-start {
    border-left: 3px solid #D4A5A5;
}

.day.feb-day {
    color: white;
}

.day.may-day {
    color: white;
}

.day.white-text {
    color: white;
}

.day.black-text {
    color: #2a2a2a;
}


@media (max-width: 1400px) {
    .day {
        width: 45px;
        height: 45px;
        font-size: 12px;
    }
    
    .month-header {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .day {
        width: 40px;
        height: 40px;
        font-size: 11px;
    }
    
    .month-header {
        min-width: 50px;
        font-size: 12px;
    }
    
    .month-days {
        gap: 6px;
    }
}
