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

body {
    font-family: Arial, sans-serif;
    background-color: #fff;
    height: 100vh;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    z-index: 100;
}

.back-button:hover {
    color: #666;
}

.calendar-wrapper {
    width: 100%;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 40px 20px;
    padding-bottom: 120px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.calendar-container {
    display: flex;
    gap: 60px;
    padding: 0 60px;
}

.month {
    flex-shrink: 0;
}

.month-name {
    font-size: 14px;
    font-weight: 700;
    color: #888;
    margin-bottom: 12px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 80px);
    margin-left: 1px;
}

.day-label {
    font-size: 11px;
    color: #999;
    padding: 6px 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid #e0e0e0;
    border-right: none;
    border-bottom: none;
}

.day-cell {
    width: 80px;
    height: 80px;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 6px 8px;
    font-size: 12px;
    color: #999;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.day-cell.empty {
    background-color: #f9f9f9;
}

.day-cell:not(.empty) {
    background-color: #fff;
}

.day-number {
    display: block;
}

.habit-indicators {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}

.habit-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Legend */
.legend-container {
    position: fixed;
    bottom: 40px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 100;
    background: linear-gradient(transparent, white 30%);
    padding: 20px 0;
}

.legend {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    pointer-events: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.legend-label {
    font-size: 13px;
    color: #666;
}

/* Hide scrollbar */
.calendar-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.calendar-wrapper::-webkit-scrollbar {
    display: none;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .calendar-wrapper {
        padding: 20px 10px;
        padding-bottom: 100px;
    }

    .calendar-container {
        gap: 40px;
        padding: 0 40px;
    }

    .day-cell {
        width: 55px;
        height: 55px;
        font-size: 11px;
        padding: 4px 6px;
    }

    .month-name {
        font-size: 13px;
    }

    .calendar-header {
        grid-template-columns: repeat(7, 55px);
    }

    .day-label {
        font-size: 10px;
        padding: 4px 0;
    }

    .habit-indicator {
        width: 4px;
        height: 4px;
    }

    .legend {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 20px;
    }

    .legend-color {
        width: 14px;
        height: 14px;
    }

    .legend-label {
        font-size: 12px;
    }

    .legend-container {
        bottom: 20px;
    }
}
